Page 1 of 1

authentication required

Posted: Thu 03 Nov 2016 20:08
by jdorlon
Hello,

I know that with ODAC I can connect proxy users that are set up like this:

ALTER USER xxxxxxx GRANT CONNECT THROUGH yyyyyy;

What about if they are set up like this?

ALTER USER xxxxxxx GRANT CONNECT THROUGH yyyyyyy AUTHENTICATION REQUIRED;

Thanks,
John Dorlon

Re: authentication required

Posted: Fri 04 Nov 2016 16:40
by jdorlon
OK, I have found that I can make it work. FYI - here are the users that I am creating:

Code: Select all

   create user app_user identified by app_user;
   create user end_user identified by end_user;
   create user end_user_ar identified by end_user_ar;
   grant create session to app_user;
   grant create session to end_user;
   grant create session to end_user_ar;
   alter user end_user grant connect through app_user;
   alter user end_user_ar grant connect through app_user authentication required;
now, after running that script, and using two TOraSessions, I can do this:

Code: Select all

  proxy_session.Username := 'app_user';
  proxy_session.password := 'app_user';
  proxy_session.server := 'ORCL12CR2_PLUG';
  session.Username := 'end_user_ar';
  session.password := 'end_user_ar';
  session.server := 'ORCL12CR2_PLUG';
  proxy_session.Connected := True;
  Session.ProxySession := proxy_session;
  session.Connected := true;
...and that connects just fine.

I have noticed, however that I need to be sure to disconnect SESSION before I disconnect PROXY_SESSION, otherwise, there is an OCI_INVALID_HANDLE error.

Re: authentication required

Posted: Mon 07 Nov 2016 13:08
by MaximG
This ODAC behavior is correct. Before closing a Proxy-session, you should make sure that all connections, opened with this user by this moment are closed. This behavior is implemented in ODAC Demo : [ODAC install folder]\Demos\OdacDemo\ProxySession .