Your Location is: Home > Oracle

Does INVOKERS rights mean the DB session initiator or the user calling the Procedure

From: Italy View: 2512 TMohamme 

Question

We have an application running on Oracle APEX (ORDS) workspace with parsing schema as "SCHEMA_A"

I have a package "PKG_A1" in schema "SCHEMA_A".

I have a package "PKG_B1" in schema "SCHEMA_B".

I have another package "PKG_B2" in schema "SCHEMA_B" and that package has AUTHID CURRENT_USER clause.

As we know APEX_PUBLIC_USER initiate the session, The call from application to PKG_B2 happens as below:

PKG_A1 --> PKG_B1 --> PKG_B2.

Note: grant execute ON PKG_B1 to schema_A

Question 1: PKG_B2 is executed with SCHEMA_A rights or SCHEMA_B rights or APEX_PUBLIC_USER rights?

Also, if SCHEMA_B has a table "TABLE_B1" exists and a public synonym of a view with the name "TABLE_B1" exists and

PKG_B2 has call to "TABLE_B1" without user alias.

Question 2: will the synonym be called or table is called when called from application?

Please help clarify this

Best answer

Question 1: PKG_B2 is executed with SCHEMA_A rights or SCHEMA_B rights or APEX_PUBLIC_USER rights?

Answer 1:

As far as I follow you, You want to know if PKG_B2 will be called using SCHEMA_A rights.

It means PKG_A1 --> PKG_B1 --> PKG_B2 will be executed with the following rights respectively.

PKG_A1(SCHEMA_A) --> PKG_B1(SCHEMA_B) --> PKG_B2(SCHEMA_A)

Question 2: will the synonym be called or table is called when called from the application?

Answer 2:

Table from SCHEMA_B is called.