Skip to content
Back to skills

Keycloak Knowledge Patch

ASecurity

Keycloak

  • 25 stars
  • 0 votes
  • 1 copy
  • 10 views
  • Added September 5, 2026
developmentrustgojavanodeapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill keycloak-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Keycloak Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Keycloak Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-keycloak-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-keycloak-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: keycloak-knowledge-patch
description: Keycloak
version: "26.8.2"
license: MIT
metadata:
  author: Nevaberry
---



# Keycloak knowledge patch

Load this skill when configuring Keycloak authentication, token exchange,
identity brokering, organizations, administrative APIs, or server operations,
and when migrating clients, themes, extensions, storage, or deployments.
Use the topic references for complete conditions, examples, and release attribution.

## Reference index

| Reference | Topics |
| --- | --- |
| [Admin and Account APIs](references/admin-and-account-apis.md) | Client queries, account consent, delegated permissions, secrets, registration, workflows |
| [Authentication and Token Exchange](references/authentication-and-token-exchange.md) | Flow composition, WebAuthn, step-up, session limits, grants, standard and legacy exchange, delegation |
| [Identity, Brokering, and Organizations](references/identity-brokering-and-organizations.md) | Broker tokens, organization groups, profiles, LDAP, redirects, logout, SCIM, credentials, shared signals |
| [Client, Theme, and Extension Migrations](references/migration-clients-themes-and-extensions.md) | Removed APIs, scopes, token claims, themes, adapters, SPIs, events, federated clients |
| [Deployment and Storage Migrations](references/migration-deployment-and-storage.md) | Persistent sessions, clustering, schema changes, realm import, Operator lifecycle |
| [Server Configuration and Operations](references/server-configuration-and-operations.md) | Environment mapping, containers, readiness, TLS, FIPS, caches, metrics, outbound HTTP |

## Breaking changes and deprecations

### Removed and deprecated configuration

- Replace `--features=dynamic-scopes` with `--features=parameterized-scopes`.
  Migrate custom `ClientScopeModel` code to the `parameterized` methods and constants.
- Remove `--features=token-exchange-external-internal:v2` and use standard token exchange.
- Remove `spi-user-sessions--infinispan--use-batches` and
  `spi-user-sessions--infinispan--max-batch-size` from server configuration.
- Multi-cluster v1 (`--features=multi-site`) is deprecated in favor of
  `--features=stateless`; multi-cluster v2 and `stateless` are supported,
  and `stateless` is disabled by default.
- Volatile sessions, `clusterless`, and reliance on the route in the
  `AUTH_SESSION_ID` cookie for sticky sessions are deprecated.
  Deployments can opt out of session caching.
- **Full scope allowed**, legacy switches under **OpenID Connect Compatibility Modes**,
  and non-OIDC client registration providers are deprecated.
- The Realm Operator has reached end of life.

### Client, adapter, and extension migrations

In 26, replace logout `redirect_uri` with RP-Initiated Logout's
`post_logout_redirect_uri`; the legacy logout compatibility flags were removed.
Install `keycloak-js` with the application or self-host the ES module.
Use HTTPS or localhost, supply client configuration explicitly, and await
`login()`, `createLoginUrl()`, and `createRegisterUrl()`.

Custom providers must migrate away from the removed
`IdentityProviderModel.getOrganizationId()` as providers can link to multiple organizations.
26.8.0 stops storing client private keys in the database and deprecates
the endpoints that generate them. Newly generated client secrets require
storage that allows at least 86 characters, regardless of signing algorithm.

### Persistent sessions and optimized images

To preserve online sessions when moving to 26, first complete the migration
to database-backed sessions in 25. Version 26 clears caches when switching
to Infinispan Protostream; memory-only sessions are lost.
Persistent user and client idle timeouts no longer have the two-minute grace
period; add two minutes to the configured timeouts if that effective duration is needed.

Run `kc.sh build` before `start --optimized`. Rebuild if build-time settings
change: startup fails when a supplied build-time value differs from the image.
Build options persist in plaintext, including values from the Java KeyStore
configuration source; supply secrets such as `db-password` through runtime options.

### Scope and WebAuthn representation changes

Parameterized scope creation requires a type: `string`, `integer`, `boolean`,
`username`, or `custom` with an administrator-defined regex.
Replace regexp-only REST payloads with `parameterized.scope.type` and, for
`custom`, `parameterized.scope.regexp` without the scope-name prefix.
The `parameterized-scopes` feature is preview.

Use **Discoverable credential** with `required`, `preferred`, or `discouraged`
in WebAuthn or WebAuthn Passwordless Policy. **Require Discoverable Credential**
is deprecated; the references include the corresponding realm JSON field migration.

## Authentication and token exchange

### Standard exchange constraints

`token-exchange-standard:v2` is enabled on the server by default.
The same-realm confidential requester must enable **Standard token exchange**
and authenticate with its configured method. The subject access token must
list the requester in `aud` or have been issued to it; **Consent required**
clients need prior consent for all requested scopes.

`scope` adds optional scopes to the requester's defaults; `audience` filters
resulting audiences and client roles. Scopes with no client-role mappings survive
that filter. Repeat `audience` for multiple clients; every requested audience
must be available from the resolved scopes. V1 and V2 do not support `resource`.
By default, exchange can issue scopes and audiences absent from the subject token.
Use `downscope-assertion-grant-enforcer` to limit scopes to those already granted.

Only the original recipient can exchange a DPoP- or mTLS-bound subject token,
using a valid proof or matching certificate. A requester configured to receive
mTLS-bound access tokens must also supply the client certificate.
Refreshing an exchanged token fails if its audience client is disabled.
Tokens issued through token exchange have a finite expiration.

