Shuffle SSO with Keycloak and role mapping

Shuffle SSO with Keycloak uses an OpenID Connect client and a roles claim so your identity team manages Shuffle access in one place. This page covers the setup sequence, role mapping, and the checks that prevent lockouts.

On this page

Shuffle SSO with Keycloak: what the integration does and how it signs users in

Shuffle supports OpenID Connect for both on-premises and cloud deployments, added in version 1.0.0, so an identity team can sign users into Shuffle through Keycloak without a separate password store for Shuffle accounts. The integration has two parts: a Keycloak OpenID Connect client that Shuffle uses to authenticate users, and client roles on that client that Keycloak places into a roles claim in the token. Shuffle then reads that claim to decide what each signed-in user may do. Access is managed in Keycloak, not by hand-editing users inside Shuffle.

Keycloak is an open source identity and access management server licensed under Apache 2.0. It supports the OpenID Connect, OAuth 2.0 and SAML 2.0 protocols and provides single sign-on, identity brokering, user federation, an admin console and fine-grained authorization services. In this design, Keycloak remains the place where role assignments, user deactivation and MFA policy are set. When someone leaves or changes teams, the change is made once in Keycloak, and the next sign-in or token refresh reflects it. Confirm how often Shuffle refreshes role information for an existing session before you promise leavers are cut off immediately.

The exact claim name and role values Shuffle reads (for example, whether it expects the client roles under a claim such as roles and which strings map to shuffle-admin, shuffle-user and shuffle-org-reader) must be confirmed in the Shuffle SSO documentation for the version you run, as the Shuffle extensions documentation covers the SSO settings. Confirm the claim and role names against a test login before you build the mapper, because a mismatch typically leaves users signed in with no effective role or blocked from the tenant.

What you need before configuring Keycloak for Shuffle

Four components have to be in place before any client or mapper is created: a reachable Shuffle instance, a supported Shuffle version, a production-grade Keycloak server and named owners for the roles. Network paths between users, Shuffle and Keycloak tie them together, and each card below is a check to complete before the configuration work starts.

A reachable Shuffle instance

Shuffle needs a known public URL with valid TLS before you register it as an OpenID Connect client. The redirect URI Keycloak sends users back to is built from that address, so a changed hostname later means editing the client. Confirm the exact URL users will type, who controls its DNS record and who can renew its certificate. Write the URL down now, because the client settings depend on it.

Shuffle configuration docs

A supported Shuffle version

Check the running version before you read the SSO settings, because OpenID Connect was added to Shuffle in version 1.0.0 and older builds may not offer the options described here. Versions older than v2.1.1 stopped receiving support after January 31, 2026, so an upgrade may need to come first. The current stable release is v2.3.0, published September 28, 2026. Record the version so the configuration matches the documentation you follow.

Shuffle releases

A production Keycloak server

Keycloak 26.8.1 is the current release, published October 13, 2026. Run it against a production database such as PostgreSQL 14 to 18 rather than the development file database, which is intended only for development. Plan how the server will be reached, backed up and upgraded, because the Shuffle login depends on it. Confirm that Keycloak's HTTPS endpoint and hostname are settled before creating the client.

Keycloak database guide

An admin account in the target realm

Create the client and roles inside the realm that will serve Shuffle users, not in the master realm. Use a named administrator with the rights to manage clients, client roles and protocol mappers. Confirm that the account has multi-factor authentication enabled and that a second administrator can make the same changes if the first is unavailable. Keep the realm name recorded, because it appears in the issuer URL.

Named owners for Shuffle roles

The shuffle-admin, shuffle-user and shuffle-org-reader client roles grant different powers inside Shuffle, so each needs a business owner who approves who receives it. Decide who may assign these roles in Keycloak and who reviews them when people change teams or leave. Without named owners, role mapping tends to drift into broad admin rights. Document the approval path before anyone is granted access.

Network paths between all three parties

Users need a browser path to both Shuffle and Keycloak. Shuffle's backend must reach Keycloak's OpenID discovery endpoint over HTTPS, which is how it learns the issuer, keys and token settings. Test this from the backend host or container, not from your laptop, since proxies and firewall rules often differ. Confirm any internal certificate authority is trusted by the Shuffle backend before you begin.

Keycloak production guide

How a Shuffle login and role check flows through Keycloak

The flow starts when a user opens Shuffle and is redirected to Keycloak's authorization endpoint. The user signs in at Keycloak, and the browser returns an authorization code to the Shuffle backend, which exchanges it at the token endpoint. The roles claim comes back in the token, and the backend maps the shuffle-admin, shuffle-user or shuffle-org-reader client role to a Shuffle role before the session is created. Confirm where your client mapper places the claim in the token, then test each role with a sample account to check the result.

