Federating openDesk with an existing Keycloak

Connect your own Keycloak realm to the openDesk identity provider over OIDC, with matched usernames and accounts kept in step through import.

On this page

How openDesk federation with an existing Keycloak works

The supported method for an organization that already runs Keycloak is OIDC-based SSO federation from its own identity provider into the Keycloak-based openDesk IdP. Users then sign in to openDesk with the credentials they already use, but the federation covers login only. It does not create accounts, so every user who signs in must also exist in the openDesk directory before the first login succeeds. Treat federation and account creation as two separate workstreams with separate owners and separate change records.

The documented route for getting those accounts into openDesk is the one-way Nubus Directory Importer, which copies users and groups from an LDAP or Active Directory source into the openDesk IAM. Your Keycloak realm is not an LDAP directory, so confirm with ZenDiS's federation documentation whether your realm can feed the importer directly, or whether an intermediate directory is needed. Ad-hoc provisioning on first login is a different mechanism with its own limits and should not be used to fill this gap in a production rollout.

The page covers both sides of the client setup: the identity provider and OIDC client that the openDesk IdP needs to trust, and the matching client and redirect configuration on your Keycloak realm. Before you configure either side, decide which claim will match an openDesk account to an upstream identity, usually the username or an attribute such as mailPrimaryAddress, and confirm that the same value is populated and unique in both systems. Mismatched usernames are the most common reason a federated login fails after an otherwise correct setup.

What you need before federating an openDesk Keycloak

Federation touches three layers: the openDesk cluster that runs the IdP, the upstream Keycloak realm that holds the people, and the network and certificates between them. Confirm the exact openDesk release and Keycloak version you run with the vendor and in your own environment before you plan the client setup.

openDesk cluster baseline

openDesk is deployed with Helmfile and Helm on a CNCF-certified Kubernetes cluster at v1.33 or later, with an ingress controller, cert-manager, an RWO volume provisioner, Helm 3.17.3 or later below v4 and Helmfile 1.0.0 or later. Check these against the release you plan to run, since the Keycloak-based IdP is one component of that stack. The openDesk release you target determines which chart versions are used, so record it in the change ticket.

openDesk requirements

Upstream Keycloak version and database

The upstream realm runs on Keycloak, which the project currently ships as 26.8.1 according to its release page. Keycloak's supported production databases include PostgreSQL 14 to 18, MariaDB, MySQL, Microsoft SQL Server, Oracle Database and Azure SQL. The default dev-file database is for development only, so a federation partner that runs it should not be treated as production. Confirm the version and database with your Keycloak team before you agree on client settings.

Keycloak database guide

Network and DNS paths

Each side must reach the other over HTTPS. The openDesk IdP must reach the upstream OIDC discovery and token endpoints, and users' browsers must reach both issuer URLs. Trace the path from the openDesk cluster egress to your Keycloak hostname, including proxies, firewall rules and any split DNS. Mismatched issuer hostnames are a common reason federated logins fail, so decide the public hostnames before you configure either realm.

TLS certificates on both sides

Each realm needs a certificate that clients trust. On the openDesk side, cert-manager issues the certificates for the ingress hostnames. On the upstream side, your Keycloak ingress or load balancer presents its own certificate. Check that the chain is complete and that the internal certificate authority, if you use one, is trusted by the openDesk cluster, because a missing root will break the OIDC metadata fetch during setup.

Shared username and attribute rules

Federation matches users by username or another attribute such as mailPrimaryAddress, so both realms must agree on which value identifies a person. Export a sample of accounts from your Keycloak and compare the usernames with the directory entries openDesk will import. Look for case differences, domain suffixes and accounts with no matching attribute. Resolving these before go-live avoids duplicate or orphaned accounts.

openDesk IdP federation

Change control and version pinning

Plan the upgrade path for both products before you connect them. openDesk supports only the latest minor version and does not guarantee in-place upgrades between majors. The Keycloak Operator documentation recommends manual approval mode for operator updates to avoid unintended upgrades. Ask the vendor which versions are compatible with the federation setup and agree who approves an upgrade on either side.

