OAuth.create_client and oauth.update_client does not work with several names of privilege

For our REST services we have implemented a number of privileges.

Each right is defined for a number of roles.

So, we have the same problem as described here: Client OAUTH with more of a privilege

Documentation of OAuth (pdf) package differs from oauth package specification in the database.

We run on Oracle Standard Edition 12.1.0.2.0 3.0.2.294.08.40 ADR.

Test cases running in questions:

Create:

Meets the exception, because the privilege name table is not extended.

Start (oauth.create_client)

p_name = > 'oauth shop. "

p_grant_type = > 'client_credentials ',.

p_privilege_names = > ' shop, test,

p_support_email = > ' mailto:[email protected] ');

end;

Update1:

Meets no exception, but does nothing.

declare

l_privileges t_ords_vchar_tab: = t_ords_vchar_tab();

Start

l_privileges. EXTEND (2);

l_privileges (1): = 'unique ';

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:

Meets the exception, because the privilege name table is not extended.

Start

() OAuth.update_client

p_client_id = > 10626,

p_name = > 'oauth shop. "

p_editing_user = > "Change user"

p_allowed_origins = > NULL,

p_description = > NULL,

p_redirect_uri = > NULL,

p_support_email = > ' mailto:[email protected] ',

p_support_uri = > NULL,

p_priv_names = > ' shop, test ");

end;

OAuth.rename_client does not work that way.

It doesn't do anything.

We could not work around the problem by using only a privilege by client because there is a unique uri models as key constraint ' / shop / *' ADR on the scheme.

In this way it is impossible to create multiple privileges (each for a certain role) access to the same uri scheme.

Is this a known issue?

After some trial and error, we found a solution to our problem!

According to the documentation, you will need to define a privilege name when you create a customer. But OAuth clients who obtain access through access client identifying information flow do not need privileges. Thus, we create customers with privilege names set to NULL now.

What we do is to grant to the customer a specific role that is defined for specific privileges.

Here are the reasons why we didn't get the question earlier. The token you generate a client is linked to the privileges given to the customer at the time that the token is generated.

We have updated privileges customer and used the same token expect a different result, which was not the case. The rights are tied to the token on the creation of a token.

We found out about it today and tested two-legged oauth clients (with a flow rate of access client_credential) with no particular privileges and only granted roles. Given that the roles granted privileges everything works as expected.

Still leaves the ORA-error when providing separated by commas in the names of privilege to oauth.create_client and oauth.update_client.

But our problem is solved.

For completion. Here's a sample script that solves our problem:

-create roles

begin ords.create_role ('role.shop'); end;

begin ords.create_role ('role.test'); end;

-Create privileges of the shop, models and roles

declare

l_roles owa.vc_arr;

l_patterns owa.vc_arr;

Start

l_roles (1): = "role.shop";

l_roles (2): = "role.test";

l_patterns (1): = ' / shop/pk / *';

l_patterns (2): = ' / shop/gk / *';

() ords.define_privilege

p_privilege_name-online "priv.shop."

p_roles-online l_roles,

p_patterns-online l_patterns,

p_label-online 'Shop Privilèges',

p_description-online 'Shop Privilèges'

);

end;

-create test templates and roles privileges

declare

l_roles owa.vc_arr;

l_patterns owa.vc_arr;

Start

l_roles (1): = "role.test";

l_patterns (1): = ' / test / *';

() ords.define_privilege

p_privilege_name-online "priv.test."

p_roles-online l_roles,

p_patterns-online l_patterns,

p_label-online 'Privileges of Test',

p_description-online "Test Prileges"

);

end;

-create customer shop

Start

() OAuth.create_client

p_name-online "oauth.shop."

p_grant_type-online "client_credentials."

p_privilege_names => NULL,

p_support_email => ' mailto:[email protected]'

);

end;

-create customer test

Start

() OAuth.create_client

p_name-online "oauth.test."

