You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Token introspection with grant_type password
#36939
Hi,
I need to use JWT introspection to verify the user has not logged out when performing critical operations. I ran into a strange issue - when I get a token with grant_type=client_credentials, I can then introspect the token using the same client without any issues and it shows active:true. However, when I create a token using the same client, but with grant_type=password (with username and password) and then try to introspect the token it returns, I alwas only get active:false no matter what.
I've tried adding view-users service account role (I've actually tried adding all of them) and the result is still the same. I've tried adding openid client scope, no change.
Any ideas?
Update:
I've setup a fresh new (local only) keycloak image, created a test realm and imported the client from the real Keycloak instance. Using that I was successful in creating both client credentials grant token and a password grant token and both introspected successfully as active:true. I don't know if it's safe to assume the issue would then be realm settings, not the particular client settings (like roles or permissions), but it might be a clue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I need to use JWT introspection to verify the user has not logged out when performing critical operations. I ran into a strange issue - when I get a token with
grant_type=client_credentials, I can then introspect the token using the same client without any issues and it showsactive:true. However, when I create a token using the same client, but withgrant_type=password(with username and password) and then try to introspect the token it returns, I alwas only getactive:falseno matter what.I've tried adding
view-usersservice account role (I've actually tried adding all of them) and the result is still the same. I've tried addingopenidclient scope, no change.Any ideas?
Update:
I've setup a fresh new (local only) keycloak image, created a test realm and imported the client from the real Keycloak instance. Using that I was successful in creating both client credentials grant token and a password grant token and both introspected successfully as
active:true. I don't know if it's safe to assume the issue would then be realm settings, not the particular client settings (like roles or permissions), but it might be a clue.All reactions