Configuring the identity provider and client on both sides

This sequence connects your upstream Keycloak realm to the openDesk IdP over OIDC, so that a user who signs in at your realm can reach openDesk without a second password. Each step ends with a check you can run before moving on.

  1. Confirm the upstream realm and its OIDC endpoints

    Your Keycloak administrator identifies the realm that holds the workforce accounts and confirms that it issues OpenID Connect tokens. Open the realm's well-known OpenID configuration document in a browser and record the issuer, authorization, token, userinfo and JWKS endpoints. Check that the issuer value matches the realm URL exactly, including the path, because openDesk will compare it during federation. You are done when every endpoint resolves over HTTPS from a network segment where the openDesk IdP runs.

  2. Create the openDesk client in the upstream realm

    In the upstream Keycloak admin console, the realm administrator creates a confidential OpenID Connect client for openDesk. Set the client ID that openDesk's federation configuration will expect, enable the standard authorization code flow, and disable flows you do not need. Add the redirect URI that the openDesk IdP generates for its federated broker endpoint, using the exact hostname of your openDesk deployment. You are done when the client shows client authentication as on and the redirect URI matches the openDesk domain character for character.

  3. Map the username claim the openDesk IdP will match

    Decide which upstream attribute carries the value openDesk uses to match users, typically the username, or an attribute such as mailPrimaryAddress if your directory uses e-mail addresses as logins. Add a protocol mapper to the upstream client that places this value in the ID token or userinfo response under a claim name you record. Confirm the mapper and the openDesk matching setting agree on the same claim, since a mismatch produces failed or duplicate logins later. You are done when a test user's token contains the expected claim with the expected value.

  4. Register the upstream issuer in the openDesk IdP

    The openDesk administrator adds the upstream realm as an external OpenID Connect identity provider in the openDesk IdP. Enter the issuer URL, the client ID created in step two, and the endpoint values recorded in step one, then select the claim that matches users. Save the provider and leave any option that auto-creates accounts on first login at its documented default, since account creation should follow the import path described elsewhere on this page. You are done when the provider appears on the openDesk login screen and the discovery values in the IdP match the upstream document.

  5. Store and rotate the client secret

    Generate the client secret in the upstream client and transfer it to the openDesk IdP through your approved secret store rather than through chat or a ticket body. Keep the secret out of Helmfile values files committed to version control, and reference it from a Kubernetes secret or your external secrets tool, as your deployment standard requires. Record who may rotate the secret and how the openDesk side is updated afterwards, because a rotation on only one side breaks login. You are done when the secret exists in one controlled location, the configuration references it by name, and rotation steps are written down.

  6. Test a login with a pilot account

    Sign in to the openDesk login page with a pilot account that exists in the upstream realm and has already been imported into openDesk. Choose the upstream provider, authenticate, and confirm you land in openDesk without a second login prompt for the same account. Inspect the resulting openDesk user, check that the matched account is the existing one and no duplicate was created, and confirm that group membership and application access resolve as expected. You are done when the test account reaches the portal, the same user object is used, and the test session shows the mapped claim you verified earlier.

  7. Confirm the failure and sign-out paths

    Test a user who is absent from the upstream realm, a user whose upstream account is disabled, and a sign-out from openDesk. Confirm that the first two are refused and that the disabled account cannot obtain a new session, and that sign-out behaves as your security policy requires. Ask your security team to review whether session lifetimes on both sides are acceptable. You are done when each negative case produces the expected outcome and the results are recorded for the change record.

How usernames are matched across the two realms

Decide the matching attribute before any account exists. openDesk's federation matches a user arriving from your Keycloak realm to an openDesk account by username or by another attribute such as mailPrimaryAddress. Whichever you choose becomes the key that links an upstream identity to a local IAM account. If accounts already exist under a different key, logins can fail to match, or a second account can be created for the same person. Confirm the supported matching options for your openDesk version in the openDesk federation documentation before you write the realm mappers, and record the decision in your provisioning plan so that the import and the federation use the same key.

