2 Replies Latest reply on Feb 3, 2020 2:43 PM by thatJeffSmith-Oracle

    DB Authentication for a  pool-specific config file

    Pierre Yotti



      I have created a mapping URL to access my DB schema procedure with url.  It works great. Here is an overview.





      Now i enable DB authentication. Because i want that the user login before using the app. I added :

      <entry key="jdbc.auth.enabled">true</entry>

      in the pool config file my_schema.xml in ORDS config file



      Calling http://localhost:8080/ords/my_schema/sample_pkg.my_procedure  The login box is not displayed.


      But i adding <entry key="jdbc.auth.enabled">true</entry> in /u01/ords/conf/ords/defaults.xml and calling my url like this http://localhost:8080/ords/sample_pkg.my_procedure  it show the login Page and i can login with DB user/pass and see the App.

      I need to have the DB Authentication for that url http://localhost:8080/ords/my_schema/sample_pkg.my_procedure


      Any idea?




      Pierre Yotti

        • 1. Re: DB Authentication for a  pool-specific config file

          Hi Pierre


          How about making prehook function for separate ords and placing e.g. dbms_session.set_identifier(my_schema);   - it seems that it is good idea to make log-table for the prehook functions actions, so it is easier to verify how far it got.

          When the prehook then fails and log file transaction rollbacks (inspect seq last nr) for mysterical e.g. jdbc error then got hint that trc-trace files could indicate what happens and how far the prehook marched.


          btw. cool looking rest api

          related :                 procedure.rest.preHook, create/attach ras session for sso user ?            

          rgrds Paavo

          • 2. Re: DB Authentication for a  pool-specific config file

            It's working for me in 19.4, here's what I did:


            Created a new PDB (pdb2)

            Created a new user in pdb2 - pdb2_jeff


            java -jar ords.war setup --database pdb2

            java -jar ords.war map-url --type base-path /pdb2 pdb2


            then i rest enabled pdb_jeff

            then i created a new table in pdb2_jeff (untappd)

            I rest enabled this table secured it


            then i tried to access the table in my browser, was told i was unauthorized

            tried to login and auth via my DB credentials



            stopped ords

            added this line to my pdb2 pool config file

            <entry key="jdbc.auth.enabled">true</entry>


            restarted ords - see this for my pool


            020-02-03T14:35:09.428Z INFO   Configuration properties for: |pdb2|pu|










            then i edited my rest table priv, and added the 'SQL Developer' role


            then I went to my rest enabled table again, logged in as my database user with database password, and it works