Skip to Main Content
Feature Request FR-3681
Product Area Security
Status CLOSED

2 Voters

Change Oracle user id of the current session

nithyaramu82 Public
· Mar 8 2024

Idea Summary
The current APIs that exist to set the session user is not changing the Oracle user id of the current session. 

Use Case
The Oracle user id of the current session still returns APEX_PUBLIC_USER.

Preferred Solution (Optional)
We need API to update the username of sys_context('USERENV', 'SESSION_USER').

We reviewed this idea carefully, and while it was interesting, we concluded that due to all the internal implications we need to take into account, it is not feasible in APEX.

Comments

Comments

  • vincent morneau Admin OP 1.3 years ago

    Can you provide more context about what you are trying to achieve?

  • carsten.czarski APEX Team OP 1.3 years ago

    I'd recommend to have a read on this (a bit older, but still 100% valid) blog posting.

    https://joelkallman.blogspot.com/2010/08/application-express-and-parsing-of-sql.html

    sys_context('USERENV', 'SESSION_USER') always returning APEX_PUBLIC_USER is how APEX works.

    If you need to get the schema with which privileges your SQL is being parsed, you need to use sys_context('USERENV','CURRENT_USER').