The matching value must be identical in both directories. If your Keycloak stores usernames in lowercase and openDesk's directory stores them in mixed case, or if one side holds a full e-mail address and the other a short login name, federated users will not match. Run a comparison of a sample of users across both systems before go-live, and check how the attribute is populated for users who have been renamed, have aliases or share a mailbox. Local logins are also affected: an account that matches on mailPrimaryAddress is still signed in with whatever local login name the IAM holds, so administrators and break-glass users need to know which identifier to type. Plan that separately and keep at least one local administrator account outside federation.

Changing the matching attribute after go-live is not a settings tweak. Existing sessions, linked identities and any application-side references to the user may stop resolving to the same account, and users may be asked to sign in again. Treat the matching attribute as fixed for the life of the deployment, and if you must change it, plan a test run in a non-production environment that covers session behavior and each bundled application. For the specific handling of upstream providers that send e-mail addresses as usernames, and for the username rules that apply when Active Directory feeds the directory, follow the sibling pages on e-mail-as-username login and Directory Importer username rules rather than repeating those steps here.

Attributes and accounts mapped between the two realms

This table maps each upstream claim or attribute used in the federation to the openDesk IdP attribute it populates, with the openDesk match role and what to confirm in your Keycloak realm. Group and role assignments are not carried by the federation itself; they are handled in the openDesk IAM. Confirm each row against the federation documentation for your openDesk release before go-live.

AttributeMatching role in openDeskWhat to confirm in your realm
UsernamePrimary match key for the federated login, unless another attribute is configuredUsernames are unique and stable, and match the names openDesk already holds for the same people
Email address (mailPrimaryAddress)Alternative match attribute when usernames differ between realms or are e-mail addressesEach user has one primary address, and it is populated for every account in scope
Given nameDisplay and profile data in the openDesk IdP, updated on loginValues are present and not used as identifiers
SurnameDisplay and profile data in the openDesk IdP, updated on loginValues are present and consistent with the source directory
GroupsNot mapped by the federation; group membership is assigned in the openDesk IAMUpstream groups are documented only for reference, so no one expects them to grant openDesk rights
Roles and application accessAssigned in the openDesk IAM after the account existsWho in your organization owns these assignments and how they are reviewed

How a login travels from the upstream Keycloak to openDesk

The login starts in the user's browser at an openDesk application, which redirects the user to the openDesk IdP. The IdP forwards the user to the organization's upstream Keycloak realm over OIDC, where the user authenticates with the organization's own credentials. The upstream realm returns an authorization code, and the openDesk IdP exchanges it for tokens and matches the user by username or another attribute such as mailPrimaryAddress. Account records arrive through the Nubus Directory Importer, so the check to make is that the matched account already exists in openDesk.

Login path from the user's browser through the openDesk IdP to the upstream Keycloak realm.

Why account creation should come from import, not ad-hoc provisioning

Federated login on its own does not build a complete directory. In the ad-hoc path, Nubus creates an openDesk account the first time a user signs in through the federated IdP, so the account exists only after that login. This path has documented limits: colleagues who have never signed in are invisible to others, accounts are not deprovisioned when someone leaves the upstream directory, and groups from the source are not synced. In a federated Keycloak setup, the upstream realm can disable a user while the openDesk account keeps its rights and application access. Ad-hoc provisioning can suit a pilot, but a production tenant that must follow staff changes needs an account lifecycle that starts before first login.

The alternative is a repeatable import. The Nubus Directory Importer copies users and groups from LDAP or Active Directory into the Nubus IAM in one direction only. Because accounts exist before first login, administrators can review colleagues, assign applications and place people in groups such as the 2FA Users group ahead of time. Federated login then matches each person to an existing account by username or by another attribute such as mailPrimaryAddress. Running the import again keeps the openDesk copy in step with the source. Confirm in your own test environment how a removed upstream account is handled on the next run, because that behavior determines your offboarding steps.

