MISP single sign-on with Keycloak

Connect MISP to Keycloak through the OidcAuth plugin, map Keycloak roles to MISP roles and organisations, and keep a tested emergency admin path.

On this page

How MISP single sign-on with Keycloak works

If your team already runs or plans a MISP instance and wants users to sign in through an existing Keycloak realm, the supported route is the OidcAuth plugin, which speaks OpenID Connect to Keycloak. OidcAuth maps identity provider roles to MISP roles and assigns the first matching role by priority, so the order of your role mappings decides what a user receives when they hold several Keycloak roles. Keycloak stays the system of record for accounts, passwords, MFA and group membership, while MISP still needs its own local accounts for API keys, automation and synchronization, which do not come from an interactive login.

Plan the design before you touch the configuration. Decide which Keycloak roles or groups correspond to MISP roles and to organisations, and who may create or disable MISP users when a person leaves. Confirm with your Keycloak administrators which realm, client and claim names will be used, since the mapping depends on the token contents. In a misp-docker deployment, OIDC is switched on with the OIDC_ENABLE variable and then given the provider URL, client ID and client secret through its own environment variables, so the configuration lives in your container definitions and secrets store rather than in the MISP user interface.

Keep the client authentication method in mind early. The misp-docker README recommends client_secret_post and notes that client_secret_basic reportedly fails with Okta, so test the token exchange in a staging instance before you rely on either method for Keycloak. Review the MISP OidcAuth plugin README against your MISP version, because setting names and behaviour can change between releases.

What you need before configuring MISP SSO with Keycloak

Most OidcAuth problems trace back to the environment rather than the plugin settings. Confirm the MISP release, the Keycloak version and database, the realm and admin access, and the network paths between users, MISP and Keycloak before touching any login configuration.

MISP on the 2.5 line

Plan the deployment on the MISP 2.5 line, because MISP 2.4 is end of life with security fixes only and the project advises against new 2.4 instances. Confirm which 2.5 release you will run, since the OidcAuth plugin ships with MISP and its settings can change between releases. Check the plugin version in your chosen release before copying any configuration from older guides or forum posts.

MISP download page

Keycloak version and database

Run a currently supported Keycloak release. The current release is 26.8.1, and the project plans four minor releases a year. For production, use one of the supported databases such as PostgreSQL 14 to 18, MariaDB or MySQL, not the development file database. Confirm the database version against the Keycloak database guide before you install.

Keycloak database guide

Dedicated realm for MISP

Create a separate realm for MISP rather than placing its client in a realm used for other applications. This keeps the client, users, roles and any mapper changes isolated, and it makes later audits of who can sign in to MISP simpler. Decide in advance which Keycloak groups or roles will map to MISP roles and organisations, because those names drive the mapping configuration.

Administrative access in both systems

Confirm who holds the Keycloak admin role for the target realm and who holds the MISP site admin role. Two people should be able to change each side, so a single absence does not block a fix. Record these names in your change plan, because the client secret, role mappings and the emergency admin account all depend on them.

MISP URL with a valid certificate

Users must reach the MISP instance at a stable public or internal URL served over TLS with a certificate their browsers trust. The redirect URI registered in Keycloak must match that URL exactly, including scheme and path. Changing the hostname later means updating the Keycloak client, so settle the name before configuration starts.

Issuer URL reachable from the MISP server

The MISP server, not only the user's browser, must reach the Keycloak issuer URL, because it fetches discovery metadata and exchanges tokens over the back channel. Test that path from the MISP host itself, and confirm the certificate chain of Keycloak is trusted there. Name-resolution or firewall gaps between the two hosts are a common cause of login failures.

Configuring the Keycloak client and MISP OidcAuth in order

This sequence creates a confidential OpenID Connect client in Keycloak, points MISP at it using the OidcAuth settings, and proves that a test account signs in with the expected role before anything else is changed. Each step ends with a check so that a fault is found while only one account is affected.

  1. Confirm the MISP base URL and realm details

    Before touching either system, the Keycloak administrator and the MISP administrator agree on the public MISP base URL, the Keycloak realm name and the hostname that Keycloak will use for its issuer. The redirect URI in Keycloak must match the MISP address that users type in their browsers, including scheme and port, so the team writes it down once and reuses it. Check that the realm's OpenID Connect discovery document loads from a browser or from the MISP host with curl, using the path /.well-known/openid-configuration under the realm's issuer URL. If the document does not load from the MISP host, fix network routing, DNS or TLS trust before continuing, because the OidcAuth plugin needs to reach the same endpoints at login.

  2. Create the confidential client in Keycloak

    In the Keycloak admin console, the realm administrator creates a new client with the OpenID Connect protocol and sets the client to confidential, which means Keycloak issues a client secret. Enable the standard authorization code flow and set the valid redirect URI to the MISP login callback under the MISP base URL, as described in the OidcAuth plugin documentation. Keep the scope narrow: MISP needs the standard OpenID scopes and whatever claim carries group or role membership, which the next steps will map. Record the client ID and generate the client secret, then store the secret in a secrets manager rather than in a shared document. The client is complete when it appears in the client list with the expected redirect URI and the console shows a secret value.

  3. Set client authentication to client_secret_post

    In the client's credentials settings, select the client authentication method that sends the client ID and secret in the POST body of the token request, which is client_secret_post. The misp-docker project recommends this method, and notes that client_secret_basic reportedly fails with Okta, so the same choice is a sensible default for other providers until a test shows otherwise. Keep the same method in the MISP configuration in the next steps. If your Keycloak version labels the option differently, confirm the label in the current Keycloak server administration guide before saving. The check is that the saved client shows the credential method as client_secret_post when you reopen it.

  4. Set the OIDC variables in misp-docker or OidcAuth

    On a Docker deployment, the MISP administrator sets OIDC_ENABLE to true and supplies the provider URL, client ID and client secret through the environment variables documented in the misp-docker README, keeping the secret out of version-controlled files. On a native install, the same values go into the OidcAuth plugin settings in MISP, including the provider URL, client ID, client secret and the authentication method chosen in the previous step. Restart the MISP containers or reload the configuration so the new values take effect. The check is that the MISP login page shows an OpenID Connect sign-in option and that the MISP logs contain no startup errors about the OIDC configuration.

  5. Map a Keycloak role to a MISP role

    Before testing login, the administrator decides which Keycloak role or group maps to which MISP role, and which MISP organisation the user belongs to. OidcAuth reads the roles that the identity provider sends and assigns the first matching MISP role by priority, so the mapping order matters. Keep the first mapping simple, for example one Keycloak role for a MISP user and one for a MISP administrator, and confirm the exact claim name and mapping syntax in the OidcAuth plugin README for your MISP branch. The check is a written mapping table that both the identity team and the MISP team have reviewed, with each role listed once and the priority order stated.

  6. Test login with one account and an expected role

    Choose one test user in Keycloak who holds exactly the role that should map to a standard MISP user. Sign in to MISP through the OIDC option from a private browser session, and confirm that the user lands in the expected MISP organisation with the expected role under the administration pages. Then sign in with a second test user who lacks any mapped role and confirm that access is refused or that the account receives only the default behaviour you intended. Keep this to one or two accounts until the mapping is proven. The check is that the MISP user record shows the expected role and organisation, and that the MISP audit log records the login. If the role is wrong, compare the token claims from Keycloak with the mapping table before changing either system.

Choosing between Docker and native installation for OIDC

When MISP runs from the misp-docker project, OIDC is enabled through container configuration rather than by editing plugin files on a host. The misp-docker README sets OIDC_ENABLE=true and then supplies the provider URL, client ID and client secret through environment variables, so the same settings travel with your compose file or orchestration manifests.

  • Settings live in the environment: Provider URL, client ID and secret are passed as container variables, so review them in the compose file or Kubernetes manifests under change control.
  • Secrets come from the orchestrator: Store the client secret in a secrets manager or orchestrator secret store and inject it at runtime, rather than writing it into a version-controlled file.
  • Client method is set explicitly: The README recommends client_secret_post because client_secret_basic reportedly fails with Okta, so confirm the token endpoint method your Keycloak client uses.
  • Upgrades replace images: Moving to a newer image can change defaults or variable names, so compare the README for your target tag before rolling out.
  • Redeploys reapply variables: Every container restart reads the same environment, which makes drift easy to spot but also means a wrong value spreads quickly.

Confirm the variable names, defaults and supported tag in the misp-docker README that matches the image you deploy.

How Keycloak roles and claims map to MISP roles and organisations

This table compares the Keycloak inputs MISP reads with the MISP fields they feed, so you can design the mapping before you configure OidcAuth. Read each row as a decision: what you define in Keycloak, what MISP does with it, and what to check during testing. The main takeaway is that role priority order and default handling decide what access a user receives, so both need to be designed and tested rather than left to defaults.

Mapping elementWhat MISP does with itDesign decision and check
Keycloak realm or client rolesOidcAuth reads role names from the token claim configured for role mapping and compares them with its role mapping settingsDecide whether MISP roles come from realm roles or client roles, and confirm the claim path in a test token before rollout
Role priority orderOidcAuth assigns the first matching MISP role by priority, so a user with several matching roles receives only oneOrder roles from most to least privileged in the mapping and test a user who holds several roles to confirm the expected result
Organisation claimSets the user's MISP organisation from an identity claim, which must match an organisation that exists or is created in MISPAgree the organisation naming convention with the MISP admin team and confirm the claim value for each sharing group in Keycloak
Email and identity fieldsUses the mapped email and user identifier to match or create the MISP user accountConfirm the claim carries a unique, verified email address, since a changed identifier can create a duplicate account
Users with no matching roleA user whose token contains no mapped role is not given a role from the mapping and must be handled by a fallback decisionTest an account with no MISP roles in Keycloak and confirm whether MISP denies access or applies a default role as intended
Default role for new usersApplies to newly created MISP users when no mapped role is found, depending on the plugin configurationKeep the default role minimal, such as read-only or no publishing rights, and confirm the setting against the OidcAuth README for your version
Removed or changed rolesRole changes in Keycloak are applied at the next login, so a revoked role can remain active until the user signs in again or the session expiresSet Keycloak session lifetimes and disable leavers in both systems, and test that a removed role takes effect as expected

Enforcing SSO without locking out administrators

The central decision in this section is whether ordinary users keep a local MISP password alongside Keycloak login, or whether local login is disabled for them. Keeping password login available is the safer starting point during rollout, because a broken OIDC configuration or a Keycloak outage otherwise leaves no way in. The cost is that local passwords remain a second credential store to manage, rotate and monitor, and users can drift onto them after SSO is declared mandatory. Disabling local login for ordinary users is the stronger end state, but only once role mapping, the redirect URI and the logout flow have been tested with real accounts. Document which option you chose, who can change it, and where that change is recorded.

API keys and synchronization are the parts of MISP that most often break when SSO is enforced, because automation does not perform a browser login. Keep each automation account and sync user as a dedicated local account with a scoped role, and confirm in your own test instance that PyMISP calls and scheduled sync jobs still authenticate after you change the login method. Do not assume that an API key tied to a Keycloak-mapped user will keep working when that user's group membership changes in Keycloak. Review the MISP security hardening guidance on API keys and roles before you enforce SSO, so the exemptions are deliberate rather than accidental.

The emergency admin is a local MISP account, not a Keycloak user, so that an identity provider outage, a broken client secret or a bad role mapping cannot remove the only way to administer MISP. Store its credentials in a sealed, access-logged location separate from your normal password manager and from the Keycloak realm administrators, and make sure at least two people know where it is. Set a strong password, enable multi-factor authentication on it if your MISP version supports it (confirm this in your version's documentation), and do not use it for daily work. Test it on a schedule: log in through the local form, confirm admin rights, and record the test. Keep a second, lower-privilege break-glass check so you know the path works before an incident forces its use.

Security settings for MISP and Keycloak SSO

Single sign-on moves the login decision to Keycloak, so the security of MISP depends on how both systems are configured together. The cards below cover the client authentication method, secret handling, transport and redirect settings, MFA, logging and administrative access in each system.

Client authentication method

The misp-docker project recommends client_secret_post for its OIDC setup, because client_secret_basic reportedly fails with Okta. Set the same method on the Keycloak client and in the MISP OidcAuth settings, then test a full login. Ask your team to confirm the method against your own Keycloak version and client configuration before relying on it.

misp-docker README

Client secret storage and rotation

The OIDC client secret lets MISP exchange authorization codes for tokens, so treat it like a database password. Keep it in a secrets manager or an environment file with restricted permissions, not in the MISP configuration committed to version control. Define who can read it, how it is rotated, and how a rotation is rolled out to MISP and Keycloak without a login outage.

TLS on both ends

Both the MISP base URL and the Keycloak issuer URL should use HTTPS with certificates your organization trusts. Confirm that MISP can reach the Keycloak discovery endpoint over TLS and that any internal certificate authority is installed where MISP runs. Keycloak's production guidance covers its own proxy and hostname settings, which should match the public URLs MISP uses.

Keycloak production guide

Strict redirect URI registration

Register only the exact MISP callback URL as a valid redirect URI on the Keycloak client, and avoid wildcards. Wildcard or loosely defined redirect URIs let an attacker steer an authorization response to a location they control. Review the list whenever the MISP hostname changes, and remove test or retired hostnames.

MFA enforced in Keycloak

Once SSO is enforced, the identity provider becomes the only login path for users, so its authentication policy determines MISP access. Require multi-factor authentication for the realm or for the MISP client through Keycloak's authentication flows, and confirm that the flow applies to every role that can reach MISP. Local MISP password and MFA settings should be reviewed separately for any account that still logs in directly.

Keycloak admin guide

Login logging in both systems

Record successful and failed logins in Keycloak's event log and in MISP's audit logging, and forward both to the organization's log platform. Matching timestamps and user identifiers let investigators trace a MISP session back to the identity event that created it. Confirm retention periods with your security team, because the sources supplied here do not set a default.

Limited Keycloak administrator rights

Anyone who can change the Keycloak client, role mappings or realm authentication flows can change who receives MISP administrator rights. Keep the realm admin role to a small group, use separate accounts for administration, and grant narrower roles for managing MISP clients. Review these grants on a fixed schedule and after staff changes.

Common failures when logging in to MISP with Keycloak

This table lists the failures teams most often hit when wiring OidcAuth to Keycloak, with the likely cause, the fix and the log to check for each. Work through it in order after a failed login, because the first failure often hides the later ones. Confirm exact log wording and settings against your MISP and Keycloak versions before you change production.

FailureLikely causeFix and where to look
Redirect URI mismatch on loginThe Keycloak client's valid redirect URIs do not exactly match the callback URL MISP sends, often because of http versus https, a missing path or a different hostname behind a proxy.Set the valid redirect URI in the Keycloak client to the exact MISP callback URL, then check the Keycloak event log for invalid redirect URI errors.
Wrong client authentication methodThe MISP side sends credentials in a form the Keycloak client does not accept. The misp-docker README recommends client_secret_post because client_secret_basic reportedly fails with some providers.Set the OIDC client authentication method to client_secret_post in MISP and confirm the client in Keycloak accepts it. Look for token endpoint errors in the MISP application log.
Issuer URL unreachable or certificate mismatchMISP cannot fetch the discovery document or token keys from the realm URL. Causes include a wrong realm path, an internal hostname that differs from the issuer in the token, or a certificate chain MISP does not trust.Request the realm's well-known OpenID configuration from the MISP host, compare the issuer value to the configured provider URL and import the internal CA into the MISP container trust store. Check the MISP error log for TLS or connection messages.
No role claim matching, user denied or given the wrong roleThe role claim is missing from the token, or the Keycloak role names do not match the mapping keys in OidcAuth. OidcAuth assigns the first matching role by priority, so an unexpected higher role can also win.Decode a test token to confirm the claim name and values, align the Keycloak roles with the mapping configuration and review role priority order. Check the OidcAuth messages in the MISP log for the claims received.
User lands with no organisationThe organisation claim or mapping is absent or misspelled, so MISP creates or matches the user without an organisation that fits the intended sharing group.Add the organisation attribute to the Keycloak token mapper, confirm the value matches an existing MISP organisation name, then correct the affected accounts in MISP. Verify the user's organisation field in the MISP administration pages.
Lockout after enforcing SSOSSO is enforced before the mapping, roles or an emergency admin account were tested, so no local administrator can sign in with a password.Keep at least one local emergency admin with a strong credential and MFA stored outside the SSO path, and test enforcement in a staging instance first. Use the MISP CLI on the server to reset access if needed.
Silent login loop or session dropsCookie, proxy or time settings break the session after the callback, or the server clock drifts so tokens appear expired.Confirm the public base URL, proxy headers and cookie domain, and synchronize server time on MISP and Keycloak hosts. Check MISP session logs and Keycloak login events for matching timestamps.
Failures that only affect sync or API callersBrowser SSO is enforced for every request, so automation using API keys or sync connections is blocked or redirected to the login page.Confirm which paths and API keys must bypass the browser flow, and test an API call and a sync after enforcement. Review the MISP access log and the Keycloak client's login events for the rejected requests.

Keeping the Keycloak and MISP versions aligned over time

Keycloak and MISP change on different schedules, so the SSO link needs its own upgrade checks. Keycloak plans four minor releases a year and a major release every two to three years, and since Keycloak 26.0 it has said that breaking changes in a minor release are opt-in. That lowers the risk of a minor upgrade changing behaviour under you, but it does not remove the need to review the release notes for anything that touches OIDC clients, client authentication methods, token claims or the role mappings your MISP OidcAuth setup depends on. The current Keycloak release is 26.8.1, published October 13, 2026, so confirm the version you plan to run against the Keycloak release notes and your own test realm before you schedule a change.

Plan database schema changes as a separate step. Keycloak migrates its schema automatically at startup by default, and the Keycloak upgrading guide also describes manual migration, where administrators apply the SQL themselves. Manual migration is the approach the guide suggests for large deployments, and it gives a change window and a rollback point that automatic startup migration does not. Decide which mode you use before the first upgrade, record it in the runbook, and take a database backup immediately before any schema change, because a failed migration is much harder to reverse than a failed container image.

Retest the OIDC login after every MISP upgrade and every Keycloak upgrade, even when neither side reports a change to the integration. The minimum check is a fresh browser login with a mapped test user, confirmation that the expected MISP role and organisation are assigned, a check that the emergency admin login still works, and a test of the API key path if your sync or automation jobs depend on it. Record the MISP version and Keycloak version with each test result. If your organisation uses the Red Hat build of Keycloak instead of the upstream project, track Red Hat's own release and support lifecycle as well, since its version line can lag the upstream release. Confirm the current supported version with Red Hat rather than assuming it matches the upstream number.

Questions buyers ask about MISP Keycloak SSO

What does a MISP Keycloak SSO project cost, and what drives the price?

The cost depends on the scope agreed in writing before work starts, so no fixed figure applies to every organization. The main drivers are the number of Keycloak realms and clients to configure, how many roles and organizations must map to MISP roles and organisations, whether MISP runs from the misp-docker images or a native install, and how much testing you need across user groups. Costs are mostly one-time for the design, configuration and cutover, with a smaller recurring part if you later add a retainer for upgrades and monitoring. When you request a quote, ask for each deliverable listed separately, the testing assumptions, and what you must provide yourself. DeployOpen does not publish a price list, so the quote follows from that written scope.

How long does it take to set up Keycloak SSO for MISP?

The duration is set mainly by role design and approvals rather than by the technical configuration. Mapping Keycloak roles to MISP roles and organisations requires agreement from the teams that own those decisions, and that agreement often takes longer than the client settings themselves. Other factors include the number of environments (test and production), whether you need a staged rollout, and how many user groups must be validated before enforcement. The written scope should state the timeline and the approval points it depends on, and you should confirm those dates with your own change board.

What must our team provide before an SSO project starts?

Plan to provide four things before work begins:

  • Realm administrator access to the Keycloak instance used for the test and production environments, or a named person who can make changes on your behalf.
  • A role catalogue that lists the Keycloak roles, their meaning, and the MISP role and organisation each should map to, with priority order where users hold several roles.
  • Test accounts covering each role and organisation, including at least one account that should be denied access.
  • A named owner on your side who approves role decisions and signs off testing.

Missing any of these typically moves the schedule rather than the technical work, so confirm them at the scoping stage.

Can our internal team set up MISP Keycloak SSO without a partner?

Yes, an internal team with Keycloak administration skills and MISP administration experience can complete the configuration, provided it has time to test and the role design is settled. The OidcAuth plugin is configured through MISP settings, and the Keycloak client must match the redirect and secret handling that MISP expects. The points where internal teams most often need outside help are role mapping across several organisations, testing the failure paths, keeping the emergency admin account working, and documenting the result for an audit. You can use a partner for the whole project, for a review of your own configuration, or for specific steps only.

Can we enforce SSO for MISP without locking out administrators?

You can enforce SSO safely if you keep a tested emergency admin account that does not depend on Keycloak. Before enforcement, confirm that the emergency account can log in with its local credentials, that its access is restricted and monitored, and that its password is stored in your secrets process. Test enforcement in a non-production instance first, with users from each mapped role, and confirm that API keys and automated sync jobs still work, since they do not use an interactive login. Also confirm how users with no matching Keycloak role are handled, so that they are denied rather than granted a default role by accident.

How does the client_secret_post setting affect the MISP login?

The client_secret_post method sends the client credentials in the request body rather than in an HTTP Basic authorization header. The misp-docker documentation recommends it because client_secret_basic reportedly fails with Okta, so verify which method your Keycloak client and MISP version accept during testing. If the token exchange fails, check the client authentication setting on the Keycloak client first, then the client ID and secret variables in your deployment. Record the chosen method in your configuration documentation so that future secret rotations do not break the login.

Does DeployOpen issue audit reports for our MISP SSO setup?

No. DeployOpen prepares the systems, configuration records and evidence that an assessment will ask for, such as documented role mappings, access control settings, test results and the emergency account procedure. Independent auditors and certification bodies issue any audit report, attestation or certification. Ask your assessor early which evidence they need and in what format, so that the scope of the preparation work is agreed in writing before the build starts.

Is ongoing support needed after Keycloak SSO goes live?

Support is needed because both Keycloak and MISP change over time. Keycloak plans four minor releases a year, and its operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. Each upgrade can change client settings, token behavior or database schema, so the MISP login should be retested after every change. Ongoing support, upgrades and continuous testing are available as retainers, and you can scope them separately from the initial project.

How a MISP login flows through Keycloak

The sign-in starts in the browser, which is redirected from MISP's OidcAuth plugin to Keycloak. After the user authenticates, MISP receives the authorization code and exchanges it server to server for tokens using client_secret_post, then reads the roles in the token and maps them to a MISP role and organisation. The trust boundary sits between the MISP server and Keycloak: check that the back-channel call reaches Keycloak over TLS and that the emergency local admin path stays available if the identity provider is down.

Login path from browser through MISP to Keycloak, with the emergency local admin path alongside.

How DeployOpen scopes and delivers MISP SSO with Keycloak

DeployOpen agrees the scope in writing before any configuration starts. For a MISP and Keycloak login project, that scope normally names the MISP version and packaging in use, the Keycloak deployment and realm it will trust, the roles and organisations that must map across, whether SSO is enforced for all users or only for some, and who signs off each stage. Most engagements are fixed-scope, so the quote follows from that written document rather than from an hourly estimate. Ask for the scope to list the Keycloak client settings, the role-to-role and organisation mapping rules, the emergency admin procedure and the documentation set as named deliverables, so each one can be accepted or rejected on its own.

Configuration happens inside your infrastructure, under your change control. The Keycloak client, the OidcAuth settings in MISP, and any container variables (for example, the OIDC enablement and provider settings used by misp-docker) are applied in your environment, using your secrets handling and your change process. Testing covers the paths that actually fail in production: a normal login, a user with no matching role, a user whose role changes in Keycloak, a disabled account, and the break-glass admin login with SSO switched off. Each result is recorded so your security and compliance team can review the same evidence later. Confirm with DeployOpen which test accounts and environments will be used, and whether production testing is permitted.

Documentation and support continue after handover. Your team receives written runbooks for the Keycloak client, the mapping rules, the emergency admin account and its credential storage, and the steps to change any of them. Because MISP and Keycloak both release updates on their own schedules, ask whether the scope includes a retest after upgrades. DeployOpen offers ongoing support, upgrades and continuous testing as optional retainers, which you can add once the initial work is accepted. Ask for the retainer terms, response expectations and what is excluded in writing, and confirm your internal owner for each recurring task.

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.