Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keycloak cookies : KEYCLOAK_SESSION,Oauth_token_request_state, KEYCLOAK_IDENTITY

Can someone please explain the cookies set by Keycloak: KEYCLOAK_SESSION,Oauth_token_request_state, KEYCLOAK_IDENTITY.

What is the relevance of each cookies?

like image 302
siddhartha chakraborty Avatar asked May 29 '18 17:05

siddhartha chakraborty


People also ask

What is Keycloak_session cookie?

They are cookies for internal use of Keycloak. KEYCLOAK_IDENTITY contains a token (JWT) with the user ids. You can view its content using jwt.io (for example). This cookie lives with your browser session and can also be refreshed with SSO. (

What is KEYCLOAK_ session?

pbattino The KEYCLOAK_SESSION cookie basically implies that there might be an active session in Keycloak – which does not mean the session is active in browser as well which is represented by KEYCLOAK_IDENTITY, therefore independent on KEYCLOAK_SESSION.

What is Kc_restart?

I was going through Keycloak cookies, and specifically on KC_RESTART. While reading on link : Keycloak Authentication flow found that KC_RESTART will be used to re-create authentication flow when browser root session is expired.


1 Answers

They are cookies for internal use of Keycloak.

KEYCLOAK_IDENTITY contains a token (JWT) with the user ids. You can view its content using jwt.io (for example). This cookie lives with your browser session and can also be refreshed with SSO. (for example, if you change some of your personal data in the "Manage my account")

KEYCLOAK_SESSION your session id associated to the concerned realm.

Oauth_token_request_state is part of the Oauth spec in order to avoid hacking of the redirect link after login

like image 50
antoine Avatar answered Sep 19 '22 13:09

antoine