### Refresh tokens and delegation

Set **Allow refresh token in Standard Token Exchange** to **Same session**
and request `urn:ietf:params:oauth:token-type:refresh_token` to receive both tokens.
The user session must be online and non-transient; omit `offline_access`.
Revoking the exchange chain invalidates refresh tokens; exchanged access tokens
expire independently. See the reference for subject-token expiry and revocation details.

Token exchange delegation is preview and uses Fine-Grained Admin Permissions V2
exclusively for authorization. `delegation:client` lets users consent to a client
acting on their behalf; `act` identifies that client without granting Admin API access.
Standard token exchange rejects subject tokens carrying delegation claims.

For user delegation, use `delegation:user` with **Users → delegate** or
**Groups → delegate-members** and a policy selecting the permitted actor.

### Flow composition, passkeys, and step-up

A **Required** execution skips **Alternative** siblings at the same level.
Put alternatives in a separate subflow when another step must always run.
A **Conditional** subflow is **Required** only when all its conditions pass;
it is **Disabled** when any condition fails or it has no conditions.

**Browser - Conditional 2FA** skips 2FA after passwordless WebAuthn authentication.
Set the disabled **WebAuthn Authenticator** or **Recovery Authentication Code Form**
executions to **Alternative** to offer them to users with those credentials.
Order **Conditional - Level Of Authentication** subflows from lowest to highest;
the first configured level runs on a fresh login regardless of the requested level.
Keep levels cumulative and consistent across flows because SSO can reuse the recorded LoA.
The `step-up-authentication-saml` feature is supported.

## APIs, brokering, and organizations

### Client and Account APIs

Client Admin API v2 is preview: enable `--features=client-admin-api:v2`
or `--features=preview`. It provides declarative management and strict validation
for OIDC and SAML clients; the Operator client resources are also preview.
On `GET /admin/api/{realmName}/clients/v2`, `q` uses a subset of SCIM filter syntax
with case-sensitive strings. Invalid syntax, unregistered fields, and unsupported
operators return HTTP 400. `fields` projects the response after filtering.

Account profile metadata is included by default; `userProfileMetadata=false` omits it.
Account group membership is unpaginated and brief by default.
Consent reads distinguish an existing client without consent (204) from an unknown
public `clientId` (404). Consent `POST` and `PUT` both upsert; unknown or
parameterized scope IDs return HTTP 400.
The Admin API checks the audience of the access token.

### Broker tokens and organization access

Identity Brokering API V2 is supported and opt-in; deprecated V1 is enabled by default.
V2 uses authenticated confidential-client `POST` requests, **Allow retrieve external tokens**,
and an identity provider allowlist in place of per-user broker roles.
**Store token in session** ties storage to session expiry; database storage persists across sessions.
Automatic account linking by email and organization domain checks require verified brokered email.

Organization member visibility requires `view-users` or corresponding fine-grained permissions.
Organization group roles are inherited and appear in `realm_access` and `resource_access`.
Enable **Add group role mappings** on the **Organization Group Membership** mapper
to include roles per organization in `organization`.
Shared identity provider auto-membership requires the organization to claim the email domain;
new links default to Unmanaged membership, while existing links migrate as Managed.

### Provisioning and verifiable credentials

SCIM is supported, handles multivalued user attributes, and enforces User Profile
permissions on reads and writes and Fine-Grained Admin Permissions on search filters.
Use `name.formatted`; the earlier `name.formated` spelling was corrected.
OID4VCI is preview, enabled with `--features=oid4vc-vci` or `--features=preview`.
Revoking a refresh token can revoke its issued credentials.
Wallet presentation verification (`--features=oid4vc-vp`), mdoc
(`--features=oid4vc-mdoc`), and the REST credential offer endpoint
(`--features=oid4vc-vci-rest-credential-offer`) are experimental.

## Server operations

Use `KCRAW_` for literal `$`, `$$`, and `${…}` in environment values.
Defining both `KC_` and `KCRAW_` for the same key fails startup.
Use `KC_<name>` with `KCKEY_<name>` when automatic key mapping would change a key.
With health endpoints enabled, startup and liveness can report `UP` while
readiness remains `DOWN` during asynchronous initialization.
Point load balancer checks at `/health/ready`, or disable asynchronous bootstrap
with `--server-async-bootstrap=false`.

The HTTP request queue is unbounded by default. `http-max-queued-requests` caps
it and returns HTTP 503 immediately for excess requests.
Optional datasources can be excluded from health checks.
Strict FIPS generates a BCFKS truststore from `conf/truststores` or `--truststore-paths`;
automation reading it directly uses `data/keycloak-truststore.bcfks` and type `BCFKS`.
For encrypted PKCS#8 PEM HTTPS keys, supply the main or management listener's
corresponding certificate key file password option; see the operations reference.

Login failures persist in the database by default, preserving temporary lockouts
across restarts; `multi-site` and `clusterless` still store them in external Infinispan.
Use `--cache-embedded-cluster-name` and `--cache-embedded-node-name` instead of low-level
SPI options. The Operator uses the pod name; standalone deployments can supply a
stable, unique node name with `KC_CACHE_EMBEDDED_NODE_NAME` or the CLI flag.

Files in this skill

  • SKILL.md11.2 KB
  • coverage.json1015 B
  • references/admin-and-account-apis.md3.7 KB
  • references/authentication-and-token-exchange.md8.8 KB
  • references/identity-brokering-and-organizations.md5.1 KB
  • references/migration-clients-themes-and-extensions.md6.5 KB
  • references/migration-deployment-and-storage.md7.1 KB
  • references/server-configuration-and-operations.md4.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.