By: Pek Templeton user 30 Mar 2017 at 8:45 a.m. CDT

2 Responses
Pek Templeton gravatar
Hello, After reading that [in the doc here](https://gluu.org/docs/ce/latest/admin-guide/uma/#scopes) >For some actions the Resource Server (RS) may want multiple scopes at the same time. For instance, a "read" action should only be allowed if the authorization request includes the "read" **and** "all" scopes. I tried to do it with oxd (commit version 9941510157c6a9fe48c2c1fd3a027581c1e21312) but I found out that when RS check access is done, it is only necessary for the user to have granted a unique scope in the list of scope of the ressource set. ``` [RsCheckAccessOpenration:98] boolean containsAny = !Collections.disjoint(requiredScopes, permission.getScopes()); ``` I don't think that I would need such feature but I wanted to know if it was normal and the doc was wrong or is it just a lack of oxd? I re-thought about it and is it even possible to allow such feature without breaking the current way of working? I mean by that, that I think the only way to achieve this without adding additionnal info to the ressource set is to allow the registration (which is already possible) but also the proccess of all the resource sets containing the same path and http_methods(in contrary for now to process the first registered set). Thanks for your support, Pek Templeton

By Yuriy Zabrovarnyy staff 30 Mar 2017 at 9:18 a.m. CDT

Yuriy Zabrovarnyy gravatar
Hi Pek, oxd sticks to `or` rule. RS can use oxd to protect resources with `or` rule. In case `and` rule is needed it can be archived with additional scope, for example: ``` Resource1 scopes: "read", "write". Resource2 scopes: "read_write" (and associate "read" and "write" policies with "read_write" scope) ``` Of course for given `/path` and `http` method for AND rule only Resource2 should be registered. Thanks, Yuriy

By Pek Templeton user 30 Mar 2017 at 10:30 a.m. CDT

Pek Templeton gravatar
It completely respond to my wonderings. Thanks for your quick answer. I close the ticket. Have a good day, Pek