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!

oauth.create_client and oauth.update_client does not work with multiple privilege names

Erik RaetzDec 4 2015 — edited Dec 8 2015

For our REST services we set up a number of privileges.

Each privilege is set for a number of roles.

We kind of have the same problem as described here: OAUTH Client with more than one privilege

The OAuth package documentation (pdf) differs from the oauth package spec in the database.

We are running ORDS 3.0.2.294.08.40 on Oracle Standard Edition 12.1.0.2.0.

Test cases that run into issues:

Create:

Runs into exception because the privilege name table is not extended.

begin  oauth.create_client(

      p_name => 'oauth shop',

      p_grant_type => 'client_credentials',

      p_privilege_names => 'shop,test',

      p_support_email => 'your@email.com');

end;

Update1:

Runs into no exception but does nothing.

declare

  l_privileges t_ords_vchar_tab := t_ords_vchar_tab();

begin

  l_privileges.EXTEND(2);

  l_privileges(1) := 'shop';

  l_privileges(2) := 'test';

  oauth.update_client(

      p_name => 'oauth shop',

      p_owner => 'YOUROWNER',

      p_description => NULL,

      p_redirect_uri => NULL,

      p_grant_type => 'client_credentials',

      p_privilege_names => l_privileges);

end;

Update2:

Runs into exception because the privilege name table is not extended.

begin

  oauth.update_client(

      p_client_id => 10626,   

      p_name => 'oauth shop',

      p_editing_user => 'Editing User',

      p_allowed_origins => NULL,

      p_description => NULL,

      p_redirect_uri => NULL,

      p_support_email => 'your@email.com',

      p_support_uri => NULL,

      p_priv_names => 'shop,test');

end;

oauth.rename_client does not work aswell.

It does nothing.

We could not work around the issue by only using one privilege per client because there is a unique key constraint on uri patterns like '/shop/*' per ords enabled schema.

That way it is impossible to create multiple privileges (each for a certain role) accessing the same uri pattern.

Is that a known issue?

This post has been answered by Erik Raetz on Dec 8 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 5 2016
Added on Dec 4 2015
3 comments
1,576 views