GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — as sysdba · Issue #115 · utPLSQL/utPLSQL-cli

as sysdba #115

New issue
Copy link
New issue
Copy link
Closed
#133
Closed
as sysdba#115
#133
Copy link
Assignees
pesse
Labels
enhancement
Milestone
3.1.3

Description

@walter-weinmann
walter-weinmann
opened on Nov 19, 2018
Issue body actions

How can I connect to SYS ?

Activity

  1. pesse commented on Nov 19, 2018

    @pesse
    pesse
    on Nov 19, 2018
    Member
    More actions

    You cannot at the moment. We'll need a new parameter for this.
    Though I wouldn't recommend it, it might be a valuable feature.

  2. jgebal commented on Nov 19, 2018

    @jgebal
    jgebal
    on Nov 19, 2018
    Member
    More actions

    I think it is acutally a really bad idea to run tests from a SYSDBA account.
    I would not add this functionality to cli.
    If you need access to execute and procedure just use a user accout with proper role/privilege.

  3. walter-weinmann commented on Nov 20, 2018

    @walter-weinmann
    walter-weinmann
    on Nov 20, 2018
    Author
    More actions

    "Unfortunately, I'm working on software used by DBAs. For some code, access is restricted to the session user SYS. It is not my responsibility to handle this in any other way, but I don't want to exclude it from regression testing.

  4. pesse commented on Nov 20, 2018

    @pesse
    pesse
    on Nov 20, 2018
    Member
    More actions

    What about adding a parameter but outputting a warning that it's not recommended to run tests as sysdba, @jgebal?
    I agree with you but I can also see some edge cases in which it is hard to go a different route and I don't want to exclude these people (who might suffer already anyway :) )

  5. jgebal commented on Nov 20, 2018

    @jgebal
    jgebal
    on Nov 20, 2018
    Member
    More actions

    I stand corrected @pesse
    I've just realized that I gave exactly the same style of answer as Jeff Smith gave me, when I was asking for ability to drop multiple objects in SQLDeveloper navigator using Delete key. "We will not support that, as it's a bad idea (aka can be dangerous).

    I do remember how disappointed I was though I find SQLDeveloper a great tool and Jeff is a great, very approachable guy. Always there to help.

    So yes, I agree, utPLSQL-cli could have ability to run utPLSQL as sysdba.

    It will require special permissions (unlocking) for SYS account, as by default it's blocked from executing code that runs with authid current_user.

    This, and an additional warning on cli, should be more than enough to say - we do not encourage you to do this.

    Do you think it should be cli or core responsibility to perform a check for SYS connection and raise a warning?

  6. pesse commented on Nov 20, 2018

    @pesse
    pesse
    on Nov 20, 2018
    Member
    More actions

    So you're human after all ;)
    Responsibility should be cli because I have to setup the connection in a special way already.

    Reacted by Jacek Gębal
  7. pesse
    added
    enhancement
    on Nov 26, 2018
  8. pesse
    added this to the 3.1.3 milestone on Nov 26, 2018
  9. pesse
    self-assigned this
    on Nov 26, 2018
  10. pesse commented on Mar 15, 2019

    @pesse
    pesse
    on Mar 15, 2019
    Member
    More actions

    I included the possibility to connect as SYSDBA, however every time I try to test it I get the following:

    select ut.version() from dual;
    ORA-06598: Nicht ausreichende INHERIT PRIVILEGES-Berechtigung
    ORA-06512: in "UT3.UT", Zeile 1
    

    @jgebal can you give me a hint what's causing this and can we circumvent it?

  11. pesse commented on Mar 15, 2019

    @pesse
    pesse
    on Mar 15, 2019
    Member
    More actions

    Played around a bit with grant inherit privileges on user sys to public, but didn't change anything.
    I guess I'm doing it wrong 😁
    @walter-weinmann on which Oracle version are you? Can you run select ut.version() from dual from your sysdba role?

  12. jgebal commented on Mar 15, 2019

    @jgebal
    jgebal
    on Mar 15, 2019
    Member
    More actions

    This is related to potential security risk when runnign packages that have AUTHID CURRENT_USER from SYS account.
    Your code suddenly has DBA privs and can do whatever you want.

    In general, you should never be using/running code that has AUTHID CURRENT_USER as SYS/SYSDBA unless you're 100% sure noone was messing with that code.

    So you need to execute:
    GRANT INHERIT PRIVILEGES ON USER SYS TO UT3;
    ut again - probably bad idea and probably most DBAs would kill you for this :)

  13. jgebal commented on Mar 15, 2019

    @jgebal
    jgebal
    on Mar 15, 2019
    Member
    More actions

    See: https://docs.oracle.com/database/121/DBSEG/dr_ir.htm#DBSEG661

  14. pesse
    closed this as completedin #133on Mar 19, 2019
  15. pesse
    added a commit that references this issue on Mar 19, 2019

    Merge pull request #133 from utPLSQL/feature/connect_as_sysdba

    This issue will close once commit bbc2ebc is merged into the 'develop' branch.
    bbc2ebc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @pesse
    pesse

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    • 3.1.3

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.