-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Extension point to limit the scopes granted to a token #218
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
Comments
Does this seem reasonable, @jgrandja? I can give this a try if it fits the overall design. |
Thanks for the details @metacubed. I agree that we do need the capability to restrict/reduce/add scopes and/or claims during the authorization process. I have captured this in #139 at a very high level:
Instead of a Would you mind logging the details in this ticket over to #139 and close this one? I'd like to have all the information captured there. Before we start work on a Policy Enforcement abstraction, some R&D work needs to be performed on existing providers to understand how they have implemented. Would you be interested in doing some R&D so we can learn more on what design would work best? |
Thanks @metacubed. I just realized that the recently added A Follow the conversation in this thread to see examples on how to customize a Please let me know if this works for your use case. |
When a token is generated for either client- or user-based grants, it would be useful to provide a generic mechanism to reduce++ the scopes which are present in the granted JWT.
The list of granted scopes starts with those available to the client. This list can be reduced by many different kinds of constraints. These are just a few examples (not an exhaustive list):
scope
claim in the token request (Scopes for Claims and The claims Request Parameter #212)I would propose injecting a chain of
TokenScopeCustomizer
implementations, which take in the initial token request and the initial granted list of scopes, and returning a subset of those scopes at the end of the chain.++ I think it is reasonable to only reduce the available scopes, not add to them. However, it might turn out that there are use cases for both.
The text was updated successfully, but these errors were encountered: