OX App Suite single sign-on with Keycloak over OpenID Connect

Connecting OX App Suite to Keycloak as an OpenID Connect relying party, with the login flow, user and context resolution, logout behavior and the limits to confirm before rollout.

On this page

How OX App Suite single sign-on with Keycloak over OpenID Connect works

OX App Suite supports single sign-on through OpenID Connect, and Keycloak acts as the identity provider that authenticates users and issues the tokens App Suite relies on. If your team runs or plans OX App Suite v8 and wants users to sign in through its own Keycloak realm instead of local App Suite passwords, this is the integration path to plan for. This page covers only the OIDC path. SAML 2.0 is a separate, documented option with its own operator configuration and its own trade-offs, so do not treat the two as interchangeable when you scope the work. Read the OX App Suite OpenID Connect documentation before you decide which protocol your realm will expose to App Suite.

The integration is configured on two sides at once. On the App Suite side, the middleware needs the OIDC provider settings, the client registration and the rules that map a token to an App Suite context and user. On the Keycloak side, you need a realm, a client for App Suite with the redirect URIs your ingress will expose, and the claims that App Suite expects in the ID token. Neither side is complete alone, and a mismatch in redirect URIs, client settings or claim names usually appears as a failed login rather than a clear error. Assign one owner to each side and agree on the realm name, client ID and hostnames before anyone edits a configuration file.

The sections that follow take the work in order: the flow and client settings, how App Suite resolves contexts and users from the ID token, logout behavior, and the limits of what is supported. Confirm the exact App Suite release you run against the current support commitment, since the supported versions and LTS boundaries change over time. Also confirm the Keycloak release your team will deploy, because Keycloak ships minor releases several times a year and its upgrade notes matter for a long-lived realm.

What you need in place before connecting Keycloak to OX App Suite

Six things need to exist before you touch the OIDC settings: a working OX App Suite v8 deployment, a supported Keycloak with a production database, a highly available design if the realm must survive node or zone loss, names and certificates, network paths in both directions, and a named owner. Each one is a decision you make once, and most failed SSO rollouts trace back to one of them being assumed rather than confirmed.

OX App Suite v8 on Kubernetes

OX App Suite v8 is delivered as Helm charts that reference container images, and Helm 3.17.0 or newer is required. Choose the ingress path first: Istio, or the basic ingress-nginx option where Istio cannot be used. The ingress choice decides where the OIDC callback is terminated and which host name Keycloak must be given as a redirect target. Confirm the chart version you will deploy matches the OX release your team has tested.

Requirements docs

Keycloak version and production database

Run a current Keycloak release that your OX release is tested with, and confirm that version with Open-Xchange before you pin it. Keycloak's supported production databases include PostgreSQL 14 to 18, MariaDB, MySQL and others, and the default dev-file database is for development only. Do not let a development database reach a realm that users sign into. Plan who approves Keycloak upgrades, since the Operator recommends manual approval mode for operator updates.

Current Keycloak release
26.8.1
Keycloak database guide

Highly available Keycloak design

If the realm must keep working through a node or zone loss, pick one of the documented high availability architectures before deployment. Both supported designs need a synchronously replicated database, and that database is often the hardest part to get right. Multi-cluster v1 is deprecated, so do not design new work around it. Write down the recovery objective for sign-in, since a single Keycloak instance with a backup is a different risk from a replicated cluster.

High availability overview

TLS certificates and DNS names

Give the OX ingress and Keycloak their own fully qualified host names with valid TLS certificates that your browsers and servers trust. Redirect URIs in the OIDC client must match the OX host name exactly, so a later rename breaks sign-in for every user. Keep a record of certificate issuers and renewal ownership, including any internal certificate authority used for back-channel calls from the middleware.

Network paths in both directions

Browsers must reach Keycloak for the login redirect, and the OX middleware must reach Keycloak directly for back-channel calls such as token and metadata requests. These paths often cross different network zones, proxies or firewall rules. Test both paths from the actual OX pods, not from a workstation, and confirm that egress rules allow the token endpoint and the JWKS endpoint. Any outbound proxy setting needs to be included in the test.

Named owner for the realm and client

Assign one team to own the Keycloak realm, the OIDC client for OX App Suite, its redirect URIs, its signing keys and its logout settings. Another team usually owns the OX middleware configuration, so agree who changes what and how changes are reviewed. Without this, a client secret rotation or a new redirect URI can stall for weeks while each team waits on the other. Record the owner in the runbook before the first test login.

How a browser login travels between OX App Suite, Keycloak and the middleware

The login starts in the browser, which is redirected from the OX App Suite frontend to Keycloak for authentication and returns with an authorization code. That redirect leg is front-channel and carries no tokens. The code is then exchanged server-side between the OX middleware and Keycloak over the back channel, where the ID token is validated and the user and context are resolved. Session state is kept in Redis inside the cluster trust boundary. Check that tokens never reach the browser URL, and that the callback and logout paths match what your Keycloak client registers.

Front-channel redirects and back-channel token exchange across the cluster trust boundary.

Why the authorization code flow with PKCE and pushed authorization requests matters

The authorization code flow is the flow to plan for when OX App Suite acts as an OpenID Connect relying party of Keycloak. In this flow, the browser receives only a short-lived authorization code through the front channel, and OX App Suite exchanges that code for tokens directly with Keycloak over a back-channel request. Tokens never pass through the browser address bar, which keeps the ID token and any access token out of browser history, proxy logs and referrer headers. That exchange is also where the middleware resolves the user and the context from the ID token claims, so the claim mapping you choose determines who can sign in and which context they land in.

PKCE (Proof Key for Code Exchange) adds a per-login secret to that exchange. The client generates a random code verifier, sends only a derived code challenge in the front-channel request, and must present the original verifier when it redeems the code. An attacker who intercepts the authorization code cannot redeem it without the verifier. Whether OX App Suite sends PKCE parameters, and whether the Keycloak client is set to require them (Keycloak exposes this per client, including the PKCE method setting), are both things your team must confirm. Do not assume support until the OX OIDC documentation at OX App Suite OpenID Connect documentation states it for your release.

Pushed authorization requests (PAR) would move the authorization parameters out of the browser redirect. The client first posts its request parameters to Keycloak's pushed authorization endpoint over a back channel, receives a request URI, and then redirects the browser with only that reference. This keeps client IDs, scopes, redirect URIs and challenge values out of the front-channel URL. Confirm in the OX documentation whether the release can send a pushed request and how it is enabled on the Keycloak client, and test the redirect path end to end before you rely on it in a production sign-in.

Configure the Keycloak client and OX App Suite step by step

This sequence takes a Keycloak realm and client through to a tested OX App Suite OIDC login, with a check at each stage. Each check confirms that a stage works before the next one depends on it, so a failure can be traced to one configuration change.

  1. Create the Keycloak realm and client

    The platform team creates a dedicated realm for OX App Suite and a client for it. If Keycloak runs on the Keycloak Operator, define the realm with a KeycloakRealmImport resource and the client with a KeycloakOIDCClient resource, so the configuration lives in version control. Choose a confidential client if the OX middleware can keep a secret, and store that secret in your Kubernetes secret store. Check that the client appears in the admin console and that the realm's OpenID Connect discovery document loads from a browser or with curl.

  2. Set redirect and post-logout URIs exactly

    Register the OX redirect URI and post-logout redirect URI with the exact scheme, hostname and path that the OX OIDC documentation specifies for your version. Avoid wildcards in production, because a loose pattern widens the set of places Keycloak will return a code to. Confirm the path against your OX release before you enter it. Check by starting a login from a hostname that is not registered and confirming that Keycloak rejects the request with an invalid redirect error.

  3. Enable PKCE and pushed authorization requests

    Turn on the proof key for code exchange (PKCE) and pushed authorization requests in the client settings only if the OX OIDC documentation for your release lists them as supported in that configuration. Keycloak must match what the middleware sends, so confirm both sides before enabling anything. Check by capturing the browser redirect during login and confirming that the authorization request carries a code challenge, or that the pushed request endpoint is used, as your configuration requires.

  4. Configure the OX OIDC login backend

    In the OX middleware configuration, add the OIDC login backend with the issuer URL of your Keycloak realm, the client ID, the client secret and the scopes that the OX documentation requires, which normally include the openid scope. Confirm the exact property names against the OX OIDC documentation for your release, and load the secret from your secret store rather than a plain file. Check that the middleware starts without configuration errors and that the login page offers the SSO path alongside any existing login method.

  5. Map ID token claims to context and user

    Decide which claim identifies the OX context and which identifies the user, and confirm in the OX documentation how the middleware resolves each one. Add protocol mappers in Keycloak so the chosen claims appear in the ID token, using a test user with known attributes. Check by decoding a test ID token and confirming the claim values match the context and user that the pilot account already has in OX. A mismatch at this stage usually means the mapper or the resolution rule needs adjusting before any wider rollout.

  6. Set the logout behavior for both systems

    Configure front-channel or back-channel logout URIs in the Keycloak client only for the logout modes that the OX documentation for your release supports. The OX documentation also states what is not supported, so record those limits before you promise users behavior that OX does not provide. Check the result with a pilot session: sign out from OX and confirm the Keycloak session ends, then sign out from Keycloak and confirm the OX session is no longer valid.

  7. Restart middleware and clear session entries

    Roll the OX middleware pods so the new login backend loads, and clear any session entries that were created before the change, because Redis holds the session data in this deployment. Follow the session cache procedure in your OX release documentation rather than deleting keys by hand. Check that a session created before the change no longer works, and that a new login through Keycloak completes without a stale-session error.

  8. Test with one pilot account

    Sign in with a single pilot account that has a known context and user mapping, then open mail, calendar and Drive to confirm that the session works across the suite. If multifactor authentication is enabled in Keycloak, include it in the test, because MFA can change the login path. Check that the sign-in succeeds, that the user lands in the expected context, and that a clean logout from both systems follows. Record the results before you extend access to other users.

How Keycloak token claims map to OX App Suite contexts and users

This table compares each Keycloak token claim or attribute with the OX App Suite field it feeds, whether the mapping is required, and what your team must confirm. Read it as a checklist to run against your own Keycloak mappers before any user logs in. Mismatches in this layer are the most common cause of users landing in the wrong context or failing to sign in.

Keycloak claim or attributeOX App Suite field it feedsRequiredWhat to confirm
Subject identifier (sub)External identity key that links the OIDC login to an OX userYesExact claim name and whether OX matches on sub or another claim in the OX OIDC documentation; confirm sub is stable across realm changes
Login name (preferred_username or configured claim)OX login name used to find or create the userYesWhich claim OX reads for the login name, whether it is case sensitive, and how it compares with existing OX logins
Email address (email)OX primary email address and mail routing identityYesThat the mapper emits email only for verified addresses, and that the value matches the mailbox address used by IMAP and SMTP
Context selection claim (custom attribute or group path)OX context the user is resolved intoYesThe exact claim and resolution rule OX uses to pick the context, and a test with users in every context you operate
Group or role claim (realm or client roles)Access rights or feature gating inside OX, where your configuration uses themConditionalWhether OX reads groups or roles at all in your version, how multi-valued claims are handled, and what happens when the claim is absent
Audience (aud) and issuer (iss)Validation that the token was issued by your realm for the OX clientYesThat the OX client ID, issuer URL and audience values in OX match the Keycloak realm and client exactly, including the trailing path
Token lifetime and refresh behaviorSession length and re-validation of the OX loginNoKeycloak session and token settings against OX session timeouts, and how a disabled Keycloak user is reflected in OX
Keycloak user attributes used as fallbacksFallback values for context or login when standard claims are missingNoWhether fallbacks are used at all, since silent fallbacks are a common route to wrong-context logins, and who approves each one

Front-channel, back-channel and session-only logout compared

Front-channel logout runs through the user's browser. When logout starts, Keycloak sends the browser to the logout endpoint of each registered application, and each application clears its own session in that browser. The logout only reaches applications that the browser can load, so its outcome depends on the browser and its settings. Keycloak's administration documentation describes how clients register logout URIs: Keycloak server administration guide

  • Trigger: A user selects sign out in a Keycloak-managed flow, or an application starts a logout request that Keycloak handles.
  • Browser result: Session cookies for each registered application are cleared in that browser when the browser loads the logout URLs.
  • Closed browser or lost device: Nothing reaches a browser that is closed or on a lost device. Those sessions stay valid until they expire or are ended elsewhere.
  • Browser restrictions: Third-party cookie limits and content blockers can stop the hidden requests, so OX may end while another application stays signed in.
  • Verification: Confirm that OX App Suite's logout endpoint is registered as a front-channel logout URI for its Keycloak client, and that the OX documentation describes this mode before you rely on it.

Test a logout in a browser with third-party cookies restricted, then check that the OX session and a second application in the same realm both ended.

Security settings to decide before go live

These settings decide whether the Keycloak client for OX App Suite is safe to expose to users. Redirect rules, secret handling, token lifetimes, MFA placement, operator access and back-channel trust all change the same login path, so they should be agreed together and tested before go live.

Exact redirect URI matching

Register the exact OX App Suite callback URL for each environment in the Keycloak client, and avoid wildcards in production. A wildcard redirect lets a crafted link send an authorization code to a host you do not control. Check the scheme, host, port and path character by character, and confirm that the logout redirect is also listed. Keep development and staging URIs out of the production realm.

Client secret storage and rotation

Store the OIDC client secret in a secrets manager and inject it into the OX middleware at deployment, not in Helm values committed to source control. Plan rotation through the Keycloak client settings, then update the OX side in the same change window. Confirm which secret your OX release reads and how a rotated value is picked up without a full outage.

PKCE and token lifetimes in Keycloak

Require PKCE on the client so that the authorization code cannot be redeemed by an intercepting party. Set access token, refresh token and SSO session lifetimes in the Keycloak realm to match your policy for workstations and shared devices. Confirm that the OX session length and the Keycloak session length do not conflict, since mismatched timeouts create confusing sign-out loops.

MFA in Keycloak or in OX

Decide where second factors are enforced. Keycloak can require them for every application that uses the realm. The OX App Suite multifactor package restricts logins to the web UI, so mail, Drive and sync clients will still need application passwords. Confirm this split with your security team before go live, and document which clients each control covers.

Admin console and operator access

Limit who can sign in to the Keycloak admin console and who can change clients or mappers, and require MFA for those accounts. For the Keycloak Operator, the documentation strongly recommends manual approval mode for operator updates, which prevents unplanned upgrades of the identity provider. Schedule updates after you have tested them in staging.

Operator install docs

TLS and trust for back-channel calls

The OX middleware calls Keycloak directly to exchange codes and validate tokens. Use a certificate chain that the middleware trusts, including any internal certificate authority, and verify it from the middleware pods, not only from a workstation. Failed trust here shows up as login errors that look like client misconfiguration, so test the token and discovery endpoints from inside the cluster.

What is not supported and how to plan around the gaps

Confirm the unsupported edges of OIDC login before you commit to a scope, because the gaps decide which user groups still need another credential. Mail, CalDAV, CardDAV and Drive clients do not complete a browser OIDC flow, so an OIDC login in the web UI does not give a phone, desktop mail client or sync app a way to sign in. Plan for application passwords for those clients, or a separate OAuth path to IMAP and SMTP, which is covered in its own topic. Inventory every client type your users run today, including mobile mail apps, calendar and contact sync, and Drive desktop clients, and record how each one will authenticate on day one.

Treat any feature that the Open-Xchange documentation does not list as supported for OIDC as unsupported until it is confirmed in writing. That includes behaviors you may assume from Keycloak itself, such as particular token lifetimes, claim mappings beyond the ones documented, step-up flows or specific logout variants. Keycloak supports more protocol behavior than the App Suite relying party necessarily uses, so a working Keycloak feature does not prove that App Suite honors it. Keep the Keycloak version, the App Suite release (for example, the LTS line you intend to run) and the exact OIDC configuration in the same written record.

Before scope is agreed, ask DeployOpen or Open-Xchange for a written list of the OIDC behaviors supported for the exact App Suite release you will deploy, and ask for the Keycloak version it was tested against. Ask what happens to sessions when a client cannot complete the browser flow, which fallback applies to each client type, and which items are confirmed behavior versus planned work. Make that list an acceptance input for the test plan so that every gap is either closed by a test or written down as an accepted limitation with an owner.

Login and logout failures, their likely causes and fixes

This table maps common Keycloak-to-OX App Suite sign-in and sign-out symptoms to their likely causes and the first fix to try. Start with Keycloak event logs and OX middleware logs to narrow the cause, then confirm each fix against the documentation for your installed release before changing production settings.

SymptomLikely causeFix
Keycloak shows an invalid redirect URI error after loginThe redirect URI registered on the Keycloak client does not exactly match the callback URL OX App Suite sends, often because of a scheme, host, port or trailing slash difference behind the ingress.Compare the redirect_uri in the Keycloak event log with the registered client value and make them identical, including the public hostname the ingress presents.
Login fails with an issuer or discovery errorThe issuer or discovery URL configured in OX does not match the iss claim in the tokens, usually because the realm URL differs between the public and internal addresses.Set the OX issuer and discovery endpoint to the public realm URL that Keycloak uses as its issuer, then verify the discovery document loads from the OX pods.
Tokens are rejected as not yet valid or expiredClock skew between the Keycloak host, the Kubernetes nodes and the OX middleware pods pushes iat, nbf or exp checks outside the allowed window.Confirm time synchronization with NTP on every node and Keycloak host, then retest. Do not widen validation tolerances as a first step.
User signs in but lands in the wrong context or has no contextThe OX side cannot map the identity from the ID token to a context and user, for example because the claim used for lookup is missing, has a different name, or the account was never provisioned.Inspect the claims in the ID token, confirm the claim mapping in the OX OIDC configuration, and check that the user exists in the expected context before retesting.
Login loops back to the sign-in pageSession or cookie settings do not survive the ingress or Istio hop, such as cookies set for the wrong domain, missing secure or same-site attributes, or a proxy that rewrites host headers.Check the Set-Cookie headers in the browser for domain and attribute values, make the public host consistent across the gateway and OX, and review the Istio or ingress header rules.
Back-channel token or userinfo calls failA Kubernetes network policy blocks egress from the OX pods to the Keycloak endpoints, or the Keycloak certificate is issued by a CA that the OX trust store does not include.Allow the OX pods to reach the token and JWKS endpoints, then add the internal CA certificate to the trust configuration. Test the endpoints from inside a pod.
Logging out of OX leaves the session active in another applicationFront-channel or back-channel logout is not configured for every client, so Keycloak does not end the other sessions, or the OX logout callback is not reached.Confirm which logout method is enabled for each client in Keycloak, register the logout URIs, and verify with a test sign-out across both applications.
Token validation fails only for some usersSigning keys were rotated or the client uses an algorithm OX does not accept, and cached keys are out of date.Check the signing algorithm configured on the Keycloak client and the keys published at the JWKS endpoint, then refresh the OX key cache as your release documentation describes.

Questions teams ask before connecting Keycloak to OX App Suite

What drives the cost of connecting Keycloak to OX App Suite?

The cost follows the number of realms and clients, how much claim mapping the ID token needs to resolve contexts and users, how mature the existing Keycloak setup is, and how much logout behavior must work. Each of these changes the configuration work, the test matrix and the review time. Ask any quote to list the realms in scope, the claims that map to OX contexts and users, whether front- and back-channel logout are required, and which environments (lab, staging, production) are included. Fixed-scope work is agreed in writing before it starts, so a clear scope list is what makes the number comparable across bidders.

Which parts of the integration are one-time work and which recur?

The initial build is one-time: realm and client configuration, OIDC settings in OX App Suite, claim mapping, logout setup and acceptance testing. Recurring work comes from keeping the integration current, including Keycloak releases, OX App Suite upgrades, certificate renewal, and retesting login and logout after each change. Ask whether a quote includes a handover runbook and whether ongoing support is a separate retainer. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, which are priced separately from the build.

Can an internal team connect Keycloak to OX App Suite without a partner?

