0

I am trying to implement a POC using Oracle Real Application Security (RAS) in Oracle 12C.

I have done the RAS setup with HR demo on Oracle side, which is working fine (I verified it using SQLDeveloper & SQLPlus).

now I am trying to establish a java jdbc connection using "Application User" (dispatcher) as mentioned in below link:

http://docs.oracle.com/database/121/DBFSG/midtierjava.htm#DBFSG99936

But I am getting below error: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

Though connection using "Database User" is working fine.

How to set a JDBC connection using "Application User" (not "Database User") ?

1615903
  • 32,635
  • 12
  • 70
  • 99
Akash Agrawal
  • 187
  • 1
  • 10

1 Answers1

0

To use RAS you still need to connect to the Database using the regular Database user through the JDBC driver. Once you have a JDBC connection you can start using the Security Manager oracle.security.xs.XSSecurityManager and you call getSession using the Application User.

Jean de Lavarene
  • 3,461
  • 1
  • 20
  • 28
  • i did the same, here is my code: public static void setupConnection() throws Exception { // getting the connection from database user. This connection is successsful mgrConnection = DriverManager.getConnection( ,,); mgr = XSSessionManager.getSessionManager( mgrConnection, 30, 2048000 ); // getting the connection from application user (dispatcher). This connection is throwing Invalid Username/Password exception appConnection = DriverManager.getConnection( ,,); } – Akash Agrawal Oct 06 '16 at 12:19