Skip to content

as sysdba #115

Description

@walter-weinmann

How can I connect to SYS ?

Activity

  1. pesse commented on Nov 19, 2018

    @pesse
    Member

    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
    Member

    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
    Author

    "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
    Member

    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
    Member

    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
    Member

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

  7. added this to the 3.1.3 milestone on Nov 26, 2018
  8. self-assigned this
    on Nov 26, 2018
  9. pesse commented on Mar 15, 2019

    @pesse
    Member

    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?

  10. pesse commented on Mar 15, 2019

    @pesse
    Member

    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?

  11. jgebal commented on Mar 15, 2019

    @jgebal
    Member

    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 :)

  12. jgebal commented on Mar 15, 2019

    @jgebal
    Member
  13. added a commit that references this issue on Mar 19, 2019
    bbc2ebc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions