-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear documentation on the use of wildcard scope in Camara #184
Comments
@bigludo7 @PedroDiez @hdamker @rartych As discussed in the subscription discussion call, created the issue |
I think wildcard-scopes are in conflict with security principles One of the original use cases of oauth2 is the "valet key" - As a user you want to give the valet exactly just enough control over your resources that is needed. A mother-of-all-access-token is too dangerous. Especially because Camara does not have sender-constraint access tokens. |
Tagging some of the ICM WG participants @jpengar @Elisabeth-Ericsson @palmerabollo for feedback. |
Hi @shilpa-padgaonkar , Focusing into that point, not pretty sure but I’d say that we should not mandate to include the scope referring to all the API endpoints in the yaml. For two reasons:
Alternatively the discussion could then be whether it is interesting to have a scope shared by every endpoint of each API, and to document that in guidelines. Regarding this, I think it’s an interesting approach but maybe only makes sense in certain APIs. Also we may find scenarios where it is interesting to have a scope shared by a sub-set of endpoints. Regarding @AxelNennker comments:
|
@diegogonmar There was no intention to undermine any work/agreement from ICM, but to document things clearly in design guidelines and remove any ambiguity. IMHO wildcard scope since documented only in context of the purpose topic in icm document, gave an impression that it was only allowed/agreed in that context. I would propose to document the wildcard scope and its naming convention in the design guideline. Let's also see what feedback we get from other participants regarding adding it in the API specs. BTW, if you have a better word for wildcard scope, please feel free to suggest. Also, if you could explain your below text with some example, would be very helpful Alternatively, the discussion could then be whether it is interesting to have a scope shared by every endpoint of each API, and to document that in guidelines. Regarding this, I think it’s an interesting approach, but maybe only makes sense in certain APIs. Also we may find scenarios where it is interesting to have a scope shared by a sub-set of endpoints. |
@diegogonmar the Least Privilege is in danger because I fear that clients are going to always request all scopes even when they need only one of the scopes. Elisabeth already mentioned the Android guideline that Android applications should request the permission they need in that moment and explain it then to the user and gracefully handle consent being denied. Many IT security system went through the same evolution of their permission system. Today it is frowned upon if you remotely login as root. The same with Windows, today an admin uses their personal account and then get admin privileges when they need them. Superuser/admin access still exists but the credentials are usually kept in a safe. If a Camara client really wants to request all scopes they can do that. I think it is a good security practice to avoid handing out master keys. If the Camara API is simple e.g. two scopes and four endpoints, and all endpoints are equally in the sense of privacy and security, then scope = API-Name is harmless. But even for simple APIs one endpoint might reveal too much user info. I think we should not make it too easy to request too many scopes. Having said the above, it makes sense to "group" some scopes in the sense that if the client requests one scope the AZ grants two or more. I would not be happy with scope but I think some grouping makes sense. |
Thanks, my comment was expressing that if thinking about purpose, there was no special need to reflect in commonalities as inclusion in .yaml or not of the api-name as scope value was not so relevant with the existing purpose approach. But, speaking in general, having the rule to 'name' an scope giving access to every endpoint by using the api-name as naming rule, could be fine. Regarding the example you request: in QoD API there are endpoints to handle QoD sessions (read,create,get,delete), then an endpoint to retrieve existing profiles. I'd say that it would make sense to group CRUD operations in a single scope manage-sessions, but maybe retrieve profiles is a different thing. So in this API it makes sense to have an scope to manage-sessions covering every endpoint except the one to retrieve the profiles. Maybe this is not the best example because API is now being splitted :-). Maybe these scenarios are only theoretical and when this happens means that API has to be splitted, so I'd go case by case. |
Clients will have to request those permissions they can be granted, if they request others those will be rejected. The situation does not change whether we simplify life to developers defining scopes that group access to several endpoints (when it makes sense), or we don't do that. |
Hello As you know we have dedicated yaml to manage subscription request for a set of 'close' event (in sim swap, device location, etc.) For example for roaming api we'll have following scope regarding the event subscription - these ones target the line subscriber
but we have also scope for managing the subscription itself management for DELETE and GET - these ones target the subscription owners
Do you think the wildcard scope is also relevant for notification subscription API? I found this a bit 'odd' to mix all these in one wildcard request. |
After reading through the comments I see three points:
After the split of the API into |
Yes, for me it would make sense to have a single scope to delete or read any of your owned subscriptions, that could be of different events, depending on the scopes you have to create subscriptions, e.g. roaming-status, roaming-on... |
There are two aspects actually, the use of wildcard-scope as defined in ICM (wildcard is not part of .yaml, it's a concept related with purpose handling) and the inclusion of such scope in the .yaml, being discussed here. |
I think wildcard scopes aka I think what if a API subproject wants to support
A client can now request a authorization code for the scope I think the above is valid openapi yaml and the meaning is that one of the security objects must be satisfied. This scheme is not limited to The OAI spec states:
So, maybe Camara does not need wildcard scopes because this can be specified in the API's openapi yaml file. |
Problem description
The current API design guidelines in section 11.6 points to CAMARA-API-access-and-user-consent.md doc in ICM WG to follow security guidelines and then goes in detail to describe scope-naming in section 11.6.1.
We do not explicitly document in design guidelines if Camara supports the use of wildcard scope (to represent "all scopes included case") in addition to the usual granular scopes. This is only documented in the applying-purpose-concept-section of the CAMARA-API-access-and-user-consent.md document.
We need to clearly document if we support the use of wildcard scope in Camara and add this in the design guidelines and if there is a decision to support wildcard scope, the naming convention for such a wildcard scope has to be documented in design guidelines. Every subproject needs to also add this within the spec file so that we do not have a situation where some providers support it and some not.
Expected action
Get a consensus in commonalities on the support of wildcard scopes in Camara and if we agree to support this, it should be clearly documented in design guidelines and the individual API spec files.
Additional context
This also impacts Subscription-Issue4: Need to change the scope pattern for explicit subscriptions #163
The current PR in ICM which deals with the Camara OIDC Profile mentions the scope parameter and says that it should follow the API spec file listed scopes and this would mean that if we support wildcard scope, it has to make its way into the spec file https://github.com/camaraproject/IdentityAndConsentManagement/blob/a97ffae7ffa091796bbde424428b660fe7418330/documentation/CAMARA-Security-Interoperability.md#the-scope-parameter
The text was updated successfully, but these errors were encountered: