Oracle Database connection - Proxy Users

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Oracle Database connection - Proxy Users

Vikram Aruchamy (RBEI/ETB5)

Hello Eclipselink Experts,

 

I would like to know how to open a database connection using the Proxy users in Eclipse link Entity manager.

 

Background:

 

We have ‘n’ number of database users created in our oracle database and the necessary access rights and roles have been given to these users to access the data from the main schema where the data is stored.

 

Each user is using a separate user name and password for logging in to Eclipse application which connects to the database via eclipselink entity manager using user specific login information.

 

We would like to avoid getting the user name and password from user each time.

 

Instead we would like to create a connection to the database user using the proxy user(Feature of Oracle database).

 

Eg.

 

Suppose a user TEST1 wants to connect to database. Now we have granted the option for Test1 to connect through to test2 as shown below.

 

Conn / as sysdba

SQL >alter user TEST1 grant connect through TEST2;

User altered.

SQL >conn TEST2[TEST1]

Enter password:< Give password for TEST2>

 

SQL >show user

USER is "TEST1"

 

SQL >create table emp_test as select * from emp;

Table created.

 

SQL > conn / as sysdba

Connected

 

SQL > select owner from dba_tables where table_name='EMP_TEST';

 

OWNER

------

TEST1

 

We were able to create an object in Test1 without knowing the password of Test1. By using the proxy user Test2 with the necessary privileges.

 

Is it possible to connect to database using eclipselink as user test1 via the proxy user Test2 (Without knowing the password of Test1).

 

Please help.

 

Best regards,

Vikram


_______________________________________________
eclipselink-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/eclipselink-users