Zammad SAML SSO with Keycloak: what the integration does
The supported way to sign Zammad agents in through a Keycloak realm is SAML 2.0 via Zammad's third-party login, with Keycloak acting as the identity provider and Zammad as the service provider. Zammad does not hold the passwords for these agents. It trusts a signed assertion from Keycloak that says who the user is, and it creates or matches a local Zammad account from that assertion. Keycloak, in turn, owns authentication, multi-factor policy, the realm's user store and any brokered upstream identity providers, while Zammad owns ticket permissions, roles and group access once the user is inside. Keeping those two responsibilities separate is the main design point of this integration, because a user who passes Keycloak still receives only the roles Zammad assigns to them.
The integration is configured on both sides and tied together by metadata exchange. You create a SAML client in Keycloak that represents Zammad, then import or copy the identity provider and service provider details between the two systems so each side knows the other's entity identifier, signing certificate and endpoint URLs. Several values must match exactly on both sides, including the entity identifier, the assertion consumer service URL built from your public Zammad hostname, and the protocol binding. A mismatch usually shows up as a redirect loop or a rejected assertion rather than a clear error, so the reader should record the hostname, realm name and certificate details before starting and confirm that the Zammad external URL matches what Keycloak will redirect to. Confirm the exact configuration keys and any version-specific screens against the current Zammad admin documentation and the Keycloak server administration guide before you change production settings.
What you need before configuring Zammad SAML with Keycloak
Six items have to be in place before any SAML setting is changed. Each one either controls where the trust relationship lives or determines whether the login flow can complete, so check them in order. Confirm each item in the environment you will actually configure, not in a test copy.
Zammad instance with public HTTPS URL
Zammad needs a single, stable public HTTPS address that agents' browsers reach directly. The SAML assertion consumer service URL is derived from this address, so a later change of hostname or scheme breaks every login until Keycloak is updated. Confirm the external URL, the reverse proxy in front of Zammad, and that the certificate is valid for that exact hostname.
Zammad requirementsSupported Keycloak release
Use a supported Keycloak release and check the upgrade path before you deploy. The current release is 26.8.1, published October 13, 2026. Record the exact version you run, because SAML behavior and admin console labels can change between minor releases, and the Zammad settings you enter depend on what your Keycloak version exposes.
Keycloak upgrade guideProduction database for Keycloak
Keycloak's dev-file database is for development only. Production needs one of the supported databases, such as PostgreSQL in a version on the supported list. Decide who owns backups for that database, since losing it means losing realm configuration, including the SAML client you are about to create.
Keycloak database guideRealm and administrator access
Create or pick a dedicated realm for Zammad rather than placing the client in the master realm. You need an account with permission to create clients, manage realm keys, and view user attributes. Agree in advance which person approves changes to the SAML client, because a wrong signing or name ID setting blocks all agent logins.
Keycloak admin guideTLS certificates on both sides
Zammad and Keycloak both need valid HTTPS endpoints, and Keycloak's signing certificate must be trusted by Zammad once you import its metadata. Record certificate expiry dates for both sides and assign an owner for renewal. A certificate that expires silently is one of the most common causes of SAML logins failing on a Friday.
Test user group and admin documentation
Create a small test group in Keycloak that contains only a few named test accounts, one for each intended Zammad role. Use it to verify attribute mapping and role sync before you open login to all agents. Also check Zammad's admin documentation for the exact SAML fields in your installed version, since field names and defaults can differ from this guide.
Zammad third-party docsHow to configure the Keycloak SAML client and Zammad step by step
This sequence connects Zammad to a Keycloak realm over SAML 2.0 so agents sign in through the identity provider, with metadata exchanged, certificates and name ID agreed, attributes mapped and both login and logout tested before go-live.
Confirm the prerequisites in both systems
Before touching settings, confirm that you have administrator access to the Zammad instance and to the Keycloak realm that will hold your agents, and that Zammad is reachable at the public HTTPS hostname users will type into their browsers. Keycloak should be running a supported release, and you should decide which realm and which groups or roles will be allowed to sign in. Record the exact hostname now, because the entity ID and assertion consumer service URL in later steps are built from it. The step is done when you have a written note of the Zammad hostname, the Keycloak realm name and the group that will receive access.
Enable SAML in Zammad third-party settings
In Zammad's admin settings, open the security section for third-party applications and enable the SAML provider. Leave the identity provider fields empty for now, because Zammad needs to generate its own service provider metadata first. Save the change and confirm the SAML entry appears as enabled. Verification: reload the settings page and check that the SAML option still shows as enabled, and that Zammad exposes a metadata address you can open in a browser without an error page. Keep the session open, since a misconfigured login provider can lock out administrators who depend on it.
Export Zammad metadata and review its endpoints
Download or open the service provider metadata that Zammad publishes for SAML. Read the entity ID, the assertion consumer service location and the single logout location, and confirm that each one uses the HTTPS hostname recorded in step one. If any value shows an internal hostname, a missing scheme or a placeholder, correct the public URL in Zammad's system settings and regenerate the metadata before going further. Verification: save the metadata file and check the three values against your written note. Mismatches here are the most common cause of failed logins later, so the check is worth doing carefully.
Create the SAML client in Keycloak and import metadata
In the Keycloak admin console, select the target realm and create a new client with the SAML protocol. Use the import option to load the Zammad metadata file, which should populate the client ID as the entity ID and the redirect locations from Zammad. Review the imported values in the client settings and make sure they match what you saw in the metadata review. Verification: the client appears in the realm client list with the SAML protocol, and its valid redirect URI and assertion consumer service URL both point at your Zammad hostname with the path Zammad published. If the import fails, edit the fields by hand using the same values.
Set signing, certificate and name ID settings
In the Keycloak client, decide how assertions are signed and which certificate Zammad will validate against. Keep client signature requirements aligned with what Zammad expects, and confirm which realm key Keycloak uses for signing so the certificate you export matches it. Choose a name ID format that uniquely identifies each agent, typically the email address or the username, and set the matching mapper so the same value reaches Zammad every time. Verification: export the realm signing certificate from Keycloak, paste it into Zammad's SAML identity provider certificate field, and confirm Zammad accepts the save without a certificate error. Document the chosen name ID format, because changing it later will break account matching.
Map attributes and configure the Zammad identity provider
Add protocol mappers in Keycloak so that the assertion carries the attributes Zammad needs to create or match an account, usually the email address, first name and last name, and optionally group membership if you plan to drive roles from it. Then enter the Keycloak SSO URL and identity provider details into Zammad's SAML settings, along with the same name ID format you chose. Review whether automatic account creation should be on for your first test. Verification: sign in as a test user from a private browser session and confirm that the Zammad account shows the expected email, names and, where configured, group membership. Attribute names must match exactly on both sides, so compare the assertion you see in the Keycloak client's evaluation tool with the fields Zammad expects.
Test login, logout and failure paths
Run the full flow with at least one agent account and one account that should be refused. Start from the Zammad login page, choose the SAML option, authenticate in Keycloak and confirm you land in Zammad as the correct user with the correct role. Then sign out of Zammad and confirm whether single logout also ends the Keycloak session, which depends on the logout settings you configured. Finally, test a user outside the permitted group to confirm access is denied. Verification: record the results of each test, and keep a local administrator login available until all three paths behave as planned. Retest after any change to certificates, hostnames or the Keycloak realm.
How the SAML trust between Zammad and Keycloak is built
The SAML trust between Zammad and Keycloak rests on a small set of values that each side must agree on exactly: the entity ID that identifies Zammad as the service provider, the assertion consumer service (ACS) URL where Keycloak posts its responses, and the signing certificate that proves a response really came from Keycloak. Zammad publishes its own values in a metadata document, and importing that document into a Keycloak client is the usual way to make the two sides match. Keycloak in turn gives Zammad its identity provider metadata, including its signing certificate and single sign-on endpoint. Before you change anything, write down the public hostname Zammad will use, because the entity ID and ACS URL are built from it. A later change to the hostname, a move from http to https, or a certificate rotation on one side without the other is the most common reason login fails with a signature or destination error even though both products look healthy.
In plain terms, the flow starts when a user opens Zammad and chooses the SAML login. Zammad sends the browser to Keycloak with a signed or identifiable request that names Zammad's entity ID and asks Keycloak to return the user there. Keycloak checks whether the user already has a session, asks for credentials if needed, and then builds a response containing an assertion about the user, which it signs with its realm key. The browser posts that response back to the ACS URL. Zammad checks that the destination matches its own ACS URL, that the signature verifies against the certificate it was configured with, that the audience names its entity ID, and that the validity window has not passed. The name ID and attributes inside the assertion then decide which Zammad account the user maps to. Any single mismatch in those checks stops the login, which is why the error messages often point to the destination, audience or signature rather than to the user.
Confirm three things before you test. First, that the hostname in Zammad's metadata, the ACS URL and the Keycloak client's valid redirect and base URLs are identical, including the scheme and any port. Second, that the certificate Zammad trusts is the realm's current signing certificate, and that you have a plan for rotating it on both sides. Third, that you know which Keycloak realm and client the Zammad setup points to, since a second realm or a copied client with the same name is a frequent source of confusing failures. Keep the Keycloak administration guide and the Zammad third-party documentation open while you check these values, because the exact field names and screens depend on the versions you run and should be verified there rather than assumed from this page.
Mapping Keycloak attributes and roles to Zammad user fields
This table compares each Keycloak SAML attribute to the Zammad user field it should populate and the decision it needs. Read it before building the Keycloak client mappers, then confirm the Zammad role and group behavior against your installed version and your access model. The main takeaway is that identity fields are low risk to map, while role and group assignment should be designed deliberately and tested with a non-admin account.
| Keycloak attribute | Zammad user field | Decision and check |
|---|---|---|
| NameID (email address format) | Login and email | Use the email address as the stable identifier. Confirm the NameID format matches what Zammad expects for account matching on your version. |
| Map as the primary contact address. Confirm that duplicate addresses are handled by account linking before go-live. | ||
| firstname | Firstname | Map directly from the user profile. Blank values are common for service accounts, so check how Zammad behaves when this attribute is absent. |
| lastname | Lastname | Map directly from the user profile. Test with a user who has a single name to confirm the field stays usable. |
| username or login | Login | Use only if the value is unique and stable across the directory. Changing it later can create duplicate accounts. |
| Group or role attribute | Roles and groups in Zammad | Confirm on your installed version whether SAML role and group assignment is supported and how it maps. Decide the role model in the content group first, then send only the groups that match it. |
| Department or organization attribute | Organization or custom field | Map only if the value drives ticket routing or reporting. Keep organization membership separate from agent roles. |
| Unmapped profile data | None | Do not send attributes Zammad does not need. Each extra attribute widens what the identity provider shares with the helpdesk. |
Securing the SAML login path
SAML sign-in moves trust from Zammad's login form to Keycloak, so the security of the whole path depends on how Keycloak signs, how Zammad validates, and who can change either side. The cards below cover the settings and operating habits that keep that trust intact, from assertion signing to admin access on the identity provider.
Require signed assertions and responses
Configure the Keycloak client so that SAML assertions and responses are signed, and confirm that Zammad rejects responses it cannot verify against the imported Keycloak certificate. An unsigned or altered response should fail at Zammad, not be accepted. Test this with a deliberately modified response in a staging instance, and record the result as evidence for your security review. Check the signature algorithm settings on both sides, since a mismatch will either break sign-in or weaken the check.
Keycloak docsTrack certificate rotation and expiry
The signing certificate in Keycloak and the certificate Zammad trusts must be rotated together. Keep a register of the certificate's expiry date, the owner who will replace it, and the date the new metadata was imported into Zammad. Expired or mismatched certificates cause sign-in outages that look like general login failures. Schedule a rotation test in a non-production instance before each planned change, and confirm the old certificate is removed from the client once the new one is live.
Restrict account creation through SSO
Decide whether a successful Keycloak login should create a new Zammad user. For agent access, most teams want existing accounts only, so users who authenticate but are not provisioned are refused. Review the Zammad setting that controls automatic user creation during SAML login, and confirm that role and group assignment follow an approved process rather than default values. Test with an account that exists in Keycloak but not in Zammad, and document the expected refusal.
Keep a two-factor local admin fallback
If Keycloak or the SAML trust fails, administrators need a way back into Zammad. Keep a small number of named local administrator accounts that are not tied to SSO, protect them with two-factor authentication, and store recovery codes in a controlled vault. Test the fallback login on a schedule, because an untested account is often locked or expired when it is needed. Record who holds these accounts and review the list whenever staff change roles.
Serve every SSO endpoint over HTTPS
The Zammad callback URL, the Keycloak login endpoints and the metadata URL should all use HTTPS with certificates your team manages. Confirm that the assertion consumer service URL in the Keycloak client matches the Zammad HTTPS address exactly, since mismatched schemes or hostnames are a common cause of failed or downgraded flows. Block plain HTTP access to the login path at the reverse proxy, and check that redirects do not send session data over an unencrypted connection.
Review Keycloak admin console access
Anyone who can edit the Keycloak SAML client can change where assertions go and which attributes Zammad receives, so the admin console is part of the Zammad trust boundary. Limit realm administrator roles to named people, require two-factor authentication for them, and review the admin event log for changes to the Zammad client. Ask your team to confirm that the Keycloak version and its upgrade process are covered by the same review, and see the Zammad security hardening page for the password and session policy that applies to Zammad itself.
Keycloak production guideHow an agent login flows from Zammad through Keycloak
The flow starts when an agent opens Zammad in the browser and Zammad, acting as the service provider, sends a SAML authentication request that the browser carries to Keycloak. After the agent signs in at Keycloak, the SAML response returns through the assertion consumer service URL, where Zammad validates the signature, certificate and name ID before creating its own session. Check the trust boundary at the ACS URL and confirm that the signing certificate in Keycloak matches the one Zammad holds.
Agent SAML login from the browser through the Zammad ACS URL to Keycloak and back.
Why Zammad SAML login with Keycloak fails and how to fix it
This table lists the failures teams most often hit when Zammad and Keycloak first exchange SAML messages, with the cause and fix for each. Check the rows in order: most failures come from a mismatched URL, certificate or identifier, and those are the fastest to confirm. Work through the clock, attribute and logout rows only after the login handshake itself succeeds.
| Symptom | Likely cause | Fix |
|---|---|---|
| Keycloak shows an invalid redirect or the assertion is rejected at the ACS | The Assertion Consumer Service URL or entity ID in the Keycloak client does not exactly match the values Zammad publishes in its metadata | Re-import Zammad's metadata into the Keycloak client, or copy the ACS URL and entity ID character for character, including scheme, host and trailing path |
| Assertion rejected with a message about validity or time | Clock skew between the Keycloak host and the Zammad host pushes NotBefore or NotOnOrAfter outside the allowed window | Sync both servers to the same NTP source and confirm the clocks agree before changing SAML settings |
| Login fails after a certificate rotation or import | The signing certificate in the Zammad SAML settings is wrong, expired or from a previous Keycloak key | Export the current realm signing certificate from Keycloak and update the Zammad fingerprint or certificate, then test with a fresh session |
| Users land on an error or a second account is created | The name ID format is not what Zammad expects, so the same person is matched as unknown or duplicated | Set the name ID format in the Keycloak client to match the Zammad configuration, and map the identifier consistently for every user |
| Login succeeds but the user has no email or cannot be created | The email attribute is not released in the assertion or is mapped under a different attribute name | Add a mapper in the Keycloak client that sends the email attribute with the name Zammad reads, then confirm it in a test assertion |
| Redirect loops or the browser goes to the wrong host | Zammad's configured public hostname or the reverse proxy headers do not match the external name users type | Set the external URL in Zammad to the public hostname and confirm the proxy forwards host and protocol headers to Zammad |
| Signing out of Zammad leaves the user signed in, or signing out of Keycloak does not end the Zammad session | Single logout is not configured on both sides, or the Zammad session is not terminated by the logout response | Configure the logout URL in both the Keycloak client and Zammad, then test logout from each side and confirm the session is closed |
Questions teams ask before configuring Keycloak SAML for Zammad
What drives the effort and cost of connecting Zammad to Keycloak over SAML?
The effort depends less on the SAML steps themselves than on how much of your identity setup is already settled. The main drivers are how many Keycloak realms, clients and groups you need, whether attribute mapping to Zammad roles and groups is simple or derived from several sources, how many environments (test, staging, production) must be configured, and whether Zammad itself is already deployed behind a stable HTTPS hostname. Cost has two parts: internal or partner time to configure and test, and any change to the Zammad or Keycloak hosting you already run. Ask any quote to list each environment, the role mapping rules and the test cases it covers.
How long does a Keycloak SAML configuration for Zammad usually take?
No duration figure is supplied for this integration, so treat any number you hear as unverified until it is tied to a written scope. Duration is set mainly by the number of environments, whether the certificate and name ID decisions are already made, how many attributes must map into Zammad, and how quickly your Keycloak administrators can review changes. Plan time for a test login with a dedicated test user, for a logout check and for a rollback path. Ask for a timeline that lists these steps separately.
Can an internal team set up Keycloak SAML for Zammad without a partner?
Yes, if the team has someone comfortable with both Keycloak clients and Zammad administration, and if the required decisions are made in advance. The work involves importing Zammad's metadata into a Keycloak SAML client, setting the assertion consumer service URL, choosing certificate and name ID settings, mapping attributes and testing logout. Teams without SAML experience often find the signing certificate and name ID choices the hardest part. A partner is most useful when the scope spans several identity sources, audit evidence or a regulated rollout that needs documented verification.
What does the work need from our side before it starts?
Expect to provide administrator access to the Keycloak realm that will hold the Zammad client, plus access to the Zammad administrator account and its public HTTPS hostname. You will also need a decision on which signing certificate Keycloak and Zammad will use, a documented name ID format, a set of dedicated test users in Keycloak with the attributes Zammad expects, and a named owner who can approve changes to production. Confirm with your security team how certificates are stored and rotated, since the same keys will need replacing later.
Which Keycloak SAML settings are most likely to break login?
The most common failures come from a mismatch between the assertion consumer service URL in Keycloak and the URL Zammad actually uses, a certificate that Keycloak and Zammad do not agree on, and a name ID format that does not match the user identifier in Zammad. Attribute mapping errors usually appear as users who log in but get the wrong role or group. Check each value against Zammad's metadata after every change, and test with one account before opening access to the wider team.
How does the SAML setup change after a Keycloak or Zammad upgrade?
Keycloak plans four minor releases a year and says breaking changes in a minor release will be opt-in, but you still need to check release notes before upgrading, especially if you run the Keycloak Operator, where manual approval mode is strongly recommended to avoid unintended upgrades. Keycloak also migrates its database schema automatically at startup by default, or you can apply the SQL manually, which the upgrading guide suggests for large deployments. After any Keycloak or Zammad upgrade, repeat the test login, logout and attribute checks, and confirm that certificates and metadata still match. Ask for a retest in your quote as part of the upgrade scope.
Does DeployOpen handle Zammad SAML setup, and what does a quote depend on?
DeployOpen plans, implements, integrates, hardens and documents self-hosted open-source platforms inside your own infrastructure, so the Keycloak SAML connection can be included in a fixed-scope engagement. A quote follows from the written scope, which should name the environments, the identity attributes to map, the test cases, the documentation and any retest after upgrades. DeployOpen does not publish a price list.
Testing the SAML login and keeping it working after upgrades
Treat the SAML login as a control that needs its own test plan before users depend on it, and repeat that plan after every change to Keycloak or Zammad. Run six cases against a test client in Keycloak and a non-production Zammad: first login, where a new user is provisioned with the expected email, name and role; returning login, where the same user is matched to the existing account and not duplicated; an unknown user, where the account should be refused or created only if your user creation setting allows it; a disabled user in Keycloak, which should be unable to sign in even with a valid session still cached in the browser; logout, where you confirm whether signing out of Zammad also ends the Keycloak session and whether a second login prompts for credentials; and a failed certificate scenario, where a wrong or expired signing certificate in Zammad must stop logins rather than fall back to a weaker path. Record the expected result for each case before you run it, and confirm the exact behavior of the logout and certificate settings in the Zammad and Keycloak documentation for your versions.
Keycloak changes on its own schedule, so plan upgrades deliberately. The Keycloak blog describes four minor releases a year, with breaking changes in a minor release made opt-in, and the current release at the time of writing is 26.8.1, published October 13, 2026. For each Keycloak upgrade, check the upgrading guide and the release notes for changes to SAML, realm keys and client settings, then rerun the full test plan against the new version in staging. If you run the Keycloak Operator, keep manual approval mode for operator updates, as the Operator documentation recommends, so an upgrade does not reach production without your review. Keep a copy of the SAML client export and the Zammad signing configuration so you can restore a known good state quickly.
After every Zammad release, including security releases, confirm that the SAML settings, the metadata and the certificate still match what Keycloak holds, because a rotated certificate on either side breaks login silently for some users. Zammad published security releases in parallel for its 6.5 and 7.x lines in October 2026, so check which line you run and apply the matching fix before testing. Review the release notes for changes to third-party login, then run the six test cases in staging and only then in production. Ask your team to confirm the expected Zammad and Keycloak version pairing in your environment before any change window.
How DeployOpen scopes and delivers Zammad and Keycloak SSO
DeployOpen plans and implements Zammad SAML single sign-on with Keycloak inside your own infrastructure, so the identity provider, the Zammad instance and the certificates stay under your control. Work starts with a written scope that names the agent groups, attribute mappings and logout behavior before any configuration changes are made.
How we scope
- Confirm which Zammad and Keycloak versions run in your environment before planning the SAML client settings.
- Record the Zammad external URL, assertion consumer service path and name ID format agreed with your identity team.
- Agree in writing which attributes, roles and group mappings Keycloak sends, and how unknown accounts are handled.
How we build
- Create the Keycloak SAML client from Zammad's metadata, then review the certificate, signing and name ID settings line by line.
- Configure Zammad's SAML provider and attribute mapping in a non-production instance first, using test accounts for each role.
- Test single sign-on, account linking, session timeout and single logout against documented expected results before cutover.
How we hand over
- Deliver a configuration record covering client IDs, endpoints, certificate expiry dates and the owners responsible for each setting.
- Document the certificate renewal steps and the Keycloak upgrade checks that could affect the Zammad SAML client.
- Walk your administrators through the login flow, the troubleshooting log locations and the rollback procedure.
How we support
- Fixed-scope engagements end with a written handover, so changes after that point are scoped separately.
- Ongoing support, upgrades and continuous testing are available as a retainer, including retesting after Keycloak or Zammad upgrades.
- Ask for a quote based on the written scope, which covers the environments, systems and test cases included.

