Skip to Main Content

ORDS, SODA & JSON in the Database

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!

setting up Privileged access for RESTful service APIs

user11430388Nov 25 2017 — edited Jan 6 2018

Hi,

We have Oarcle apex5.1 running on 12c database and Tomcat8.5 as the apache http server with ORDS 3.0

Our current need at work is create RESTful service API from SQL Workshop > RESTful services and create Privileged access to those APIs only to authorized users.

So i was able to create some APIs but i haven't been able to figure out to set up Required Privileges for an API.

I logged in to the INTERNAL workspace and saw an option to setup OAuth Client, but i haven't beeen able to figure it out either.

So as an example i am using the HR Restful service APIs that comes as a sample APIs with Oracle APEX5.1 and learning how to setup the highlighted section "Assign Privilege" as shown below is the screenshot below.

Also all the APIs have been created from the SQL workshop and not using PLSQL. and i would like to learn how to setup the privileges through the workshop if possible.

I believe i might have to setup OAuth client for the privileges to work, if then, would like to learn how to configure the OAuth client too.

Do we need to configure anything at the Tomcat server or do we need to setup some roles/privileges at the database for me to be able to assign a privilege for an API?

We already have a whitelist with the application. so can I configure such a way that different people from the whitelist will have access to different APIs based on the business need?

I would appreciate if someone can help me to set this up or at least point me to the correct documentation(s) i would need to set this up (for now i am ready up too many documentation and i am kind of getting confused).

Would appreciate your help a lot.

pastedImage_0.png

So i have created a privilege as shown below

pastedImage_1.png

and assigned this privilege for "Require Privilege" as shown below

pastedImage_3.png

and now as expected i am getting unauthorized page as shown below

pastedImage_0.png

But then the challenge is when i click on the sign in link, i don't get a sign on option but get 404 page

pastedImage_4.png

So my question is where and how do i enable this sign in option? so authorized users can sign in and be able to view the API results. And also where in APEX do we provide the authorized users.for each API?

Some more updates:

Here is what i see from turning on the debug....

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)

So from what i see, there is some authentication need to setup at the Tomcat Apache configuration for this module to be authorized.

How do i enable authentication at the Apache setting?

is this a setting that need to be enabled at the database too for this hr module i am trying to access?

Is this authorization setting need to do with this below entry in the defaults.xml file?

<entry key="security.requestValidationFunction">wwv_flow_epg_include_modules.authorize</entry>

Would really appreciate your help.

Thanks.

Philip.

Thanks.

Message was edited by: user11430388

Message was edited by: user11430388

Message was edited by: user11430388

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2018
Added on Nov 25 2017
2 comments
831 views