The import route depends on the upstream directory, so confirm it before you build the federation. LDAP and Active Directory sources use the Directory Importer described in the openDesk federation documentation. Microsoft Entra ID does not expose LDAP, so it needs Azure AD Domain Services in place first. If your upstream is another Keycloak realm, confirm with ZenDiS documentation for your release which import mechanism applies. Before the first test login, record the source of truth for each account, the matching attribute, and the person who approves removals.

Hardening the federation link

The federation link is a trust relationship between two identity providers, so a weak point on either side lets the other side's users in or lets tokens be abused. The cards below cover the controls that connect the openDesk IdP and your Keycloak realm, and each one names what to confirm against the Keycloak server administration guide before go-live.

Client secret storage and rotation

The OIDC client on your Keycloak realm that openDesk uses to call your IdP carries a client secret. Store it in your secrets manager or a Kubernetes secret with restricted read access, never in Helmfile values committed to Git. Plan a rotation date and a procedure that updates both the Keycloak client and the openDesk configuration in one change window, so federated logins do not fail halfway through. Confirm the rotation steps for your Keycloak version in the server administration guide.

Keycloak admin guide

Exact redirect URIs

Register the openDesk redirect URI on your Keycloak client as the exact callback address of the openDesk hostname, with no wildcards and no open redirects. On the openDesk side, allow only your Keycloak issuer hostname. Review both lists after every hostname change, because stale or wildcard entries are a common way a client can be redirected to an unintended page. Confirm the redirect URI handling for your version in the server administration guide.

TLS on both issuers

Both the openDesk IdP and your Keycloak issuer must serve their discovery documents and token endpoints over TLS with certificates that the other side trusts. Check that the openDesk IdP trusts your internal certificate authority if your Keycloak uses one, and that certificate renewal on either side will not break federation silently. Keycloak's production configuration guide describes the TLS and hostname settings to confirm before go-live.

Keycloak production guide

Token lifetimes

Set access and refresh token lifetimes on the realm and on the client deliberately, and confirm which values the openDesk side applies to its sessions. Shorter access tokens limit the window in which a token copied from a compromised device stays valid, while refresh token and SSO session idle limits decide how long a departed employee can keep a session alive in your realm. Record the chosen values in the federation runbook and test them with a real logout and session expiry.

2FA for administrator accounts

Administrator accounts on openDesk should require a second factor even when the upstream realm handles the first factor. Confirm in the openDesk IAM which 2FA settings apply to federated users and how the Domain Admins group is affected, then roll out 2FA to administrators first. Check whether your upstream realm enforces the second factor for the same accounts, so that a federated login cannot bypass a control that your own realm requires.

Admin rights on the upstream realm

Anyone who administers your Keycloak realm can change the claims that openDesk trusts, including the username or mail attribute used for matching, and so can change which account signs in as which person. Write down which administrators hold realm, client and mapper rights, restrict those roles to a small named group, and log every change to mappers and clients. Confirm the role and event logging options against the server administration guide.

Common failures when federating Keycloak with openDesk

This table lists the failures teams most often hit when linking their own Keycloak realm to the openDesk IdP over OIDC, with the likely cause, the check to run and the fix direction for each. Work down the rows in order, because redirect and discovery problems block everything else. Most login problems trace back to a mismatch in one of the settings that both sides must agree on.

