keycloak - how to get current user password or store encrypted data?
23:29 08 Apr 2016

The java ee application (deployed to wildfly) stores sensitive data like access keys, etc. for different users in a DB. In order to decrypt these data - it needs a master password associated with the current user. A password entered when the user logs in to application is used for this.

Now I'm considering a possibility of using keycloak to secure this application. But it looks like there's no way to obtain a password for a currently logged in user with keycloak (as it operates with tokens)? Asking user to enter the password again in the application is not an option.

The question is - is it possible to configure keycloak to provide a constant (secret) value in a token for a current user which will not be stored unencrypted in the keycloak db?

jakarta-ee jboss wildfly keycloak