Reputation: 178
I am using keycloak for authentication for the application. I want to remove the realm access from JWT token generated by keycloak.
Upvotes: 2
Views: 2921
Reputation: 387
I think, it depends on your security policies exist in your software boundary or environment. We had a project that existing user or client roles inside JWT token introduced a major security issue by security analysts, although we had launched it many times in other critical environments.
By the way, some software frameworks do some proactive authorization checks by using roles coming inside JWT and so, make them mandatory for these kind of systems based their security design.
So to wrap it up,
Try enquiry security analysts of your deployment s environments about it.
Upvotes: -2
Reputation: 415
I may be wrong but I don't see this as a bad practice because the Token is signed. A client won't be able to change the content of the token payload without knowing your secret (The token signature would be false). Just be sure to check the token validity.
If you want to change the information provided in your token, you should have a look at the "Client Scope" section.
From there, you'll be able to change the content of your jwt token.
Upvotes: 2