FailureLikely causeCheck and fix direction
Redirect URI mismatchThe redirect URI registered on the client in one realm does not match the URI the openDesk side sends, often because of a scheme, host or trailing slash difference.Compare the exact redirect URI on both clients character by character. Correct the registered value on the side that is wrong, then retest from a clean browser session.
Issuer or discovery URL unreachableThe openDesk IdP issuer or the .well-known/openid-configuration endpoint is not reachable from the network path used by the other side, or the issuer string differs from the published one.Fetch the discovery document from the environment that calls it and confirm the issuer value matches the configured value exactly. Fix DNS, routing, firewall or proxy rules, not the client settings.
Username mismatch creating duplicate or unmatched accountsThe username attribute sent upstream differs from the one openDesk matches on, for example an e-mail address where a short login name is stored, so logins create a second account or fail to match.Decide which attribute is the matching key (username or mailPrimaryAddress), then check the claim mapping and the stored values for a sample of users. Align the claim or the stored value, and remove duplicates before go-live.
Certificate chain errorsThe HTTPS certificate presented by the Keycloak or openDesk endpoint is signed by an internal CA that the other side does not trust, or the intermediate certificate is missing.Run a TLS connection test from the calling side and check the full chain. Install the internal root or intermediate certificate in the trust store used by the IdP, not by disabling verification.
Clock skew causing token rejectionToken issuance and validity checks fail when the servers' clocks differ, so tokens look expired or not yet valid.Compare system time on both sides and confirm time synchronization (NTP) is active. Correct the drift at the host level, then retest the login flow.
Login succeeds but roles or application access are missingThe federated user is created, but the claims that carry group or role membership are not mapped, or the groups are not synchronized through import, so the user has no rights in the openDesk applications.Inspect the claims in a test login and confirm the expected group or role values arrive. Map the claim to the openDesk group model and maintain the group membership through the import process rather than by hand.

Questions teams ask before federating openDesk with Keycloak

What drives the effort and cost of federating openDesk with our Keycloak?

The main drivers are how many identity decisions are already settled, how many Keycloak realms and clients sit on the upstream side, and how much testing the organization requires before go-live. Federation itself is a configuration task on two identity providers, so the cost follows the design work around it: agreeing the username rule, mapping claims, deciding how accounts get created, and proving login, logout and group behavior with real test users. The cost is mostly one-time, with recurring cost coming from upgrades on both sides and from support. Ask any quote to list the upstream realm work, the openDesk side work, the test plan, the handover and the upgrade effort separately, and to state which environments are included.

Can our in-house team set up openDesk federation with Keycloak on its own?

A team with working Keycloak administration skills and someone who can run openDesk's Helmfile-based deployment can usually handle the configuration, provided they have time for review and testing. The areas that need the most care are the OIDC client settings on both sides, the redirect URIs, the username matching rule, and the behavior of accounts that exist in both directories. Teams new to openDesk should read the federation documentation closely, because it describes the supported matching options and the directory import path. Confirm internally who owns the upstream realm, who owns the openDesk IdP, and who signs off on the test results before deciding between an internal build and an external partner.

How long does federation take, and what decides the timeline?

No duration can be stated from the research, so the timeline depends on the identity decisions and test coverage rather than on the configuration steps themselves. Decisions on the username attribute, whether accounts are created by import or on first login, and which groups and roles carry over tend to take the longest, because they affect every later user. Testing follows: login with each user type, password and two-factor behavior, group-driven access, and removal of a user upstream. Ask a provider for a written schedule tied to these milestones and to the environments they will test in, and treat any single number without that breakdown with caution.

What must our organization provide before federation can start?

You need administrative access to the upstream Keycloak realm, including the ability to create an OIDC client and to read its users, groups and attributes. You also need a decision on which attribute identifies a person, such as the username or mailPrimaryAddress, and a list of test users covering staff, administrators and anyone with two-factor enabled. Access to the openDesk environment, its DNS names and certificates, and a named contact for each side completes the list. Confirm the exact client secret handling and certificate chain with your security team early, because those items often delay the work more than the configuration does.

Does Keycloak federation replace the need for a directory import?

No. Federation handles sign-in: a user authenticates at the upstream Keycloak and is passed to openDesk over OIDC. It does not by itself establish the complete set of accounts, groups and rights that openDesk's Nubus IAM needs. The documented recommendation for provisioning from LDAP or Active Directory is the one-way Nubus Directory Importer, so most organizations keep an import for accounts and groups and use federation for login. Where the source is an upstream Keycloak, decide whether the import also runs from that source, and check how a user removed upstream is handled on the openDesk side so accounts do not linger.

How do upgrades on either side affect the federation link?