Sequence of a Shuffle OpenID Connect login with the role mapping step inside the backend.

How client roles reach Shuffle as a roles claim

The core design step is making Keycloak attach the right roles to each login token, so Shuffle can read them. In Keycloak, a protocol mapper on the Shuffle client adds the client roles a user holds to the token under a claim name you choose. That claim is the roles claim Shuffle compares against its own role names, so the mapper's claim name, its token type (ID token, access token or both) and its multivalued setting must match what Shuffle expects. Confirm the exact claim name, the expected value format and the token type against Shuffle's current SSO settings and the extensions documentation before you build the mapper, because an empty or mismatched claim is the most common cause of users arriving with no access.

Assign the three roles, shuffle-admin, shuffle-user and shuffle-org-reader, as client roles on the Shuffle client rather than as realm roles. The effect is scope: a client role exists only under its client, so another application in the same realm cannot grant Shuffle access by assigning a role with a matching name, and Shuffle's access is governed by changes made to one client. Realm roles would be visible to every client and would make it easy for a payroll or wiki administrator to hand out Shuffle privileges unintentionally. Keep the role names identical in Keycloak and Shuffle, and document who may change the client's role assignments, since that group controls who can build and run playbooks.

Decide now what happens to a user who signs in with no Shuffle role. The safe policy is to block them: the token carries no recognized role, so the user should get no tenant access rather than a default account with broad rights. Whether Shuffle creates an account automatically on first login, whether it refuses unassigned users, and how it handles a missing or unexpected claim must be confirmed against the Shuffle SSO settings in your version. Test each case in a staging realm with a user holding no role, a user holding one role and a user holding two, and record the result. The provisioning and blocking behavior is covered in the topic on controlling SSO provisioning and role restrictions, which should be read before the mapper is released to production.

Configure the Keycloak client, roles and Shuffle SSO in order

This sequence sets up a Keycloak realm, an OpenID Connect client and three client roles, then connects Shuffle to that client. The result is a Shuffle login that takes its access level from Keycloak role assignments, and you confirm it with one admin account and one non-admin account before rollout.

  1. Select or create a dedicated realm

    An identity administrator selects an existing Keycloak realm or creates a new one for Shuffle users, so Shuffle's clients, roles and test accounts stay separate from other applications. Record the realm name and the issuer URL shown in the realm's OpenID endpoint configuration, because Shuffle needs that exact issuer value in a later step. Done means the realm exists, its endpoint configuration loads in a browser, and at least one admin test user and one non-admin test user are created in it.

  2. Create the OpenID Connect client

    In the realm, an administrator creates a client with the OpenID Connect protocol and turns on client authentication so it becomes a confidential client with a client secret. Enable the standard authorization code flow and leave other flows off unless Shuffle's documentation requires them. Copy the client ID and generate the client secret into your secrets store, not into a shared document. Done means the client appears in the client list with client authentication enabled and a stored secret.

  3. Set redirect URI and web origins

    The administrator sets the valid redirect URI and web origins on the client to the exact values Shuffle documents for its OIDC callback, including scheme, host, port and path, with no wildcard shortcuts in production. Confirm these values against the Shuffle extensions documentation and your own deployment URL, since a mismatch is a common cause of failed logins. Done means the client lists one redirect URI for each Shuffle instance URL you use, and the web origins match the same host.

  4. Create the three client roles

    Under the Shuffle client, the administrator creates three client roles named shuffle-admin, shuffle-user and shuffle-org-reader, with descriptions that state the access each role should grant inside Shuffle. Keep these as client roles rather than realm roles so the role names belong only to this application. Assign shuffle-admin to a small number of administrators, shuffle-user to builders, and shuffle-org-reader to viewers. Done means each role exists and each test account holds exactly the role you intend.

  5. Map client roles into the roles claim

    The administrator adds a protocol mapper to the Shuffle client that emits the user's client roles into the roles claim of the ID or access token, and sets the mapper to add that claim to the token type Shuffle reads. Confirm the claim name, value format and token type in Shuffle's OIDC settings before saving, because the mapper must match what Shuffle expects. Done means a test login produces a decoded token where the roles claim lists only the roles assigned to that user.

  6. Enter the issuer, client ID and secret in Shuffle

    A Shuffle administrator opens the OpenID Connect settings in Shuffle and enters the realm issuer URL, the client ID and the client secret, then sets the role claim to match the mapper created earlier. Store the secret through your normal secret handling so it is not exposed in logs or screenshots. Save the configuration and keep an existing local administrator session open until the test in the next step passes, so you keep a way back in if the configuration is wrong. Done means Shuffle accepts the saved settings without a configuration error.

  7. Test admin, non-admin and blocked logins

    Testers sign in with the admin account and confirm it reaches admin functions, then sign in with a shuffle-user or shuffle-org-reader account and confirm admin-only pages are unavailable. Remove the roles from a third test user, or use a disabled account, and confirm Shuffle refuses the login or grants no access. Check the decoded token for each account to confirm the roles claim matches the assigned roles. Done means all three results match the role assignments, and the test notes are kept with the change record.

Mapping Keycloak client roles to Shuffle access

This table compares each Keycloak client role value placed in the roles claim with the access it should grant in Shuffle and what to verify before relying on it. Read each row as a test case: confirm the Shuffle behavior in your own tenant with a test user before assigning the role to real staff.

Keycloak objectValue in roles claimShuffle access intendedWhat to confirm
shuffle-admin client roleshuffle-adminAdministrative access to the Shuffle tenant, including workflows, apps and user managementWhich settings the admin role can change, including SSO configuration, user settings and organization settings, in the user roles documentation
shuffle-user client roleshuffle-userBuild and run playbooks, manage apps used in workflows, without administrative rightsWhether users can edit SSO, delete other users, change tenant limits or manage API keys of other accounts
shuffle-org-reader client roleshuffle-org-readerView-only access to workflows, executions and organization dataThat the reader role blocks workflow edits, saved credential changes and manual or scheduled executions
No Shuffle role assignedClaim absent or no matching valueLogin refused or account created with no usable permissionsThe default behavior when SSO has no matching role, and whether it creates an account or rejects the login
Role name spellingExact match requiredEach Keycloak client role maps to one Shuffle role without partial or case-based matchesThe exact role strings Shuffle expects and the claim name configured in the Keycloak client mapper

Hardening the Keycloak client and Shuffle session

The Keycloak client for Shuffle is the trust boundary between your identity provider and the SOAR platform that holds saved app credentials. The controls below cover the client secret, redirect URIs, MFA, token lifetimes, administrative access and role assignment, and they reinforce one another, so each should be checked after setup and again after any change.

Keep the client secret out of config

The Keycloak client secret lets Shuffle exchange authorization codes for tokens, so a leaked secret lets someone impersonate the client. Store it in a secrets manager and inject it into the Shuffle environment at runtime, not in Compose files, Helm values or version control. Confirm how your deployment reads OIDC settings and where those values are logged. Rotate the Keycloak client secret on a schedule and after any staff change that exposed it.

Keycloak docs

Restrict redirect URIs to exact paths

Keycloak returns the browser to the redirect URIs registered on the client, so wildcards or loose prefixes let an attacker receive authorization codes. Register the exact Shuffle callback path for each hostname, served over HTTPS, and remove any development or localhost entries from production realms. Check the registered web origins as well. Test a login from each hostname you operate, including any reverse proxy or load balancer name.

Enforce MFA in Keycloak

Shuffle does not replace your identity provider's second factor, so MFA has to be required where users authenticate. Set a conditional or required authentication flow in the Keycloak realm or on the client, and confirm the flow applies to every route into Shuffle, including any SAML or legacy paths still enabled. Test a login with a user who has no OTP credential to confirm enrollment is enforced. Confirm with Shuffle's current docs how its own MFA setting interacts with an SSO login.

Set token lifetimes and idle timeouts

Access token and SSO session lifetimes determine how long a stolen session or a departed user's access remains valid. Set realm session idle and maximum values to match your written access policy, and keep access token lifetimes short. Shorter lifetimes mean more token refreshes, so test long-running browser sessions and integrations that use Shuffle's APIs. Confirm in Shuffle's session documentation how it handles an expired upstream token before you choose values.

Restrict admin console access

Anyone with realm administration can change the Shuffle client, its mappers and the role assignments that decide who is shuffle-admin. Limit the Keycloak admin console to a small named group, require MFA for those accounts, and avoid using a shared bootstrap admin account for daily work. Keep the admin console off the public internet where your architecture allows, and log administrative events so changes to the client are visible.

Review who holds shuffle-admin

The shuffle-admin client role grants the most authority inside Shuffle, including control over saved credentials and workflows that run against your security tools. Review its membership on a fixed schedule, remove access when people change roles or leave, and keep the number of holders small. Use shuffle-user and shuffle-org-reader for everyone else. Confirm with the Shuffle role documentation which actions each role permits in your version.