p_grant_type-online "client_credentials."

p_privilege_names => NULL,

p_support_email => ' mailto:[email protected]'

);

end;

-to grant client roles

begin oauth.grant_client_role ('oauth.shop', 'role.shop'); end;

begin oauth.grant_client_role ('oauth.test', 'role.test'); end;

commit;

After doing that the access token for the client oauth.test and has access to

-/ Shop/pk / *.

-/ Shop/gk / *.

-/ test / *.

The access to the oauth.shop client token has access to

-/ Shop/pk / *.

-/ Shop/gk / *.

Tags: Database

Similar Questions

  • Satellite L305D-S5895 - keys to functions and the wifi does not work with Win XP

    Hello

    first sorry for my English

    I bought a Toshiba Satellite l305d s5895, with Windows XP, I need a software, but the function keys does not work.
    So I need a driver, but I can't, and wireless internet does not work.

    > Where could it find special XP BIOS?
    In my opinion, there is problem because most threads here are on the European laptop models. then come to question United States. Toshiba Europe and Toshiba U.S. do not work together and each of them is responsible for own models and provide support for specific country notebooks models.

    For most models, so here in Europe Toshiba has offered two BIOS. We were already on the delivered Vista laptops. The Toshiba page download available BIOS for Windows XP Home edition. in most cases, it was version 5. XX and this BIOS was designed to support public services and specific tools of Toshiba. For example, all the FN key features was only available with this BIOS WXP.

    So if any of you have laptop model US they would see how the solution with Toshiba U.S. or US forum under http://community.compuserve.com/n/pfx/forum.aspx?webtag=ws-laptop&redirCnt=1

    Bye and good luck!

  • I updated my Apple ID, but only old man keeps coming up when I try and make updates, and my password does not work with the old id.  Can anyone help?

    I updated my Apple ID, but only old man always appears when I try to update my password does not work with the old id.  Can anyone help?

    You can try to log in to your old account and then sign in with the ID again.  Your applications will be always related to the original account - you must use the old account to update.

  • 27xi and web printing does not work with Firefox

    I just bought this HP 27xi monitor to Costco and thinking about buying another soon.

    I use Firefox and went to print this web page I printed before using my HP monitor HP desktop computers and smaller and had no problem. Last night, I try to print to the top of the same page, and it's a big mess. I try to use the shrink to fit. I try to lower less than 50% and then the information move from one line to the other, so it makes no sense.

    Costo Consierge told me I need to try a different browser such as Internet Explorer to see if that helps. My Firefox is updated. My MS OS Win & Pro is up to date. My MS Office 2013 is up-to-date and all recently reinstalled. I installed the driver appropriate for this monitor and made sure it was updated on HP site. My printer is newer HP 8600 and its drivers are up-to-date. I checked all my drivers for my CPU and they are all up to date.

    So, is there no good drivers for this monitor for Firefox and Windows 7 Pro and I have to come back to IE?

    I was able to track down someone who pointed me in the right direction. The problem is that Firefox does not come with the correct drivers for this monitor. Then I went to Mozilla and found a card that worked.  What you should look for is a WYSIWYG editor or you see is what you will receive. Then plug this term the site of Mozilla and up will pop up from some of these publishers. I used the Xinha, which was the most popular downloaded.

    https://addons.Mozilla.org/en-us/Firefox/collections/nfroidure/WYSIWYG/

    I don't have to go back to IE now even if Costco concierge recommended I do this. How lame is that? The guy at the store Costco knew that more that the tech support team.

    I love this monitor and plan to buy another and another cpu but would never buy directly from HP again with the return policy only 20 days. Buy a 8700 Dell with Win 7 Pro at Costco because none of the HP machines have 7 Pro on them. MS has announced today that they will offer Win8 upgrades for free with Bing channels. They now can only give it since nobody wants.

  • My Norton anti-virus software used to work and now it does not work with the new Firefox update. This corrected soon? Otherwise, I will not use the product

    Since your last update that my Norton toolbar will not work... If it does not work, will not use your product. Can it be fixed quickly?

    According to the article, I linked to before, you will need to update the norton version 2015.2.1.13 toolbar that is compatible.

  • 'snapshotmanager.pl' and 'vmsnapshot.pl' does not work with '-flag of the powerstatus?

    I tried to capture the snapshot of a virtual machine under tension using the perl VI unit. I'm unable to capture State power of the virtual machine. Is this a bug? or I am missing something here. Please see the community link for my previous posts below.

    Command-line ESX to list the available snapshots and VM also return a specific snapshot

    Hello

    The '-indicator for powerstatus in scripts 'snapshotmanager.pl' and 'vmsnapshot.pl' is used for filtration or select which virtual machines with the specific power state (receiving or poweredOff). The definition of this indicator does not determine that the snapshot will capture the power over the State of the Virtual Machine.

    These perl scripts, delivered with RCLI, use VI APIs to interact with the server. When creating the snapshot, the API of VI "CreateSnapshot" is used. Please refer to the CreateSnapshot_Task method in the following link:

    http://pubs.VMware.com/vi301/SDK/ReferenceGuide/Vim.virtualmachine.html

    This method takes the following parameters:

    Name (String)

    Description (string)

    memory (boolean)

    suspend (boolean)

    In the settings above, passing the 'memory' as true parameter will seize the State of the lighting of the virtual machine. Goes the same for the setting of "suspend." The scripts 'snapshotmanager.pl' and 'vmsnapshot.pl' pass the value of these parameters as false.

    The snapshotmanager.pl updated the setting 'memory' and 'suspend' is added as a true. Run this example will capture the poweron State and suspend the true value.

    > $_-> CreateSnapshot (name = > $snapshot_name,)

    > description = > "Snapshot created for the Virtual Machine. $_-> name,.

    > memory = > 1,

    (> pause = > 1);

    Hope this helps you resolve your query.

    Neha

  • Speech recognition in Windows 7 does not work with several sentences

    I use speech recognition with Windows 7 and Word 2010. In the past, it worked fine, but now it has developed several questions:

    1. When I say 'OK _', he responds with "this command is not available now.
    2. When I insert a period at the end of a sentence, it puts a space between the last word and the period.
    3. When I say "He went out", he responds with "this command is not available now.

    The only change I made is the upgrade to Office 2010, but I have Office 2010 on my laptop and it works fine there.

    Is there a way to fix the voice recognition program?

    I'm having the same problem.  Windows Speech recognition (WSR) IS NOT playing well with Office 2010.  A very disappointing setback because it appears to praise them to the improvement of the accessibility features THAT WSR will not dictate in Word 2010 without having to accept the text in the window on the other.  Very slow process is the result of the incompatibility and effectively stops to dictate.  :-(

    I have exactly the same problem, Word 2010 (32 bit on 64 bit systems) leaves me only the replacement window allows you to dictate text and many features learned during the training now work well in this mode.

    It really does not need speech recognition. However, there is no problem using the dictation in Internet Explore.

    To fix this (remove the dialog box) right-click on the translation of the speech tool, then go to options, then uncheck the "enable dictation Notepad '.

  • _root.gotoAndPlay inside a clip does not work with several scenes

    Hello
    My site is running when I decided to add a preloader, which I placed it in a new scene before the real site.
    Now, I noticed that all my buttons are broken.
    After some research I discovered a button with _root.gotoAndStop (5) inside a movieclip (and there are many of them in my site) no longer works because there are several scenes.
    Is this a bug or is there a workaround? (I use Flash MX 2004)

    This file can illustrate the problem.
    Download example
    Thank you

    It's not a bug - it is preventable by doing two things:

    do not use _root

    referencing of images using labels (whatever the scene, they are in!)

  • just installed norton 2012 'web safe' does not work with firefox

    I just installed Norton I / S 2012, bar tools Norton safe web and identity safe does not work with Firefox 7.0.1, but it DOES not work with my internet explore, what is wrong?

    All first please update your browser Firefox 8

    go to the Firefox button or Tools-Addons-extension and check if the extension of Norton is deactivate or activate

  • Just updated to IOS 10 and replace text does not work

    Just updated to IOS 10 and replace text does not work.  For example typing in omg should show oh my God. Has anyone else got this?

    I did the old thing: Disconnect to iCloud and sign back in. Unfortunately, he did not turn. The same thing happened on my iMac when upgrading to Mac OS Sierra - I lost all my text replacement. I also did Disconnect from iCloud and inback Panel . Unfortunately, it also didn't do the trick. Anyone know how to restore the replacement text. It is not has resided in the cloud?

  • I can't log in to my account to Mozilla, and Password Reset does not work.

    I have an account to create themes and Mozilla Add-ons, but now it seems inactive,
    and password reset does not work. Here is one of my themes:
    https://addons.Mozilla.org/en-us/Firefox/addon/Fox-December/
    my email: [email protected]

    Support for the site Add - ons are here:
    https://discourse.Mozilla-community.org/c/Add-ons

  • My Inbox to view the sender for each message and now it does not work... How do I get it back to where it was?

    My Inbox to view the sender for each message and now it does not work... How do I get it back to where it was?

    Right-click on the header at the top of the list of messages and select from the list of options.

  • Downloaded the new firefox and it told me that it does not work with my software, how do I go back to my old version

    I have a mac 10.5.8 software. I downloaded moxilla firefox 24 and has replaced the old version to download. Then I got a message that firefox 24 does not work with my software. How to bring back the old version?

    Hello patcouse, if you want to stay with you older version of the OS, then firefox 16 is the last version available that will run in this environment. for a download link, please refer to the Firefox no longer works with Mac OS X 10.5 (at the end of the article).

  • The plus sign next to my tab stopped working: when I click on it nothing happens. I tried uninstalling and reinstalling and it still does not work.

    The sign + to add a new tab has suddenly stopped to work earlier. I tried uninstalling and reinstalling and it still does not work. What can happen and how to fix it?

    Hello

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • As some Menu items: Modules, Help Menu and Pocket Extension does not work after update to 17.0

    As some Menu items: Modules, Help Menu and Pocket Extension does not work after update to 17.0

    This may be caused by the Tab Mix Plus extension

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do not click on the reset button on the start safe mode window or make changes.

    You can try to install the latest Dev version of Tab Mix more if you use this extension.

    See the sticky on the forum of Tab Mix Plus:

Maybe you are looking for

  • How to transfer GPS coordinates from one film to the other using Applescript?

    When I export a movie from the Photos app and read it in Quicktime Player. QTP then gives me the location where the film was saved: Now, I would like to set the location of another movie in exactly in the same place, using Automator or Applescript. C

  • Monitor says out of range

    Monitor says out of range. also 91 khz frequency 85 Hz v... need of v to 75 Hz frequency. How can I do this?

  • DevCon downloads

    Hello world Yesterday I was downloading the DevCon content from the Web site: https://bdsc.webapps.blackberry.com/bdsc/landing.pg?lang=na#devcon , but today they have moved the content on the site of DevCon, but I can't. If someone knows the url that

  • Y at - it a Macro corresponding to the error code 80070043

    Hello While I use the function StgOpenStorageEx, it returns the error code 80070043. I don't know why he returned. But I can't find a macro for this error code just like the others, for example, "#define STG_E_INVALIDFUNCTION _HRESULT_TYPEDEF_ (0x800

  • Need to send workflow Notifications to multiple addresses

    HelloI need to send a workflow Notifications to multiple users messages and emails are getting picked up running. Please help me how can I achieve this? I also need to send notifications as well.Thank youGaétane