Upgrades on either side can change the link, so each one needs a retest. openDesk supports only the latest minor version, in-place upgrades between majors are not guaranteed, and skipping several minor versions may require intermediate steps, according to the release management documentation. On the Keycloak side, the project plans four minor releases a year and says breaking changes in a minor release will be opt-in, but major releases are less frequent and may change behavior. The Keycloak Operator documentation strongly recommends manual approval for operator updates to avoid unintended upgrades. Agree who tracks both release streams, which test cases run after each change, and how a rollback would work before go-live.

Which Keycloak and openDesk versions should we plan around?

Plan around the versions your environment actually runs, and check them against each project's release notes at the time of the work. The research recorded openDesk v1.19.1 as the latest release at research time, and Keycloak 26.8.1 as its current release. Because both move on different schedules, confirm the versions in both systems before scoping, and keep the chosen versions documented in the change record. Any federation design should be validated against the specific openDesk release you deploy, not against the version mentioned in older guides.

Keeping the federation working through upgrades

The federation has two upgrade clocks that do not run together. openDesk supports only the latest minor version, and Keycloak plans four minor releases a year, so the upstream realm and the openDesk IdP will rarely move in the same week. Treat every upgrade on either side as a change to the federation and retest it before the other side moves. Keycloak's own policy helps here: since Keycloak 26.0 the project says breaking changes in a minor release are opt-in, but opt-in only protects you if the upstream team reads the release notes and the backwards compatibility notes before the Keycloak version changes. Agree on who owns that review and on a change window for each side.

After any upgrade, retest the login path end to end: a fresh browser sign-in through the upstream realm, the redirect back to openDesk, the claim values that reach the IdP, and username matching for an existing account and a new one. On the openDesk side, check the federation provider settings after each release, since the openDesk release notes and upgrade steps are the source for any change to the IdP. On the upstream side, check the client's redirect URIs, the mapper that supplies the username or mailPrimaryAddress attribute, and the client secret rotation. Keep a short written test script so the same checks run every time.

Schema migration is the upstream setting that most often surprises teams. Keycloak migrates its database schema automatically at startup by default. That is convenient for small deployments, but it means a container restart can change the database before anyone has tested the new version. The upgrading guide suggests manual migration for large deployments, where administrators apply the SQL themselves after review. Confirm which mode your upstream Keycloak uses. If you run the Keycloak Operator, keep the approval mode on manual, as the Operator documentation strongly recommends, so that a new Keycloak version starts only after someone has approved it. Take a database backup before every upstream upgrade, because the federation depends on that realm data.

How DeployOpen works on this

DeployOpen plans, implements, integrates, documents and supports self-hosted open-source platforms inside your own infrastructure, including openDesk. For Keycloak federation, we start from your existing realm, agree the identity provider and client setup on both sides in writing, and build the import and username rules so account creation stays in step with your directory.

How we scope

  • Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • The written scope names your Keycloak version, realm layout, client settings, username attribute and which accounts federate.
  • We confirm which openDesk release and Kubernetes environment the federation will run against before any configuration begins.
  • A quote follows from the written scope, so ask for each component to be listed separately.

How we build

  • We configure the identity provider and OIDC client on your Keycloak realm and the matching federation settings on the openDesk IdP.
  • We test username matching with real sample accounts, including mailPrimaryAddress cases, before any user sees a login prompt.
  • We set up user import so account creation follows your source directory rather than ad-hoc first-login provisioning.
  • We run login, logout and account-removal tests and record each result for your review.

How we hand over

  • You receive configuration documentation covering both sides of the federation, client secrets handling and rollback steps.
  • We document which accounts are created by import, which attributes must stay stable upstream and what happens when a user leaves.
  • We walk your identity and platform teams through the runbook so they can review and operate the setup themselves.
  • Verification evidence is delivered with the handover so your compliance team can review the controls.

How we support

  • Ongoing support, openDesk upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover re-checking the federation after openDesk minor releases and Keycloak upgrades on either side.
  • We can retest the federation after changes to your upstream identity provider, client settings or username rules.
  • Ask the team which support scope and response arrangements are included in your written retainer before signing.

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.