Choosing a Keycloak deployment that fits your availability needs

A single Keycloak server backed by a production database is the simplest option and fits a small or test Shuffle instance. There is one Keycloak process to install, patch and monitor, and the database is the only other component to back up. Keycloak's supported production databases include PostgreSQL (14 to 18), MariaDB, MySQL, Microsoft SQL Server, Oracle Database and Azure SQL, and the default dev-file database is for development only. The trade-off is that a Keycloak outage stops every Shuffle login, and no one can sign in through SSO until the server returns. Keycloak's three high availability architectures are a single cluster, a multi-cluster v2 design and the deprecated multi-cluster v1 design, which should not be chosen for new builds. The Shuffle side needs no change for this choice.

  • Operational load: one Keycloak process and one database to patch, back up and monitor.
  • Database choice: use a supported production database from the Keycloak database list, not the dev-file default.
  • Downtime exposure: a restart or failed upgrade blocks all SSO logins to Shuffle.
  • Schema changes: Keycloak migrates the schema at startup by default, so plan upgrade windows around it.
  • Growth path: moving to a cluster later means adding nodes and a synchronously replicated database.

Confirm that your Shuffle admins have a documented local fallback path before relying on this model for a production tenant.

Why Shuffle SSO with Keycloak fails and how to fix it

This table pairs the login and role failures teams most often hit when Keycloak signs users into Shuffle with each symptom's likely cause and a check to run. Read it from the symptom column, then work through the cause and fix that match what you see in the browser, the Shuffle logs or a decoded token. Most failures trace back to a mismatch between the Keycloak client settings and what Shuffle expects.

SymptomLikely causeFix
Redirect URI mismatch error at loginThe valid redirect URI on the Keycloak client does not exactly match the callback URL Shuffle sends, often because of a scheme, port or trailing slash difference.Copy the callback URL from the Shuffle SSO settings and paste it into the client's valid redirect URIs without edits. Compare scheme, hostname, port and trailing slash.
Login succeeds but user has no role or is refusedThe user has no client role from shuffle-admin, shuffle-user or shuffle-org-reader, or the role mapping does not match any Shuffle role name.Assign at least one of the three client roles to the test user in Keycloak, then sign out completely and sign in again so a new token is issued.
Roles claim missing or emptyThe client scope or protocol mapper that adds client roles to the roles claim is not attached to the Shuffle client, or the claim name differs from the one Shuffle reads.Decode the ID or access token and confirm a roles claim lists the client roles. If it is absent, add or correct the client role mapper and make sure it is in the client's default scopes.
Roles present but wrong access levelRoles are mapped to the wrong Shuffle role, or a user holds several roles and the highest or lowest one is applied unexpectedly.Check each user's client role assignments against your intended matrix. Confirm which role Shuffle applies when several are present by testing with a dedicated account for each role.
Invalid client secret after rotationThe secret was regenerated in Keycloak but the old value remains in Shuffle, or the secret was copied with extra whitespace.Regenerate or copy the current secret from the Keycloak client credentials tab, paste it into Shuffle again and save. Restart or reload the Shuffle backend if the setting is cached.
Token expired or clock skew between serversThe Keycloak host and the Shuffle backend or browser clock differ enough that token issue and expiry times look invalid.Compare UTC time on the Keycloak host, the Shuffle backend container host and a test client. Enable time synchronization with NTP on all of them, then retry the login.
Keycloak unreachable from the Shuffle backendThe backend cannot resolve or reach the Keycloak discovery endpoint because of DNS, firewall rules, a proxy or a TLS certificate the backend does not trust.From the Shuffle backend container, request the realm's OpenID configuration URL and check the response. Fix DNS, allow the port through the firewall, or add the internal certificate authority to the backend trust store.
Issuer URL mismatch from a proxy hostnameKeycloak issues tokens with the public hostname from its frontend URL setting, but Shuffle is configured with an internal hostname or the reverse does not match.Compare the iss claim in a decoded token with the issuer URL in Shuffle. Set the Keycloak hostname and proxy settings so both use the same public URL, then update Shuffle to match exactly.
Database schema migration blocks Keycloak startup after an upgradeAutomatic schema migration at startup failed or was not allowed for the new release, so the server stops before it serves logins.Review the Keycloak startup log for migration errors and check the configured migration mode. For large deployments, follow the upgrading guide to apply the schema changes manually, back up the database first, and test on a copy.

