Keycloak

Keycloak

Keycloak is an open-source identity and access management platform maintained by Red Hat. Its scripts handle single sign-on authentication, session management, and OAuth token handling, setting cookies to maintain user login state and authorization across web applications.

Overview

Keycloak is an open-source identity and access management platform, primarily maintained by Red Hat and widely deployed by enterprises and developers as a self-hosted or cloud-managed SSO solution. When a web application integrates Keycloak for authentication, the Keycloak JavaScript adapter runs in the browser to manage login flows, session state, and token lifecycle. Its presence on a website indicates that Keycloak is the identity provider for that application.

What This Script Does

Keycloak's browser-side adapter (keycloak.js or keycloak.min.js), served from the Keycloak server domain, handles OpenID Connect and OAuth 2.0 flows in the browser. It manages redirect-based login sequences, receives authorization codes and tokens after authentication, and stores tokens in memory or sessionStorage / localStorage depending on configuration.

Keycloak sets several cookies at the authentication server domain:

  • KEYCLOAK_SESSION — a session identifier cookie, HttpOnly, scoped to the Keycloak server domain, with expiry matching the SSO session lifetime (typically hours to days)
  • KEYCLOAK_IDENTITY — an identity token cookie, similarly scoped and HttpOnly
  • AUTH_SESSION_ID — used during the login flow to maintain state across redirects; typically session-scoped

These cookies are set on the Keycloak server's domain (e.g., auth.example.com), not the application domain directly. The adapter makes requests to Keycloak's token and userinfo endpoints to validate sessions and refresh access tokens transparently.

No advertising data, behavioral analytics, or third-party sharing occurs. The adapter's sole purpose is authentication and session maintenance for the specific application.

Consent & Compliance

Keycloak falls squarely in the essential category. Authentication cookies are explicitly exempt from ePrivacy consent requirements under the "strictly necessary" exception — they are required to deliver the service the user has actively requested (logging in). Without these cookies and the associated script, the user cannot authenticate.

Under GDPR, the lawful basis for processing authentication data is contract (Article 6(1)(b)) — processing is necessary to perform the service the user has signed up for. No separate consent is needed for authentication session management.

Under CCPA/CPRA, authentication data is generally not subject to opt-out rights because it is not sold or shared and is necessary for service delivery. Operators deploying self-hosted Keycloak process data on their own infrastructure; those using cloud-hosted Keycloak (e.g., Red Hat SSO or third-party Keycloak hosting) should execute a DPA with the hosting provider.

Should You Block This Without Consent?

No. Keycloak scripts and cookies are strictly necessary authentication infrastructure. Blocking them would prevent users from logging into the application — a functional outcome that violates the basic service contract. They are exempt from ePrivacy consent requirements and should be categorized as essential, always-on scripts.

Is Keycloak GDPR compliant?

Keycloak typically loads functional trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Keycloak can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Keycloak, not on Keycloak itself.

Visit website

Consent Categories

Also Known As

keycloakkeycloak ssoopen source identitykeycloak oauthkeycloak authentication consent

Industries

Computers Electronics and TechnologyProgramming and Developer SoftwareBusiness and Consumer ServicesScience and Education

Tracked Domains (1)

keycloak.orgEssential

keycloak.org is an essential domain operated by Keycloak, used to keep the site working, including security, load balancing, and sessions.

Frequently Asked Questions

Related Vendors

Absorb LMS
Absorb LMS
Absorb LMS is a cloud-based learning management system. Its scripts serve course content, track learner progress, and manage authentication for training portals. They set session and authentication cookies, store completion state in browser storage, and transmit learner activity data to Absorb servers.
Livestorm
Livestorm
Livestorm is a video engagement platform for webinars, virtual events, and online meetings. Its scripts embed event registration widgets and video players on web pages, set cookies to track attendee engagement, and make requests to Livestorm servers to manage registrations and stream content.
Didomi
Didomi
Didomi is a consent management platform and privacy compliance solution for enterprise publishers and brands. Scripts serve customizable consent UIs compliant with GDPR, CCPA, and IAB TCF standards, and pass consent signals to connected advertising and analytics vendors. Consent data is logged and accessible via API for downstream compliance reporting.
Ketch
Ketch
Ketch is a privacy and consent management platform. Its scripts render consent banners and preference centers on web pages, store user consent choices in cookies, and orchestrate the firing or blocking of third-party tags and tracking scripts based on the visitor's consent selections.
Secure Privacy
Secure Privacy
Secure Privacy is a consent management platform providing GDPR, CCPA, and ePrivacy compliance tools. Scripts display cookie consent banners, perform automatic cookie scanning, and block non-consented tracking scripts. Consent logs are maintained per visitor for regulatory audit trails.
Termly
Termly
Termly is a privacy compliance platform for generating privacy policies, cookie policies, and consent banners. Scripts display customizable consent banners on websites and record visitor consent choices. The platform auto-generates compliant legal documents based on jurisdiction and data collection practices.

Manage consent for Keycloak

ConsentStack automatically detects and manages Keycloak trackers so your site stays compliant with global privacy regulations.