How OpenProject SSO with Keycloak works over OpenID Connect
OpenID Connect is the supported method for signing staff in to self-hosted OpenProject with credentials Keycloak already manages. OpenProject configures this through its OpenID provider settings, where you register Keycloak as an identity provider. The OpenProject documentation has you create an OpenID Connect client in Keycloak with the standard flow enabled, a valid redirect URI of the form https://<OpenProject host>/auth/oidc-keycloak/*, and an optional backchannel logout URL. OpenProject then takes the login name from the preferred_username claim, so the value in that Keycloak field must match the usernames your staff already use in OpenProject, or you will create duplicate accounts.
Before you start, confirm three things with your own environment. First, the exact host name OpenProject will serve, because the redirect URI must match it character for character, including the scheme. Second, which Keycloak realm and client naming convention your identity team uses, so the client ID and secret are stored and rotated like other production credentials. Third, whether your OpenProject edition includes SSO. OpenProject lists single sign-on among its Enterprise features, and the pricing page places it in the Professional plan tier and above. Plan the license decision before the Keycloak client work, since the client is useless on a Community installation.
SAML is the documented alternative. OpenProject's SAML guide also covers Keycloak and uses its own callback path, /auth/saml-keycloak/callback, so the two methods are not interchangeable at the redirect level. Choose one per provider and test it end to end with a non-administrator account. The sections that follow cover the client settings, username mapping, group claims and logout behavior that differ between these choices.
What you need before configuring Keycloak and OpenProject
Most delays in an OpenID Connect setup come from details settled before anyone opens an admin console. Confirm the OpenProject edition, the host name, the Keycloak release and database, network paths and named owners on both sides first, so the client and redirect settings can be built once and tested.
OpenProject edition and plan
OIDC single sign-on is an Enterprise feature, so the Community edition cannot use this setup. The Professional plan is listed at 10.95 euros per named user per month with a 25-user minimum, according to OpenProject pricing. Confirm the plan in writing with the vendor and check the installed version against the current release notes before you start.
OpenProject pricingOpenProject host name and certificate
The redirect URI is built from the public host name of OpenProject, so that name must be fixed before the Keycloak client is created. Confirm the DNS record, the HTTPS certificate chain trusted by users and by the Keycloak server, and whether any reverse proxy changes the scheme or path. A later host name change means editing every redirect URI again.
Keycloak release and database
Keycloak 26.8.1 is the current release according to keycloak.org, published October 13, 2026. Use a supported production database rather than the development file database, and confirm that the PostgreSQL version falls within the supported range (14 to 18). Decide whether schema migration runs automatically at startup or is applied manually, since large deployments often choose the manual route.
Keycloak database guideNetwork path to the Keycloak issuer
OpenProject must reach the Keycloak discovery document and token endpoint from its server, and users' browsers must reach the Keycloak login page. Test both directions through firewalls, proxies and any internal certificate authority before configuration. Backchannel logout also requires OpenProject to be reachable from Keycloak, so verify that path separately.
Named owners on both sides
Assign one administrator for the OpenProject instance who can change authentication settings and one for the Keycloak realm who owns the client, mappers and group claims. Agree who approves changes to redirect URIs and client secrets. Keep a break-glass local admin login in OpenProject before enabling SSO, so a misconfigured claim does not lock everyone out.
Configuring the Keycloak client and OpenProject provider in order
This sequence produces a working OpenID Connect sign-in path from Keycloak to OpenProject, with each stage confirmed before the next one depends on it. Work through it in a test environment first, then repeat it in production once the username and redirect behavior are verified.
Choose or create the Keycloak realm
The Keycloak administrator either selects an existing realm that already holds the workforce accounts or creates a dedicated realm for OpenProject. Keep the realm name and the issuer URL it produces, because OpenProject needs the issuer when you register the provider. Confirm the realm is enabled and that its OpenID Connect discovery document loads in a browser at the realm's well-known configuration path. Discovery reachable from the OpenProject host is the check that closes this step.
Create the OpenID Connect client
In the Keycloak admin console, create a client with the OpenID Connect protocol and enable standard flow, which is the authorization code flow OpenProject uses. Set the valid redirect URI to https://<OpenProject host>/auth/oidc-keycloak/*, replacing the placeholder with your OpenProject hostname over HTTPS. If you use back-channel logout, add the optional backchannel logout URL at this point. Save the client, then copy the client ID and generate or record the client secret from the credentials tab. The check is that the client appears in the clients list with standard flow shown as enabled and the redirect URI saved exactly as entered.
Map the username claim to preferred_username
Still in Keycloak, confirm that the claim OpenProject receives for the login name is preferred_username. The OpenProject provider documentation maps the username from this claim, so the Keycloak user profile must populate it for every account that will sign in. Check a test user's attributes and the client's token preview (the evaluate tab in the client scope view) to confirm the token contains preferred_username with the expected value. If the claim is missing, fix the user attribute or the mapper before continuing.
Register the OpenID provider in OpenProject
As an OpenProject administrator, open the authentication settings and add an OpenID Connect provider using the Keycloak option or a custom OpenID provider entry. Enter the issuer URL from the realm, the client ID and the client secret from the previous step, and set the username mapping to preferred_username. Save the configuration and confirm that OpenProject accepts the issuer without a discovery error. The check is that the provider appears in the list of sign-in options on the login page, which means OpenProject has loaded the provider metadata.
Confirm the redirect returns to OpenProject
Open an private browser window, go to the OpenProject login page, and choose the Keycloak sign-in option. You should reach the Keycloak login form on the realm's host, which confirms the authorization request was built correctly. After authenticating, the browser should return to OpenProject at the callback path under /auth/oidc-keycloak. If Keycloak reports an invalid redirect URI, the value on the client does not match the host and path OpenProject is calling, so correct it on the client rather than loosening the wildcard further.
Test sign-in with a non-admin account
Sign in with a standard user account that has no OpenProject or Keycloak administrator rights, not the administrator who configured the provider. Verify that the user lands in OpenProject, that the username field is populated from preferred_username, and that the account name and email look correct. Repeat with a second user if your environment uses different attribute values. Test the logout path as well, because back-channel logout behavior depends on the optional URL you configured. The sequence is complete when a non-admin user signs in and out successfully with a populated username.
How a sign-in travels between the browser, OpenProject and Keycloak
The sign-in starts in the browser, when a user opens OpenProject and is redirected to Keycloak to authenticate. Keycloak then returns the user to the OpenProject callback at /auth/oidc-keycloak/ with an authorization code. OpenProject exchanges that code server to server, reads preferred_username from the token and matches it to the local account. The browser and the OpenProject server sit on one side of the trust boundary, and Keycloak sits on the other. Check that the redirect URI matches exactly, that the username claim is the one your users expect, and that the optional backchannel logout path reaches OpenProject.
Authorization code sign-in between the browser, OpenProject and Keycloak, with optional backchannel logout.
Which Keycloak claims map to OpenProject user and group fields
This table compares each Keycloak claim or setting with the OpenProject user or group field it feeds. Read it before you configure the client mappers, so the login name, profile fields and group data arrive in the form OpenProject expects. Group membership is the one row that needs extra work on both sides and an Enterprise plan.
| Keycloak claim or setting | OpenProject field | Notes |
|---|---|---|
| preferred_username claim | Login (username) | Map this claim as the OpenProject username. Confirm that each Keycloak username is unique and stable, because it becomes the login. |
| email claim | Email address | Confirm the email scope is requested by the OpenProject client. Email is used for notifications and for matching existing accounts. |
| given_name and family_name claims | First name and last name | Included when the profile scope is granted. Blank values in Keycloak leave the OpenProject profile fields empty. |
| groups claim | Group membership | Needs a group membership client mapper in Keycloak, or the claim is not sent. Group synchronization is an Enterprise feature. Sync behavior and manual memberships are covered in the OIDC group sync topic. |
| Group membership client mapper | Source of the groups claim | Add it to the OpenProject client in Keycloak, set the token claim name to the value OpenProject reads, and decide whether to use full group paths. |
| Client scopes (openid, email, profile) | Which claims are returned at login | Confirm the client scopes are assigned to the OpenProject client. Missing scopes are the most common reason a field is empty after sign-in. |
| Redirect URI and logout settings | Login callback and logout behavior | The redirect URI uses the /auth/oidc-keycloak/* pattern. Test a new user login after every mapper change, because existing accounts keep their stored values. |
Choosing OpenID Connect or SAML for Keycloak
OpenID Connect is the usual choice when your team already works with OAuth 2.0 clients and wants a lightweight token-based flow. In Keycloak you create an OpenID Connect client with standard flow enabled, and register the redirect URI for OpenProject's Keycloak provider, which follows the pattern https://<OpenProject host>/auth/oidc-keycloak/*. OpenProject maps the username from the preferred_username claim, so confirm that your Keycloak users carry a value there that matches how you want accounts named.
- Documented client setup: OpenProject's OpenID provider documentation describes the client, redirect URI and username mapping directly, which shortens the build.
- Redirect URI: The wildcard path must match your public OpenProject host exactly, including the scheme, or sign-in fails at the callback.
- Username mapping: Map the username from
preferred_username, and check it against existing OpenProject accounts before go-live. - Backchannel logout: An optional backchannel logout URL lets Keycloak notify OpenProject when a session ends, which matters if you need sessions to close together.
- Best fit: Teams that run modern web applications, already use OIDC clients elsewhere, and want the simplest configuration path.
Before choosing, confirm the current redirect URI pattern, claim names and logout behavior in the OpenProject OpenID providers documentation for your release.
SAML 2.0 fits organizations whose identity estate is already built on SAML federation, or whose security team standardizes on XML-based assertions and metadata exchange. OpenProject's SAML guide documents Keycloak as a provider, and the callback path to configure in Keycloak is /auth/saml-keycloak/callback. The setup centers on exchanging metadata between the two systems and agreeing on which attributes OpenProject receives.
- Documented guide: OpenProject's SAML documentation covers Keycloak, so the callback path and setup steps are written down for this combination.
- Metadata exchange: Export the identity provider metadata from Keycloak and import it into OpenProject, then repeat in the other direction if your setup requires it.
- Attribute mapping: Decide which attributes carry the login name, email and any group values, and confirm the names match on both sides.
- Certificate and signing: Plan certificate rotation and signing settings up front, since mismatched certificates are a common cause of failed logins.
- Best fit: Organizations with existing SAML service providers, audit requirements that favor SAML assertions, or security teams that already manage SAML certificates.
Before choosing, confirm the callback path, required attributes and metadata steps in the current OpenProject SAML documentation, and check whether the SAML option is included in your OpenProject plan.
Most teams can decide quickly by looking at the systems they already operate. Start with the applications that already use Keycloak, then check how your security team manages certificates, metadata and session logout. Whichever protocol you choose, the Keycloak client, OpenProject provider settings and user identifiers must line up before you test with a real account.
- Existing clients: If Keycloak already serves OIDC clients for other applications, the OpenID Connect path adds the least new machinery.
- Existing SAML estate: If other service providers already exchange SAML metadata with Keycloak, a SAML client keeps the operating model consistent.
- Logout expectations: Decide whether session end must propagate to OpenProject, since backchannel logout is documented for the OIDC route.
- Identifier stability: Check that the username or login attribute you plan to map is unique and stable across your directory.
- Test path: Plan a test realm or test user and keep a break-glass admin login available while you verify the chosen protocol.
Before you commit, confirm the requirements for the chosen protocol with the current OpenProject documentation and your Keycloak version.
Hardening the Keycloak to OpenProject trust relationship
The OpenProject and Keycloak connection is only as strong as the controls around it. The cards below cover the transport, secret handling, redirect scope, token lifetimes, admin roles, a break-glass login and monitoring that together keep sign-in both protected and recoverable.
Enforce HTTPS on both sides
Serve OpenProject and Keycloak only over HTTPS, so the authorization code, tokens and session cookies never travel in clear text. Confirm that the OpenProject host in the redirect URI uses https, that Keycloak's hostname and proxy settings produce https endpoint URLs in its discovery document, and that no internal hop downgrades the connection. Check the Keycloak production configuration guide for the required settings before go-live.
Keycloak production guideKeep the client secret out of config files
Keycloak's OpenID Connect client should be confidential, and its client secret should be injected at runtime from a secrets store or environment variable rather than written into OpenProject configuration files or version control. Confirm who can read the secret in both systems, set a rotation procedure, and record when it was last changed so a leaked value can be replaced without an outage window.
Restrict redirect URIs to the documented path
Register only https://<OpenProject host>/auth/oidc-keycloak/* as a valid redirect URI, and avoid wildcard hosts or broad patterns beyond that path. Review the list whenever a hostname changes, because a permissive entry lets an attacker who controls another path on the same realm receive authorization codes. Remove any leftover entries from test instances.
Set short session and token lifetimes
Set access token, SSO session idle and SSO session maximum lifetimes in the Keycloak realm according to your risk policy, and keep them short enough that a stolen token or abandoned session expires quickly. Test how OpenProject behaves when a session ends, including whether users are returned to the Keycloak login page, and align the values with any internal session policy your security team already applies.
Grant Keycloak admin roles by least privilege
Limit who can change the OpenProject client, its mappers and the realm's authentication flows. Use realm-level roles or fine-grained permissions so that operators who manage users do not also edit client redirect URIs or secrets. Review admin role assignments on a fixed schedule and log changes to clients and mappers, since a single edit to a mapper can change which OpenProject groups a user receives.
Keep a break-glass admin login
Keep at least one OpenProject administrator account that can sign in without Keycloak, and store its credentials under dual control. Test the internal login route and confirm it still works after each provider change. If Keycloak is unavailable, this account is the only way to change OpenProject settings, so verify it before enabling SSO for all users.
Monitor sign-in health with metrics
Enable Keycloak's metrics endpoint and collect login success and failure counts from the server, so that a spike in failed authorization or token requests appears before users report a lockout. Pair these with OpenProject application logs for failed SSO callbacks. Agree alert thresholds with the team that runs Keycloak, and review the metrics guide to confirm which series your version exposes.
Keycloak metrics guideWhy Keycloak sign-in to OpenProject fails and how to fix it
This table lists the sign-in failures most often seen when OpenProject uses Keycloak over OpenID Connect, with the likely cause and the fix for each. Read it from the symptom a user reports backward to the cause, and check the redirect URI and username mapping first, since they account for most failed logins.
| Symptom | Likely cause | Fix |
|---|---|---|
| Keycloak shows an invalid redirect URI error after sign-in starts | The client's valid redirect URIs do not match https://<OpenProject host>/auth/oidc-keycloak/* exactly, often because of http versus https, a different host name or a missing wildcard | Set the valid redirect URI in the Keycloak client to the exact OpenProject host, using https, and confirm the host matches the OpenProject host setting character for character |
| Login completes but OpenProject reports an account creation error or a blank username | The username is not mapped from preferred_username, or the claim is missing from the ID token because the client mapper was removed or renamed | Confirm the OpenProject provider maps the username from preferred_username, check the client scope mappers in Keycloak, and decode a test token to verify the claim is present |
| Sign-in fails intermittently with token validation or expiry errors | Clock skew between the OpenProject server and Keycloak, so tokens appear issued in the future or already expired | Synchronize both servers with NTP, check the time zone and drift on each host, and retest a sign-in after correcting the clocks |
| OpenProject cannot start the login or fetch configuration | The issuer URL is wrong, Keycloak is unreachable from the OpenProject container, or a proxy or certificate trust issue blocks discovery | Test the realm's well-known OpenID configuration endpoint from the OpenProject host, confirm the issuer matches exactly, and trust the internal certificate authority where needed |
| Sign-in suddenly fails for all users after a secret change | The client secret was rotated in Keycloak but not updated in OpenProject, or the reverse | Generate or copy the new secret in one step, update the OpenProject provider configuration at the same time, and keep the old secret active until the change is verified |
| Sign-in changes behavior after a Keycloak upgrade | A minor or major release changed defaults or client behavior, and the Keycloak backwards compatibility notes list what changed | Read the backwards compatibility notes for each version in the upgrade path, test the OIDC client in a staging realm first, and keep the Keycloak Operator in manual approval mode |
| Users cannot sign in at all when Keycloak is down | OpenProject has no alternative login path because password login is disabled for all accounts | Plan a break-glass administrator login before enabling SSO, and confirm which password login modes remain available if the identity provider is unreachable |
Questions buyers ask about Keycloak SSO for OpenProject
Does Keycloak OIDC single sign-on work on the OpenProject Community edition?
No. Single sign-on through OpenID Connect is part of the Enterprise feature set, which OpenProject lists alongside SAML, CAS, Kerberos and Okta on its pricing page. The Community edition is free and includes work packages, Gantt charts, agile boards, time tracking and dashboards, with community support, but it does not include the sign-in integration described here. Enterprise on-premises is priced per named user per month, with Professional at 10.95 euros and a 25-user minimum, so confirm the edition and user count you need before planning the Keycloak work. Ask your vendor or DeployOpen to confirm the current plan requirement against the edition you intend to run.
What drives the effort of a Keycloak SSO setup for OpenProject?
The effort depends on how many Keycloak realms and clients are involved, how group membership should flow from Keycloak into OpenProject, how many existing OpenProject accounts must be matched to Keycloak identities, and how Keycloak itself is deployed. The main cost drivers are:
- Realm and client design, including whether one realm serves several applications and how the OpenProject client is scoped.
- Group logic, such as which claims carry group names and how they map to project roles.
- Existing accounts, because usernames and email addresses must line up with the
preferred_usernamevalue before users can sign in without duplicates. - Keycloak deployment model, whether a single instance, a clustered setup with a synchronously replicated database, or an operator-managed install on Kubernetes.
How long does Keycloak SSO for OpenProject take to set up?
Duration depends on the scope agreed in writing, so it should come from a written plan rather than a general estimate. A plan should state the Keycloak and OpenProject environments involved, the realms and groups in scope, the number of accounts to match, the test cycle, and the cutover window. Ask for each phase to be listed with its owner and its exit check, including the test sign-ins on a non-production OpenProject instance. DeployOpen works on fixed-scope engagements where scope, deliverables and timelines are agreed in writing before work starts, so request that document as the basis for the schedule.
What does our team need to provide for the Keycloak SSO work?
The team needs to provide access and decisions that only the organization can make. Confirm these items before work starts:
- Keycloak administrator access to the target realm, with rights to create clients, mappers and groups.
- OpenProject administrator access on a test instance and, later, on production.
- A test group of users who can sign in during validation, including at least one user who already has an OpenProject account.
- DNS records for the OpenProject host and valid certificates for both the OpenProject and Keycloak endpoints, since redirect URIs must match the OpenProject host exactly.
- A named approver who signs off the scope, the group mapping rules and the cutover date.
Can our internal team set up Keycloak SSO for OpenProject without a partner?
Yes, if the team already has Keycloak administration skills, OpenProject administration skills and a test environment where changes can be tried before production. The core configuration is an OpenID Connect client with standard flow enabled, a valid redirect URI of the form https://<OpenProject host>/auth/oidc-keycloak/*, an optional backchannel logout URL, and a username mapped from preferred_username. The harder parts are group claims, matching existing accounts and testing logout and rollback. Teams without that experience usually benefit from a partner review of the design. Whichever route you choose, keep a break-glass administrator login available before enforcing SSO.
Why does the username mapping from preferred_username matter?
OpenProject's OpenID provider documentation maps the username from the preferred_username claim, so this value decides which OpenProject account a Keycloak user lands in. If Keycloak usernames differ in format from existing OpenProject logins, sign-in can create a second account instead of reusing the existing one. Compare a sample of current OpenProject usernames with the Keycloak values during planning, decide whether to rename accounts or adjust the mapping, and test with a user who has an existing account. Record the decision so later provider changes do not silently break matching.
What changes for users at cutover from password login to Keycloak?
Users sign in through the Keycloak login page instead of entering an OpenProject password, and they may be redirected there from OpenProject's sign-in page. Their OpenProject data, projects and work packages stay in place when the account matches. Users may need to sign out of an existing session and sign in again, and any saved bookmarks to direct login pages will stop working as expected. Tell users in advance which address to use, what to do if sign-in fails, and who to contact. Keep the break-glass administrator login and a documented rollback step in the cutover plan, and confirm the logout behavior in testing, since backchannel logout is an optional setting.
Keeping the Keycloak connection working through upgrades
Keycloak changes on a predictable schedule, and the sign-in path to OpenProject is only as stable as the upgrades you apply to it. Keycloak plans four minor releases a year and a major release every two to three years, and the project says breaking changes in a minor release will be opt-in. That makes the Keycloak version you pin the main control. Treat each new minor release as a change to review, not a background update, and read the upgrading guide before you move the server, the Operator or the realm configuration. Confirm the current release notes against your own build before you schedule anything.
If you run Keycloak on Kubernetes with the Keycloak Operator, set the Operator to manual approval mode. The Operator documentation strongly recommends this to avoid unintended automatic upgrades, and it gives your team a chance to test the new version against the OpenProject client before production changes. Database schema migration runs automatically at startup by default. That is convenient in a test environment, but for a large production database you may prefer manual migration, where your administrators apply the SQL themselves after review. Ask your DBA which approach fits your change process and rehearse the migration on a restored copy of the database.
Pin the Keycloak and OpenProject versions in a test environment first, then promote the same combination to production. After every Keycloak upgrade and every OpenProject upgrade, run a full sign-in test: the redirect to /auth/oidc-keycloak/, the preferred_username mapping, group claims if you use them, and backchannel logout. Check that an existing break-glass admin login still works. Record the tested version pair in your change log so that a rollback has a known target.
How DeployOpen scopes and delivers OpenProject SSO with Keycloak
DeployOpen treats OpenProject SSO with Keycloak over OpenID Connect as a fixed-scope piece of work inside your own infrastructure. We agree the client, redirect URI, claim mapping and fallback login in writing first, then build and test the sign-in flow in a staging setup before anything changes for your users.
How we scope
- Confirm the OpenProject host, the Keycloak realm and the protocol choice between OpenID Connect and SAML before any configuration starts.
- Agree in writing which claims, group mappings, logout behavior and existing-account handling are in the engagement.
- Confirm your OpenProject edition and plan, since SSO and group features are Enterprise features and require a plan that includes them.
How we build
- Create the Keycloak client with standard flow and the agreed redirect URI under the /auth/oidc-keycloak/ path, then map the username from preferred_username.
- Configure group claims and optional backchannel logout, and test how memberships behave for users who sign in with existing accounts.
- Test sign-in, sign-out and a provider failure in staging, and confirm a break-glass admin login works before production cutover.
How we hand over
- Deliver a written record of the client settings, redirect URIs, claim mappings and the test results for your security and identity teams.
- Document the fallback login route and the steps to change the Keycloak client secret or redirect URI without locking users out.
- Walk your administrators through the configuration so they can review changes and understand the upgrade notes for both products.
How we support
- Support and upgrades for OpenProject and Keycloak are available as a retainer, scoped separately from the initial build.
- Re-test the sign-in flow after OpenProject or Keycloak upgrades, including any change to Keycloak's database migration or operator settings.
- Confirm with your team the ongoing ownership of the Keycloak realm, operator update approval and access reviews before the engagement closes.

