Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Get login credentials from Keycloak accessToken

Is there a way I can retrieve the login credentials from the access token? I can see with a decoder that there is the username, but I cannot see the password (I wound expect to find it there encoded?).

Can I somehow set that I want this information in the token?

"scope": "openid email profile ClientScope",
  "sid": "xxx",
  "persId": "xxx",
  "email_verified": true,
  "name": "username",
  "groups": [],
  "Roles": [
    "xxx",
    "offline_access",
    "default-roles-xxx",
    "xxx_authorization"
  ],
  "preferred_username": "xxx",
  "given_name": "xxx",
  "email": "xxx@yyyy"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No serious identity and access management system will ever reveal the password. And Keycloak is a serious one.

In addition, no serious identity and access management will store a password such that it can be recovered in clear text. Only a hash value of the password will be stored.

And if the password was part of the access token, it would break the overall security concept, which restricts the user credentials to the identity and access management system and issues access token to applications that are considerably less trust-worthy. (Image an application using Facebook or Google social login getting an access token with your password!)

Whatever you are trying to achieve, you need to take a different approach.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading