Keycloak and Zammad SAML single sign-on

How to set up Zammad sign-in for agents and customers through Keycloak SAML, with the metadata, callback URL, attribute mappers and RS256 certificate settings that make it work.

On this page

How Keycloak SAML single sign-on works for Zammad

A help desk team that already signs people in through a Keycloak realm usually wants agents and customers to use the same credentials for Zammad. The supported method is SAML 2.0 with Keycloak as the identity provider and Zammad as the service provider. Zammad documents Keycloak as a supported SAML identity provider, so the integration follows a documented path rather than a custom build. Agents get one sign-in across their tools, and customers reach the help desk without a separate Zammad password to manage.

The flow works in two directions. Zammad publishes its service provider metadata at /auth/saml/metadata, and you import that metadata into a Keycloak SAML client. Keycloak then returns the signed assertion to Zammad at /auth/saml/callback, which is the assertion consumer service URL. Zammad reads the user's email, name, first_name and last_name attributes from that assertion, so the Keycloak client needs mappers that release those values. Agents and customers are matched on the email attribute, which means the email values in your realm must be accurate and unique before you go live. Confirm which Keycloak realm holds your help desk users and whether customers sit in the same realm as agents.

The certificate choice is the decision most likely to cause a failed sign-in later. Zammad recommends giving it the IdP certificate from Keycloak under Realm Settings, Keys, RS256 instead of a fingerprint, because fingerprints rely on SHA-1. Plan to copy the certificate when the realm keys are finalized and to repeat that step after any key rotation. Test with one agent and one customer account in a non-production Zammad instance before you enable the SAML provider for everyone.

What you need before configuring Zammad SAML with Keycloak

Zammad SAML sign-in depends on three systems agreeing on hostnames, certificates and user attributes before any client is created. Work through these items in the order listed so the metadata exchange in the next steps succeeds on the first attempt.

Keycloak version and deployment

Run the current Keycloak release, 26.8.1, or confirm with your platform team which build you have. Confirm that the Keycloak instance is served over HTTPS on a stable public hostname, since the SAML entity ID and the signing certificate are tied to that realm URL. Check that the production configuration calls for TLS on all communication and a reverse proxy in front of Keycloak, and that the admin console is reachable on a different hostname from the public login pages.

Keycloak production guide

Zammad version and public hostname

Confirm the Zammad release you run, for example the 7.2 line or a supported 6.5 security release, and the exact external hostname users type into the browser. Zammad publishes its SAML service provider metadata and callback endpoints under that hostname, so the name must be final before you start. A hostname change later means regenerating metadata and updating the Keycloak client.

Zammad software requirements

Zammad stores its content in PostgreSQL 15 or newer and needs Redis 7 or newer for realtime websocket communication. Confirm both versions in your environment before testing SSO, because a login that works in a test instance can still fail in production if the database or cache is out of range. Also confirm the reverse proxy choice, Nginx or Apache, that will pass the SAML callback through to Zammad.

Zammad software requirements

Working realm with test users and groups

Create a dedicated test realm or use a non-production realm with at least one agent account and one customer account, each with a verified email address, a first name and a last name. Add the groups you plan to use for Zammad roles so that you can confirm attribute values during the first login. Use test accounts, not your own administrator account, so that a misconfiguration does not lock out your only admin.

Network reachability between Zammad and Keycloak

Zammad must reach the Keycloak SAML descriptor and the realm endpoints over HTTPS, and users' browsers must reach both systems. If Zammad fetches Keycloak metadata from inside a private network, confirm DNS resolution, certificate trust and firewall rules from the Zammad host itself, not only from a workstation. Record the host names and ports so that a failed login can be traced to the correct hop.

RS256 realm signing certificate

Zammad recommends supplying the IdP certificate rather than a fingerprint, because fingerprints use SHA-1. In Keycloak, open Realm Settings, then Keys, and locate the RS256 key that the realm uses to sign assertions. Confirm that this key is active and note whether it is the realm's only RS256 key, since rotating it later requires updating the certificate in Zammad.

Zammad SAML docs

Configuring the Keycloak client and Zammad SAML settings in order

This sequence connects Zammad to Keycloak as a SAML service provider and identity provider, so agents and customers sign in through Keycloak. Each step ends with a check that confirms the value or assertion before the next step depends on it.

  1. Retrieve Zammad service provider metadata

    Open the Zammad service provider metadata at the /auth/saml/metadata path on your Zammad hostname, using the exact public URL users will reach. Save the XML and note the entity ID it declares, because the Keycloak client must match it exactly. Confirm the file loads over HTTPS without a certificate warning and that the entity ID matches the hostname you plan to keep. If the hostname changes later, the metadata and the Keycloak client both need updating, so settle the public URL before this step.

  2. Create the Keycloak SAML client

    In the target realm, create a SAML client using the Zammad entity ID from the metadata. Set the assertion consumer service URL to the /auth/saml/callback path on the same Zammad hostname, and confirm the binding and signing options match what the Zammad SAML documentation describes for your version. Save the client and check that its entity ID and ACS URL read back exactly as they appear in the Zammad metadata, character for character, since a single mismatch causes sign-in to fail at the redirect.

  3. Configure the attribute mappers

    Add user attribute mappers to the SAML client for email, name, first_name and last_name, mapping each to the matching Keycloak user property. Zammad requests these four attributes, so the names must match exactly. Confirm the mappers exist in the client's mapper list, then sign in to Keycloak as a test user with those fields populated. Verification comes in step six, where you inspect the actual assertion.

  4. Copy the realm RS256 certificate into Zammad

    In Keycloak, open Realm settings, then Keys, and locate the RS256 active key. Copy its certificate, or download it, and paste it into the Zammad SAML configuration as the IdP certificate. Zammad recommends a certificate over a fingerprint because fingerprints rely on SHA-1. Confirm that the certificate you pasted belongs to the active RS256 key and not to a passive or disabled key, since a rotated key left in Zammad will cause signature validation to fail.

  5. Enable SAML and set the Keycloak endpoints in Zammad

    In Zammad's third-party authentication settings, enable SAML and enter the Keycloak SSO endpoint and the identity provider details from the realm's SAML descriptor. Save the settings and reload the login page. Confirm the Keycloak sign-in button appears and that clicking it redirects to the Keycloak login page for the correct realm, not a generic or cached one.

  6. Inspect the SAML response attributes

    Sign in with a test user and capture the SAML response using a browser developer tool or a SAML tracer extension. Decode the assertion and confirm the NameID value, the email, name, first_name and last_name attributes, and that the signature references the realm certificate. Compare the attribute names with the ones Zammad expects. If a field is missing or named differently, return to the mappers in step three before testing again.

  7. Test agent and customer sign-in

    Test sign-in with one agent account and one customer account, since Zammad may treat these roles differently after login. Confirm each user lands in the correct Zammad profile, that the name and email match the Keycloak account, and that a second login does not create a duplicate user. Record the results and the test accounts used, so a later change to the client or the certificate can be retested against the same cases.

Choosing how to supply the identity provider certificate

Zammad's SAML documentation recommends supplying the identity provider certificate, which you copy from Keycloak under Realm Settings, Keys, RS256. Zammad then checks the signature on each SAML response against that certificate. The certificate is the recommended option because a fingerprint is a hash of the certificate, and Zammad's documentation notes that fingerprints use SHA-1. SHA-1 is a weak hash, so a fingerprint gives less assurance than the full certificate.

  • Source of truth: The certificate comes directly from the realm's RS256 key, so you can confirm the exact key Keycloak signs with.
  • Stronger verification: Zammad validates signatures against the full certificate rather than a short SHA-1 digest.
  • Clear audit trail: A reviewer can compare the certificate in Zammad with the one shown in Keycloak and record the match.
  • Planned rotation: Each key change requires you to paste the new certificate into Zammad before the old key stops being used.

Confirm in your environment that the RS256 key shown in the realm is the active signing key and that Zammad is configured with it before you enable login for users.

Mapping Keycloak user attributes to Zammad fields

This table pairs each attribute Zammad requests during SAML sign-in with the Keycloak mapper or user field that should supply it, and shows how roles are set after the first sign-in. Read each row as a contract: the Zammad attribute name and the Keycloak mapper name must match exactly, or Zammad will receive an empty or missing value. Confirm each source field against your own user store before going live.

Zammad attributeKeycloak source to configureWhat to confirm
emailUser attribute or built-in email property mapped to the SAML attribute named emailEvery user has a unique, verified email address, since Zammad uses it to match and create accounts
nameMapper that exports the full display name under the attribute nameThe full name is populated for every user, including accounts imported from LDAP or Active Directory
first_nameMapper exporting the given name under the exact attribute name first_nameThe value comes from the user's given name field and not from the username or display name
last_nameMapper exporting the family name under the exact attribute name last_nameThe value comes from the user's family name field, and names with multiple parts are stored as your policy expects
Agent or customer roleZammad assigns roles after first sign-in, based on the role and group settings in the Zammad admin areaWhich Keycloak groups or users should become agents, and that new users default to the customer role you intend
Certificate and attribute namesRealm Settings, Keys, RS256 certificate supplied to Zammad instead of a SHA-1 fingerprintZammad's documented attribute names match the mapper names character for character, including case

How a Zammad sign-in request travels through Keycloak

A sign-in starts in the browser, which is sent from the Zammad service provider to the Keycloak realm that acts as the identity provider. Zammad's metadata is imported into Keycloak ahead of time, so the two sides already trust each other. Keycloak returns a signed SAML assertion through the browser to the Zammad assertion consumer URL at /auth/saml/callback. Check that the assertion carries the email, name, first name and last name attributes, and that Zammad validates it with the realm RS256 certificate rather than a SHA-1 fingerprint.

The browser carries SAML messages between Zammad and Keycloak, validated by the realm certificate.

Securing the Zammad and Keycloak SAML trust relationship

A SAML link between Keycloak and Zammad is a trust relationship: Zammad believes whatever Keycloak asserts about a user. The cards below cover the certificate, transport, client scope, recovery access and rotation choices that keep that trust narrow and recoverable.

Validate with the RS256 certificate

Give Zammad the realm signing certificate from Realm Settings, Keys, RS256 rather than a fingerprint. Zammad's documentation recommends the certificate because fingerprints use SHA-1, a weak hash for this purpose. Confirm the certificate is the active RS256 key, not an inactive or passive one, before saving the Zammad configuration, and record which key you pasted.

Zammad SAML docs

Serve both hostnames over TLS

Keycloak's production guidance calls for TLS on all communication, so the Keycloak hostname, the Zammad hostname and the assertion consumer URL must all use HTTPS. Mismatched or plain HTTP endpoints break signed redirects and expose sign-in traffic. Check that the Zammad external URL matches the browser address exactly, because a mismatch often surfaces as a failed login.

Keycloak production guide

Scope the Keycloak client tightly

Create the SAML client with the Zammad SP entity ID and the /auth/saml/callback assertion consumer URL as the only accepted redirect targets. Avoid wildcard redirect patterns and do not reuse the client for other applications. Each extra allowed URL is a place a signed assertion could be delivered to the wrong recipient.

Separate the Keycloak admin hostname

Keycloak's production guide recommends exposing the admin console and Administration REST API on a different hostname or context path from public frontend URLs. Keep the public login hostname that Zammad uses separate from the admin path, and restrict admin access at the reverse proxy. This keeps administrative endpoints out of the path that customers and agents use to sign in.

Keep a Zammad local admin login

If Keycloak is unavailable, misconfigured or its certificate has changed, agents may be locked out of Zammad. Keep at least one local administrator account with a tested password and a documented way to reach it. Confirm with your Zammad administrators how that account is protected and who can use it during an incident.

Plan certificate rotation

Realm keys change when they are rotated, and a Zammad configuration that still holds the old certificate will reject new assertions. Schedule a rotation window, add the new certificate to Zammad before retiring the old one, and test a sign-in for an agent and a customer afterward. Record the rotation in the change log so the next reviewer can match the certificate to the realm key.

Why Zammad SAML sign-in with Keycloak fails

This table lists the failures most often seen when Zammad signs users in through a Keycloak SAML client, with the likely cause and the check to run for each. Work down the rows in order, since the callback URL and certificate problems block sign-in before attribute mapping matters. The main takeaway is that most failures trace back to one mismatched URL, key or attribute name rather than to Zammad itself.

SymptomLikely causeCheck to run
Keycloak reports an invalid redirect or the assertion is rejected at the callbackThe assertion consumer URL in the Keycloak SAML client does not match Zammad's /auth/saml/callback path for your public hostnameCompare the ACS URL in the Keycloak client with the callback path in Zammad's SAML metadata, including scheme, host and port
Signature validation fails after a key changeThe certificate pasted into Zammad is not the active RS256 key in Keycloak, often after a key rotation or a second key was addedUnder Realm Settings, Keys, confirm which RS256 certificate is active and replace the certificate in Zammad's SAML settings with that one
Users sign in but have no email address or their name is blankMappers are missing or named differently from the attributes Zammad requests: email, name, first_name and last_nameCheck the SAML client mappers for each attribute name exactly as Zammad expects, then sign in with a test user and inspect the attributes in the SAML response
Fingerprint setting shows a validation error or sign-in failsA SHA-1 fingerprint is configured instead of the certificate, and it does not match the key Keycloak signs withRemove the fingerprint and use the realm RS256 certificate, since Zammad recommends the certificate because fingerprints use SHA-1
Assertions appear not yet valid or expiredClock skew between the Keycloak host, the Zammad host and any reverse proxy, which affects SAML time conditionsCompare UTC time on all hosts with NTP status and correct the drift before retesting
Browser loops between Zammad and KeycloakThe reverse proxy does not pass the original host and protocol, so Zammad builds http URLs or the wrong callback behind TLS terminationConfirm the proxy forwards the public host and HTTPS scheme headers and that Zammad's configured external URL uses https

Testing the integration before agents and customers depend on it

Test the Keycloak SAML integration with a pilot agent account and a separate customer account before any agent or customer is sent through it. The agent test should confirm the full path: Keycloak login, the redirect back to Zammad at the assertion consumer service path /auth/saml/callback, and a user record that matches the expected email address. The customer test matters just as much because customer accounts often follow a different path in the help desk, so confirm that a customer lands in the right role and does not receive agent permissions. Keep both test accounts in a non-production realm or group if your environment allows it.

Inspect the SAML response itself rather than relying only on a successful login. Capture an assertion from a test sign-in and confirm that the email, name, first_name and last_name attributes are present and carry the values you expect, since Zammad requests exactly those attributes. A login can succeed while a missing name or email mapper leaves the profile incomplete, which causes confusing errors later. Then run a negative test: disable the pilot user in Keycloak and confirm that Zammad refuses a new sign-in, and check what happens to an existing session. Also confirm the certificate setup by checking that Zammad validates the signature with the realm RS256 certificate that you configured, not a SHA-1 fingerprint. Confirm which Zammad release line your environment runs (7.2 or 6.5) before you read the vendor documentation, because settings and fixes differ between lines.

Document a fallback login before go-live and test it. Keep a local administrator account in Zammad that is not tied to Keycloak, store its credentials under your normal privileged access controls, and confirm you can sign in with it when Keycloak is unavailable. Write down who can switch the SAML provider off, where that setting lives, and how to notify agents and customers. Repeat the full test set after every Zammad or Keycloak upgrade, and after any change to the client, mappers or certificate, because a routine update can alter the metadata or signing behavior that the integration depends on. The Zammad SAML documentation is the reference to check against each time.

Questions teams ask before configuring Zammad SAML with Keycloak

Does self-hosting Zammad with Keycloak carry a license fee?

Self-hosted Zammad has no license fee, and Zammad is licensed under the GNU Affero General Public License version 3. Keycloak is licensed under Apache 2.0, so the software itself is not the recurring cost. Zammad sells self-hosted support subscriptions named Business at 2,999 EUR per year, Enterprise at 5,999 EUR per year and Corporation at 9,999 EUR per year, according to Zammad's pricing page. Whether you need one depends on how much vendor support your team wants. Other recurring costs are the infrastructure, the database, Redis and any search or caching services you run. Ask any partner for a quote that separates one-time configuration work from ongoing operations.

How long does Zammad SAML configuration with Keycloak take?

The SAML handshake itself is a small amount of configuration, but the timeline depends on the surrounding decisions. The main drivers are whether Keycloak already has a realm and client pattern you can reuse, how many user groups need separate roles, whether agents and customers sign in through different paths, and how many test cases your security or identity team requires before go-live. Plan time for the metadata exchange, attribute mapper testing with real accounts, and a rollback path that keeps a local admin login working. Because no duration is supplied for this integration, ask any partner to state effort and duration in the written scope.

What must our team provide before the Zammad and Keycloak SSO work starts?

Three things unblock the work quickly. First, Keycloak administrative access to the target realm, with rights to create a SAML client, edit mappers and read the realm RS256 key under Realm Settings. Second, Zammad administrative access to the security settings where third-party SAML is configured, plus a way to reach the Zammad host over HTTPS. Third, test users for agent and customer roles, each with a verified email address, a first name and a last name, so the attribute mappings can be checked end to end. Also confirm the public hostname for Zammad, since the metadata and callback URLs depend on it.

Can an internal platform team configure Zammad SAML with Keycloak alone?

Yes, if the team already runs Keycloak and Zammad and has someone comfortable with SAML metadata, signing certificates and attribute mappers. The configuration follows a documented path, so a capable internal team can follow the Zammad SAML documentation. A partner adds value when the team lacks SAML experience, when the identity design spans several applications, or when auditors will review the access model. Whichever route you choose, write down who owns the Keycloak client, who owns the Zammad settings and who approves changes to mappers, because most later failures come from unclear ownership rather than from the first setup.

Should Zammad use SAML or OpenID Connect with Keycloak?

Choose SAML when Zammad and your other applications already share a SAML trust model, or when your security team has standardized on SAML for web applications. Zammad supports both SAML and OpenID Connect as third-party login methods, so the choice is a design decision, not a product limitation. SAML requires you to exchange metadata, manage the IdP certificate and map assertion attributes such as email, name, first_name and last_name. OpenID Connect centers on a client ID, a secret and claims. Compare the two against your existing federation, your certificate rotation process and the team's operating skills before you commit.

Why does Zammad recommend the realm RS256 certificate instead of a fingerprint?

Zammad recommends providing the IdP certificate from Keycloak under Realm Settings, Keys, RS256 rather than a fingerprint, because fingerprints use SHA-1. Using the certificate lets Zammad validate signed assertions against the full key material, which is easier to reason about during rotation. The practical consequence is that a key rotation in Keycloak becomes a planned change, with the new certificate loaded into Zammad before the old one stops signing. Record which key Keycloak is using, who receives notice of rotations and how you will test sign-in after each change.

What breaks most often in a Zammad and Keycloak SAML setup?

The most common failures come from mismatched URLs, missing attributes and certificate handling. Check that the assertion consumer service URL in Keycloak matches /auth/saml/callback on your Zammad hostname exactly, including the scheme and host. Confirm that the email, name, first_name and last_name mappers are present, because Zammad requests those attributes and users without them may fail to create or update correctly. Confirm the certificate in Zammad is the current RS256 key. Finally, test with a user who already exists in Zammad, since account matching behaves differently from a first-time sign-in.

What should we verify after Zammad SAML sign-in goes live?

Verify three areas. Functionally, test agent and customer sign-in, first-time user creation, sign-out and the fallback local login. Security-wise, confirm that only the intended Keycloak clients can authenticate, that the SAML client settings match the Zammad hostname and that administrative access to both systems is limited to named roles. Operationally, record the Zammad and Keycloak versions you tested, including the Keycloak 26.8.1 release if that is your target line, and schedule a retest after each Zammad or Keycloak upgrade. Keep the evidence, such as test results and configuration exports, in your change records.

Where the official Zammad and Keycloak documentation applies

Each step of this integration is governed by one of two vendor documents, and the reader should use them in that split rather than treating either as a complete guide. The Zammad side (metadata at /auth/saml/metadata, the callback at /auth/saml/callback, the requested email, name, first_name and last_name attributes, and the certificate recommendation) is defined in the Zammad SAML admin documentation, linked from the Zammad admin docs: SAML page. The Keycloak side (creating the SAML client, the mappers, and reading the RS256 key under Realm Settings) is defined in the Keycloak server administration guide. Check the exact menu labels and client settings against the Keycloak version you run, because the admin console layout can change between releases.

Zammad does not document a Kubernetes-specific configuration for SAML. The SAML settings are applied inside the Zammad application, so the same steps apply whether Zammad runs from package installation, Docker Compose or the Helm chart. Zammad's Kubernetes support covers only the Zammad application, not Kubernetes-specific issues such as ingress, certificates at the load balancer, or pod networking. If your deployment runs on Kubernetes, confirm with your platform team who owns those layers and plan how the Keycloak metadata and Zammad callback URL will be reached over HTTPS from inside the cluster. Keycloak's own production guidance on TLS and reverse proxy path restrictions also applies to the Keycloak endpoints that Zammad calls.

Before you start, assign an owner to each document and record which version of each product you are configuring. Confirm three things in writing: the Zammad release line you run, the Keycloak release you run, and whether your Zammad instance is reachable at the public hostname you will register as the SAML endpoint. If support for a Kubernetes-specific issue is needed, ask your platform vendor or partner for that scope separately, because the Zammad vendor will not cover it. Keep a short change record that links each configured setting to the page that justified it, which makes later upgrades and audit reviews much easier.

How DeployOpen scopes and delivers Keycloak and Zammad SSO

DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside the client's own infrastructure, so the Keycloak realm, the Zammad SAML configuration and the metadata exchange between them stay under your control. We agree the scope in writing before work starts, then build, test and hand over the sign-in path with the evidence your identity and security teams need to review it.

How we scope

  • Confirm which Keycloak realm, Zammad instance and hostnames the sign-in will use, including agent and customer login paths.
  • Agree the attribute mappers for email, name, first name and last name, and who owns each mapper.
  • Record in writing whether the engagement covers Zammad's SAML callback setup only or includes the surrounding Keycloak hardening and testing.

How we build

  • Create the Keycloak SAML client from Zammad's metadata and configure the assertion consumer URL that Zammad publishes for its callback.
  • Load the realm RS256 certificate into Zammad rather than a SHA-1 fingerprint, and verify the certificate after each key change.
  • Test agent and customer sign-in, failed sign-in handling and account matching against existing Zammad users before go-live.

How we hand over

  • Deliver a written configuration record covering the Keycloak client, mappers, Zammad SAML settings and certificate source.
  • Document the steps to rotate the realm signing key and update Zammad, so the change is repeatable by your own team.
  • Provide the test results and open items so your security or compliance reviewers can check the sign-in design directly.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work begins.
  • Ongoing support, Keycloak and Zammad upgrades and continuous testing are available as a retainer.
  • Ask any partner you evaluate to confirm how they will retest the SAML flow after Keycloak or Zammad version changes.

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.