Issuing JWT with different roles and claims and permission and scope #1170
-
Hello, Would it be possible for Kratos to issue JWT with different roles and claims and permission and scope? The use case here is we have multiple bank accounts for one user. For each of the account, the user can have different role and thus permission. We also want to issue token with limited scope for the use of open banking, for example. How can we customise Krato to allow for that? If we definitely want to bundle authentication and authorisation in one login call, can Krato be wired our domain services and do the permission lookup easily? Thank you! Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @andrewkkchan, Thanks for reaching out 😄 So each bank account is linked to a singular user profile? I believe what you're asking for is a Kratos + Keto use case. To do a lookup on if user bob has specific permission x, you can do it through Oathkeeper + Keto. Kratos only does user management and the user session. |
Beta Was this translation helpful? Give feedback.
-
Hey @andrewkkchan , Thanks a ton! 🐝 |
Beta Was this translation helpful? Give feedback.
Hi @andrewkkchan,
Thanks for reaching out 😄
So each bank account is linked to a singular user profile?
Or are you saying the user creates a new username+password for each bank account under the same user details like their unique identification number?
I believe what you're asking for is a Kratos + Keto use case. To do a lookup on if user bob has specific permission x, you can do it through Oathkeeper + Keto. Kratos only does user management and the user session.