Proxy User Authentication with Connect Through in Oracle Database

The Proxy authentication mechanism allows a user to login as their own user but land into a different schema without knowing the password for that user. For example the USER_B may want to create an object in the SCHEMA_A or want to use the privileges/roles of the SCHEMA_A user.

sqlplus> create user USER_B identified by USER_B default tablespace user_data;

sqlplus> alter user SCHEMA_A grant connect through USER_B;

You can now connect through your own user but land in as the SCHEMA_A user.

sqlplus> conn USER_B[SCHEMA_A]/USER_B

sqlplus> show user

The privilege can be revoked by issuing the following.

sqlplus>alter user SCHEMA_A revoke connect through USER_B;

Leave a Reply

Your email address will not be published.