What teams ask before they set up Keycloak SSO for Shuffle

How much effort does Keycloak SSO with role mapping for Shuffle take?

Effort depends on how many roles you map, how mature your Keycloak realm already is, how you design high availability, and how far your testing goes. A single realm with three client roles and an existing OpenID Connect pattern is a small change. A new Keycloak deployment, a multi-site design with a synchronously replicated database, or a long list of group rules takes considerably more work. Ask for a written scope that lists the roles, the Keycloak version and deployment model, the test matrix and the cutover plan, since those four items drive the quote more than anything else.

Can our internal team set up Keycloak SSO for Shuffle without a partner?

Yes, if you have people who administer Keycloak realms and clients and people who administer Shuffle tenants and their settings. The Keycloak side needs a confidential client, a protocol mapper that places client roles into the roles claim, and a realm configured for your identity source. The Shuffle side needs the OpenID Connect settings and a tested mapping from claim values to Shuffle roles. Confirm that your Shuffle version supports the OpenID Connect settings you plan to use, and confirm which Keycloak release your environment runs before you copy any configuration from examples.

What do we need to provide before a partner starts the Keycloak SSO work?

The work needs a few things from your side before it starts:

  • Keycloak administrator access to the realm, or a named administrator who makes changes while the work team watches
  • A Shuffle administrator account and access to the instance's settings
  • Test accounts for each role, including one user who should be denied
  • A named owner for the role model who decides which Keycloak groups or client roles grant access
  • A change window for the login cutover that your operations team approves

Without a named role owner, role mapping decisions tend to stall during testing, so settle that first.

Do Keycloak upgrades affect our Shuffle SSO setup?

They can. Keycloak plans four minor releases a year and a major release every two to three years, and since Keycloak 26.0 it says breaking changes in a minor release are opt-in. That lowers the risk of surprise changes, but it does not remove the need to check. After any Keycloak upgrade, retest the login flow, the token contents, the role claim and a deny case for a user with no assigned role. Read the backwards compatibility notes for each release you move to, and keep the Keycloak Operator in manual approval mode if you run it on Kubernetes so upgrades happen when your team chooses.

Can a partner run the cutover to Keycloak SSO without locking users out?

A partner can plan and run the cutover so that local access and a tested rollback remain available during the change, but the approach depends on your environment. The usual method is to keep an administrator path that does not depend on SSO, test every role with real accounts in a non-production instance, change the Shuffle SSO settings in a planned window, and confirm each role can sign in before you close the window. Ask the partner to write down the rollback steps, the admin access they will keep, and who signs off each test. This is a planning question for your scope, not a guarantee.

What drives the cost of this engagement, and what should we ask for in a quote?

The main cost drivers are the number of roles and groups mapped, the state of your existing Keycloak deployment, whether high availability must be designed or only documented, the size of the test matrix, and how many environments the change must pass through. Costs are typically one-time for design, build and testing, and recurring only if you add a retainer for upgrades and retesting. DeployOpen does not publish a price list, so ask for a fixed-scope written proposal that names the deliverables, the environments, the test cases, the cutover support and any retest after upgrades.

How DeployOpen scopes and delivers Shuffle SSO with Keycloak

DeployOpen approaches Shuffle SSO with Keycloak as a scoped build: the Keycloak client, the role mapping into the roles claim, and the login and access tests are agreed in writing before work starts. The work runs inside your own infrastructure, so your identity, security and operations teams can review each setting and the evidence behind it.

How we scope

  • Confirm the Shuffle version, deployment architecture and public URL that the OpenID Connect redirect will use.
  • Agree the Keycloak realm, client settings and which of shuffle-admin, shuffle-user and shuffle-org-reader map to which groups.
  • Record in the written scope how existing Shuffle accounts, SSO-created users and any SAML-based login will be handled.

How we build

  • Configure the Keycloak client and client roles, and add a mapper that places the roles into the roles claim Shuffle reads.
  • Enter the issuer and client details in Shuffle, then test each role with a sample user to confirm the access it receives.
  • Check token contents, session lifetime and the behavior for users who hold no Shuffle role before the build is accepted.

How we hand over

  • Deliver a configuration record listing realm, client, mappers, role assignments and the secret storage location.
  • Document the test cases, their results and the steps to repeat them after a Shuffle or Keycloak upgrade.
  • Walk your identity and platform team through the role assignment process so access changes stay in Keycloak.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Retainers can cover re-testing role mapping after Keycloak minor releases and Shuffle version changes.
  • Ask any provider to confirm the support boundary, response expectations and who holds administrative access.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.