-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add Custom Claims to JWT tokens. #111
Comments
There's currently no way for the app to inject data into AuthN's authentication process. Can you say more about your use case? I prefer to check permissions on each request, so I don't personally have established patterns to recommend. |
Hi, I'm considering using Open Policy Agent as an authorization agent for microservices. When microservice receives API request I can just forward that request to OPA and it makes the authorization decision. Such an approach requires to distribute Roles information to each OPA agent also attach User roles list to each request. JWT work nicely in such case because I can just attach a list of roles to JWT token as custom claims. |
related: #114 |
Apologies for not following up sooner. I'm not sure where to go with this yet. My understanding of this proposal is that AuthN could save your Open Policy Agent a network request by including static roles in the identity token. Is that accurate? When I try to generalize this solution to a broad number of use cases, I wonder:
|
This is an incomplete list of flaws in the currently documented approach. Each could compromise your system:
|
|
Hi, I wonder is it possible to add custom claims to JWT tokens. I want to attach user roles list to JWT token when user is authenticated.
The text was updated successfully, but these errors were encountered: