Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PLSQL Authentication Mode (owa_sec) Failed on Oracle 12cDB and OHS 12 (RESTFul services)

MangoKJul 13 2017 — edited Jul 18 2017

We migrated from Oracle 10g (mod plsql) to Oracle 12cDB and OHS 12 (RESTFul services). On Oracle 10g one of our application is using build in system package owa_sec for login authentication. It will pop up the login page see below figure. See below code we are using function authorize (boolean) for verification/validation on passing the user name and password value for authentication. However after the conversation to RESTFul services the login page below no longer appear and it the program immediately errors out with "No data found". Which is true since the login window no longer pop up and no user name and password can be entered and passed. On Oracle 10g it is using dads.conf per schema to turn on the login authentication screen "<Location>...PlsqlAuthenticationMode PerPackageOwa</Location>" with the new Oracle 12cDB and OHS 12c (RESTFul services) dads.conf no longer been used. What configuration need to be done on Oracle 12cDB and OHS 12 (RESTFul services) application/database servers to activate the authentication login screen? Appreciate any feedback and recommendation. Let me know if you have further questions. Thank you.

Sample of dads.conf

<Location /pls/xxx_xxx>

SetHandler pls\_handler

Order allow,deny

Allow from All

AllowOverride None

PlsqlDatabaseUsername xxx\_xxxxs

PlsqlDatabasePassword xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

PlsqlDatabaseConnectString oshanet\_prod\_10g TNSFormat

PlsqlAuthenticationMode PerPackageOwa

PlsqlDefaultPage xxx\_xxx.xxxx

</Location>

Auth Login Pop Up

pastedImage_0.png

Login verification/validation function returning (user name & password) value for authentication

function authorize

  return boolean

as

  v\_authorized   boolean;

  v\_username     userinfo.username%type;

  v\_password     userinfo.password%type;

  v\_result       boolean;

begin

  -- Set Default Authorization

  v\_authorized := false;

  -- Set REALM

  owa\_sec.set\_protection\_realm ('XXXX Xxxxx: Login');

  -- Get USERNAME Submitted

  v\_username := owa\_sec.get\_user\_id;

  -- Get PASSWORD Submitted

  v\_password := owa\_sec.get\_password;

  if v\_username is not null

  then

     v\_authorized :=

        authenticate (p\_username => v\_username, p\_password => v\_password);

  end if;

  return v\_authorized;

exception

  when no\_data\_found

  then

     dbms\_output.put\_line ('no data found ' || sqlerrm);

     return false;

  when others

  then

     dbms\_output.put\_line ('authorize ' || sqlerrm);

     return false;

end authorize;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2017
Added on Jul 13 2017
2 comments
518 views