Yes, a capable internal team can do it, but it needs people who understand OpenID Connect, Keycloak administration and OX App Suite configuration, and who can test logout across browsers. The skills most often missing are claim design for context and user resolution and a test plan that covers session expiry and single logout. Keycloak's own documentation covers the server side in depth, and the OX OIDC documentation covers the relying party settings. Plan for a pilot realm and a rollback path before changing production login.

How long does the work take for a given scope?

Duration depends on the scope rather than on a fixed number of days. A single realm with one OX App Suite environment and standard claims is a smaller job than several realms, custom claim mapping and staged rollout to different user groups. Testing and the change window often take longer than the configuration itself. No supplied source gives a timeline for this integration, so ask each provider for a phased plan with milestones for design, build, test and cutover, and for the assumptions behind each phase.

What does the client need to provide before the work starts?

The work needs a named realm owner in Keycloak who can approve client settings, a DNS name and TLS certificate for the OX App Suite endpoint, and test accounts covering each user group and at least one administrator. It also needs access to the Keycloak administration interface or a change request process for it, and a change window agreed with the business. If Keycloak runs on Kubernetes through the Keycloak Operator, the client should confirm who owns the update approval settings, since the Keycloak Operator documentation strongly recommends manual approval mode for operator updates.

What changes when Keycloak or OX App Suite is upgraded?

Both products move on their own release schedules, so each upgrade can change behavior that the integration depends on. Keycloak plans four minor releases a year and says breaking changes in a minor release will be opt-in, while OX App Suite v8 has standard releases and LTS releases with defined support windows. Before each upgrade, retest login, token refresh, and logout in a staging environment. Keycloak migrates its database schema automatically at startup by default, but administrators can apply the SQL manually, which the upgrading guide suggests for large deployments.

Does the integration cover multifactor authentication and logout for every client?

Not automatically. Single sign-on and logout are separate pieces of work, and multifactor enforcement is a Keycloak policy decision that should be confirmed for each user group before go-live. Front- and back-channel logout need to be tested in each browser and client the organization uses, including what happens to mail, Drive and sync clients that hold their own sessions. Ask each provider to state in writing which logout behaviors and which unsupported features are in scope, so gaps are visible before the change window.

How DeployOpen scopes and delivers OX App Suite single sign-on with Keycloak

DeployOpen plans, builds and hands over the OIDC link between OX App Suite and Keycloak inside your own infrastructure. Each engagement starts with a written scope that names the Keycloak realm, client, redirect paths, logout behavior and the users or contexts that sign in through it.

How we scope

  • We confirm your OX App Suite v8 and Keycloak versions against the supported requirements before any design work starts.
  • The written scope lists the Keycloak realm, OIDC client, PKCE and pushed authorization request settings, and which contexts and users sign in this way.
  • We agree in writing whether front-channel and back-channel logout are in scope, and which fallback applies when a logout path is not supported.
  • Engagements are fixed-scope, with deliverables and timelines agreed before work begins. Ongoing support is available as a retainer.

How we build

  • We configure the Keycloak realm and OIDC client, then wire the OX App Suite OIDC authentication settings to match the agreed claims and redirect URIs.
  • We set up context and user resolution from the ID token and test it with real accounts from each group in the scope.
  • We test login, token refresh, logout and failure paths, including expired sessions and users missing required claims.
  • We align the Keycloak deployment with its production database, high availability and operator update settings where they are in scope.

How we hand over

  • You receive a configuration record covering the realm, client, mappers, OX App Suite settings and the test results for each login path.
  • We document the known limits, including the features OX App Suite does not support over OIDC, so your team can plan around them.
  • We walk your identity and platform engineers through the runbook for certificate rotation, client secret changes and rollback to the previous login method.
  • Test evidence is delivered in a form your security and compliance team can review, without us issuing any audit or certification.

How we support

  • Support covers Keycloak and OX App Suite upgrades, so each version change is tested against the OIDC login before it reaches users.
  • Retainers can include continuous testing of the login flow and periodic review of Keycloak release notes that affect your configuration.
  • Changes to claims, groups or user provisioning are scoped and tested before they go live, to avoid breaking existing sign-ins.
  • Where a security review is needed, DeployOpen can test the SSO setup and deliver a findings report with fixes and a retest.

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.