Apache Kafka SSO and identity integration

Kafka supports several SASL mechanisms and mTLS, but mapping each identity to an ACL principal is where most projects stall. This page covers the choices, build order and checks.

On this page

How do you connect Apache Kafka to the identity system you already run?

Kafka authenticates clients, brokers and tools through SSL or SASL, and the documented SASL mechanisms are GSSAPI (Kerberos), PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 and OAUTHBEARER. Authorization is a separate step: once a principal is authenticated, Kafka decides what it can touch by checking ACLs tied to that principal. For a platform team asked to show audit and access reviews, the work is therefore two linked decisions: which identity source establishes each principal, and how that principal is mapped to the topics, groups and cluster operations it needs. The identity mechanism and the ACL model have to be designed together, not one after the other.

The harder part is that a successful login does not grant access. In KRaft clusters, the StandardAuthorizer stores ACLs in the cluster metadata log, and resources without a matching ACL are restricted to super users unless allow.everyone.if.no.acl.found is set to true. Teams that connect OAUTHBEARER or Kerberos and then see clients fail should check ACLs and the super user list before changing the identity provider. Also confirm the setting is false (or absent) in production, because a true value quietly lets any authenticated principal reach unprotected resources. Security in Kafka is optional per listener, so a cluster can run an unsecured listener next to a secured one. Inventory every listener in listeners and advertised.listeners, and confirm that no broker, controller or internal listener accepts plaintext connections that bypass the identity system. The Kafka security overview describes the available mechanisms and the optional nature of security, and is the right reference to check your listener design against.

Which Kafka components and settings carry identity

Identity in Apache Kafka is spread across several places: the listeners that accept connections, the controller and inter-broker paths that must also be authenticated, the client configuration that presents credentials, and the authorizer that decides what each principal may do. Review each component below before choosing a mechanism, because a gap in one of them can make the others irrelevant.

Broker listeners and security protocols

Each broker listener declares a name, a port and a security protocol, and that protocol decides whether a client must present TLS, SASL credentials or both. Kafka allows clusters to mix secured and unsecured listeners, so an older plaintext listener can remain open next to the one your identity team reviewed. Check that every listener your clients reach uses an authenticated protocol, and that no listener is left open by default during rollout. Confirm the exact listener configuration keys with the release you deploy, since they change between versions.

Client authentication options
SSL or SASL
Security overview

Inter-broker listener

Brokers talk to each other for replication and metadata, and that traffic needs its own authenticated listener, separate from client traffic. If the inter-broker listener is weaker than the client listeners, a compromised client network path can become a path to the broker-to-broker channel. Confirm which listener name and security protocol the brokers use between themselves, and that the same identities and certificates are trusted across all brokers before you enable enforcement on client listeners.

KRaft controller listeners

In KRaft mode, controllers form the metadata quorum and accept connections from brokers and, in some setups, from administrative tools. Controller listeners are a separate identity surface from broker listeners, and they are often overlooked in reviews that only test client access. Verify that controller endpoints use authenticated transport, that only the broker and controller identities you expect can connect, and that certificates or credentials for controllers are rotated with the same process as the brokers.

Client configuration and credentials

Clients, Kafka Connect workers, Streams applications and admin tools each carry their own security settings, including the protocol, SASL mechanism, JAAS or token configuration, and truststore. A mismatch between the client and a broker listener usually fails at connect time, but a client that falls back to a weaker setting can slip past review. Inventory every client and tool that connects, record which mechanism and principal each uses, and confirm that secrets are injected from your secret store rather than stored in application configuration files.

StandardAuthorizer and ACL storage

The StandardAuthorizer maps authenticated principals to permitted operations, and in KRaft clusters it stores those ACLs in the cluster metadata log rather than in an external store. Because ACLs replicate through the same metadata path as cluster state, changes made through the admin tools apply cluster-wide. Confirm that the authorizer is enabled on every broker, that the principal names it compares against match what your identity provider or certificate subject produces, and that ACL changes are tracked as part of your change process.

Authorization and ACLs

Super users and the default-deny setting

Super users bypass ACL checks entirely, so the super.users list should contain only the few administrative principals your operations team needs, ideally including a break-glass identity with an audited process. Separately, resources without a matching ACL are restricted to super users unless allow.everyone.if.no.acl.found is set to true. Enabling that setting weakens deny-by-default, so keep it false unless you have a documented reason. Verify both settings on every broker, since a drift between brokers is hard to spot from client behavior alone.

How a client identity reaches a Kafka authorization decision

The flow starts with a client, tool or inter-broker connection presenting a credential to a broker listener. The credential is checked by the identity source for that mechanism: an OIDC provider for OAUTHBEARER, a KDC for GSSAPI, the broker's own SCRAM credential store, or a certificate authority for mTLS. The listener then derives a principal name from that credential, and the StandardAuthorizer checks ACLs held in the KRaft metadata log. Check that the principal mapping rule produces exactly the name your ACLs reference, and treat the controller and inter-broker paths as separate trust boundaries.

Client identity flows through the listener, principal mapping and ACL check, with controller paths separated.

Which authentication mechanism fits your identity estate

This table compares the four authentication options for Kafka clients and brokers against the identity systems you already run. Read each row for the conditions that favor an option and the recurring operational work it adds, including principal mapping that must line up with ACLs. The main takeaway is that the mechanism follows your existing identity source, and the hidden cost is usually lifecycle work (keys, keytabs, credentials or certificates), not the initial setup.

MechanismWhen it fitsRecurring operational costPrincipal mapping work
SASL/OAUTHBEARER with OIDCYou run a central OIDC provider and want short-lived tokens for applications and services that already authenticate there.Validating tokens, managing signing key rotation at the provider, and handling token expiry in long-running clients and Connect workers.Map token claims such as subject or client ID to Kafka principals, and confirm which claim is stable across token types.
SASL/GSSAPI with KerberosYour estate is built on Active Directory or an MIT KDC, and operations teams already run Kerberos for other services.KDC availability, keytab distribution and rotation for each service principal, and clock synchronization across hosts.Principals take the Kerberos form, so short names and realm rules must be defined and tested before ACLs are written.
SCRAM-SHA-256 or SCRAM-SHA-512You need username and password style access without an external directory, for example for tools or teams outside the central identity system.Creating, rotating and revoking credentials stored in Kafka, and tracking which application holds each one.Usernames map directly to principals, which keeps mapping simple but moves identity lifecycle into Kafka administration.
mTLS with client certificatesYou operate a private certificate authority and want each client identity bound to a certificate, including for machine-to-machine traffic.Issuing, renewing and revoking client certificates, and checking that revocation is enforced where clients connect.The certificate distinguished name or a configured rule becomes the principal, so naming conventions must be fixed early and documented.
Choosing across mechanismsMost estates combine one mechanism for people or applications with another for brokers and inter-broker traffic.Each additional mechanism adds its own rotation calendar and failure modes, which should be covered in the runbook.Confirm one principal naming scheme across all mechanisms before writing ACLs under the StandardAuthorizer.

How to build Kafka identity integration in sequence

This sequence moves a Kafka cluster from unauthenticated or shared-credential access to named, identity-backed principals, with each client group migrated and tested against an ACL baseline that denies access by default.

  1. Confirm the Kafka release and Java runtime

    Before choosing an authentication mechanism, confirm the Kafka release the cluster runs or will run, and confirm the Java runtime on brokers, Kafka Connect and tools. Kafka 4.0 and later run only in KRaft mode, and brokers, Connect and tools require Java 17, while clients and Kafka Streams applications need at least Java 11, according to the Kafka upgrade notes. Check the supported releases on the Kafka downloads page, since bugfix releases come only for supported versions. The check is a written record of the broker version, the Java version on each component, and the KRaft mode status of the cluster. If any component fails this record, resolve it before changing listeners.

  2. Inventory clients, tools and Connect workers by identity

    Build a list of every producer, consumer, Streams application, Connect worker, admin tool and scheduled job that connects to Kafka. For each one, record the identity source it should use, such as a corporate directory through an OIDC provider, a Kerberos realm, a service account in a secrets store, or a workload certificate. Note the client library and version, since not every library supports every mechanism. The output is an inventory table with one row per workload and one identity type per row. Confirm with each owning team which workloads can change credentials in the next phase.

  3. Define listeners and security protocol per listener

    Plan one listener for each access pattern, such as internal clients, inter-broker traffic, controller traffic and tools. For each listener, set the security protocol that combines TLS with a SASL mechanism or with mutual TLS, and keep an unsecured listener only where you have a documented reason. Kafka security is optional and listeners can mix secured and unsecured protocols, so the cluster configuration must make each listener's protocol explicit. The check is a reviewed listener map that names the port, protocol and allowed client groups for each listener, approved by the security owner.

  4. Configure the chosen mechanism on brokers and clients

    Set the SASL mechanism for each listener from the set Kafka documents: GSSAPI for Kerberos, SCRAM-SHA-256 or SCRAM-SHA-512 for stored credentials, OAUTHBEARER for OIDC-issued tokens, or mutual TLS where certificates identify workloads. Configure the broker JAAS or listener settings and the matching client properties, and store secrets in your secret manager rather than in files checked into source control. Validation of tokens, keytabs or certificate trust chains depends on your identity provider, so confirm those details with its administrators. The check is a successful connection from a test client on the new listener, with the authenticated principal visible in broker logs.

  5. Set principal name mapping and super users

    Decide how identity claims or certificate subjects become Kafka principal names, and write the mapping rules so that one human or workload always maps to one principal. Define the small set of super users, keep it to operators who manage the cluster, and record who holds each one. Super users bypass ACL checks, so every account on this list needs individual credentials and audit logging. The check is a test that authenticates two identities from different sources and shows the expected principal string in the broker logs for each.

  6. Create ACLs from a deny-by-default baseline

    In KRaft clusters, the StandardAuthorizer stores ACLs in the metadata log. Keep allow.everyone.if.no.acl.found set to false so that resources without ACLs are restricted to super users, then grant each principal only the topic, group and cluster operations its inventory row requires. Apply grants by workload group rather than by individual developer where possible. The check is a test principal that can produce to its granted topic and is denied on an unlisted topic, with the denial recorded in the authorizer log.

  7. Migrate clients in phases and retire old access

    Move workloads in groups, starting with low-risk clients, and run both the old and new listeners in parallel until each group is verified. Use the rolling upgrade guidance in the Kafka upgrade notes as a reference for how components move between versions, and confirm client library compatibility before each group changes. Once a group passes its checks, remove its old credentials and close the legacy listener only after every inventory row is marked complete. The output is a signed-off migration log that shows each workload, its principal, its ACLs and the date its legacy access was removed.

How identity claims become Kafka principals and ACL subjects

The principal a broker sees is derived from the authenticated credential, not from the name your users or applications think they have. Kafka takes the verified identity from the SASL mechanism or the TLS certificate and passes it through a mapping rule that produces a short principal name, typically in the form User:name. Every ACL, every super user entry and every audit record refers to that short name, so the mapping rule effectively decides who can do what. Agree the naming convention before anyone writes an ACL, because changing it later means rewriting ACLs, consumer group permissions and monitoring queries together.

Mismatched naming is the most common source of confusing authorization failures. A Kerberos principal such as svc-orders@EXAMPLE.COM can map differently depending on whether the realm is stripped, and a service present in two realms may end up with two identities. For OIDC, the choice of claim matters: the sub claim is stable but often an opaque identifier, while a claim such as a preferred username may change when people are renamed. For mTLS, a certificate distinguished name carries attribute ordering and formatting details that must match the mapping pattern exactly, and certificate renewal can change parts of it. Ask the identity team which attribute is authoritative for each population of users and services, and test each mapping with a real token or certificate before depending on it.

Confirm the exact mapping configuration keys for your Kafka release in the security documentation before building, including how the SASL and SSL principal builders are set and how rules are expressed. The Kafka security overview is the starting point for the supported mechanisms. Write the mapping rules in a test cluster, print the principal each identity produces, and record the results in a naming table that security, identity and platform owners sign off. That table becomes the input to the ACL design and to the review of any new service account.

What drives the effort of Kafka identity work

This table lists the factors that expand or shrink identity work for a self-hosted Kafka cluster, with a way to keep each one under control. Read it before scoping, because most of the effort comes from how many identity sources, clients and clusters must agree on the same principals.

DriverWhy it changes effortHow to keep it down
Number of client applicationsEach application needs its own principal, credential or certificate, and an ACL set matched to the topics it reads and writes.Group clients by service owner and reuse one principal pattern per team. Ask for a generated ACL inventory before cutover.
Client languages and librariesEach language runtime may support different SASL mechanisms or OAUTHBEARER token callbacks, so testing multiplies.Standardize on a short list of supported client libraries and confirm mechanism support for each one in your own test environment.
Number of identity sourcesPrincipals from several directories must map to one naming scheme, and each source adds a trust path, an owner and a sync process.Use one identity source for service accounts and treat any other source as an exception that needs a documented mapping.
Connect and Streams service identitiesConnect workers and Streams applications act as long-running services that need their own principals, plus ACLs for internal and state topics.Create one service identity per workload, name it after the connector or application, and list its internal topics in the same change.
Multi-cluster or cross-site replicationReplicated ACLs and consumer group offsets only work when principals match on both clusters, so identity drift breaks failover.Keep one identity source and one naming standard across clusters, and test a consumer failover with the same principals before go-live.
Mixed listeners during migrationOld and new listeners run side by side, so ACL checks, certificates and client configs must be correct on both paths.Phase the listener cutover by client group, keep the old listener until each group passes a test, and remove the old listener last.
Compliance evidence requirementsAssessors often ask who can access each topic, how credentials are issued and rotated, and how access changes are logged.Export the ACL state and identity mapping as versioned records early, and agree with your auditor which evidence they expect before work starts.
Credential rotation modelCertificate or secret rotation touches every client and must be coordinated, so manual rotation scales poorly.Confirm with your team which rotation method each mechanism supports and automate renewal where your identity provider allows it.

How identity setup differs by deployment model

A single-cluster deployment is the simplest case: a small set of brokers and KRaft controllers in one network segment, with the identity provider reachable on that same network or through one routed path. Clients usually reach the identity provider directly for tokens, and brokers need only network access to validate them. The identity dependency is a single point of failure, so the question is less about routing and more about what happens when the directory or KDC is unavailable.

  • Provider reachability: Confirm that every broker can reach the OIDC JWKS endpoint, or the KDC, over the listener network, and test this from each broker host rather than assuming it.
  • Keytab rotation: For GSSAPI, plan a keytab replacement window for each broker principal, since one stale keytab blocks that broker's logins.
  • SCRAM credentials: Rotate SCRAM passwords through the admin tooling on a schedule and store them in your secrets manager.
  • Token validation: With an internal OIDC provider, check signing key rollover behavior and how often brokers refresh the JWKS cache.
  • Certificate authority: Keep the mTLS CA in one place and document which broker and client certificates it issues.

Confirm the exact SASL configuration keys and rotation procedure against the security documentation for your Kafka release before you write runbooks.

Which secrets, certificates and admin paths need hardening

Identity integration moves trust into a handful of artifacts: SCRAM password hashes, Kerberos keytabs, TLS private keys, OAuth client secrets and admin paths that bypass normal authorization. Each one needs an owner, a storage location, a rotation plan and a check that it cannot be read by the wrong party. Confirm current settings for your release in the Kafka security overview before you finalize the design.

SCRAM credential storage

SCRAM-SHA-256 and SCRAM-SHA-512 credentials are stored in cluster metadata, so anyone who can read or alter that metadata can change a principal's password material. Decide which team creates SCRAM users, how initial passwords are delivered to applications, and who can run the admin commands that write them. Confirm with the security overview for your release how credentials are stored and whether client passwords should be generated by a secrets manager instead of by people. Limit who can create or delete SCRAM users.

Security overview

Kerberos keytab protection

A GSSAPI deployment depends on keytab files that hold long-term service keys for brokers and clients. A copied keytab lets an attacker impersonate that principal until the key is changed. Restrict keytab files to the service account that reads them, keep them off shared file shares and container images, and record which hosts hold each keytab. Ask your Kerberos administrator how key versions are rolled and whether old keys are retired after a change.

Certificate and private key handling

Broker certificates, client certificates for mTLS and the private keys behind them define who the cluster trusts. Store private keys in a restricted keystore or a secrets manager, never in configuration repositories, and separate the certificate authority used for brokers from the one used for clients where your policy allows. Track expiry dates for every certificate, because an expired broker certificate stops connections across the whole listener. Confirm the TLS settings for your release in the security overview.

OAuth client secret rotation

For SASL/OAUTHBEARER, the client secret or signing trust configured for your OIDC provider is a credential in its own right. Define how often it rotates, which automation updates client configuration when it changes, and how a leaked secret is revoked without a full cluster restart. Test a rotation in a staging cluster first, since clients that cache tokens or secrets can fail in ways that look like authorization errors. Confirm the supported token validation settings with the release documentation.

Super user restriction

Super users bypass ACL checks, so every principal listed in super.users can read any topic and change cluster configuration. Keep this list short, usually limited to broker identities and a small break-glass administrator group, and review it whenever team membership changes. Confirm how allow.everyone.if.no.acl.found is set in your environment, since a permissive default undermines the deny-by-default model. Document who can change the super user list itself.

Authorization and ACLs

Admin tool and Connect REST authentication

Command-line admin tools, Kafka Connect's REST API and any dashboard that calls them need their own authentication, or they become the easiest path around broker ACLs. Give admin tools a separate identity from applications, require TLS on the connections they make, and keep their client configuration files out of shared home directories. Confirm how the Connect REST API authenticates requests for your release before exposing it beyond the internal network.

TLS on credential-carrying listeners

Any listener that accepts SASL passwords, tokens or Kerberos tickets should use TLS, otherwise those credentials cross the network in a form an observer can capture or replay. Check that every listener used for authentication is encrypted, and that unsecured listeners are not left open for convenience during migration. Kafka allows mixed secured and unsecured listeners, so verify the advertised listeners rather than assuming that a secured port is the only one in use. Confirm listener protocol settings in the security overview.

How to test identity integration and fail safely

Test every mechanism before any application depends on it. For each listener, run a valid credential and an expired one through SASL/OAUTHBEARER, GSSAPI, SCRAM-SHA-256 or SCRAM-SHA-512, and mTLS, and confirm the broker rejects the expired case with an authentication failure rather than falling back to another mechanism. Then test the wrong door: a principal that is valid on the internal listener should be refused on the external one if your listener design says so. Revoke a client certificate, disable a Kerberos account or remove a SCRAM user, and confirm that existing sessions end at the next reauthentication. Give each test a written expected result so that a failed run is a clear finding, not a judgment call.

Next, prove that denial is the default. Create a test principal that authenticates successfully but has no ACLs, then attempt a produce and a fetch on a test topic. With allow.everyone.if.no.acl.found unset, the StandardAuthorizer should deny both, because in KRaft clusters resources without ACLs are restricted to super users. Keep the super user list short and documented, and confirm that no test or service account has been quietly added to it. Also test fail-closed behavior: when the OIDC provider or Kerberos KDC is unreachable, a new client connection should fail with a clear error, and existing clients should not be given a fallback path that skips authentication. Record how long tokens remain valid so your team knows the real exposure window during an identity outage.

Operations decide whether the setup stays safe after go-live. Log the authenticated principal for every action your audit process relies on, and check that those logs can be tied back to the identity provider's own records. Compare the live ACL set against the approved mapping at a fixed interval and after every change, since drift usually comes from emergency fixes. Rotate SCRAM passwords, certificates and service credentials on a schedule your security team sets, and rehearse one rotation before the first production use. Finally, keep a document for auditors that lists each mapping rule from identity claim or certificate subject to Kafka principal, the owner of each ACL group and the review cadence. Auditors can then test your claims directly, and your team does not have to reconstruct them under pressure.

What buyers ask before bringing in a partner for Kafka identity

How much does Kafka identity integration cost?

The cost depends on how many identity sources you connect, how many client types must authenticate, and how much of the directory and certificate work your own teams already run. A partner is paid for planning, configuration, testing and handover, while your organization pays for the directory, certificate authority and KDC staff time it contributes. Most of the cost is one-time build work. Recurring costs come from certificate renewal, credential rotation, and retesting after each Kafka upgrade. Ask any quote to separate build effort from recurring support and to name each identity system it touches.

How long does Kafka SSO integration take?

Duration depends mainly on the number of client applications and the number of identity sources. One OIDC provider serving a few services is a much smaller job than Kerberos with several realms, mTLS for dozens of services and SCRAM credentials for legacy tools. Each client type needs its own test path, and each new application adds a principal mapping and ACL review. Ask for a schedule that lists identity sources, client groups and a test environment, because those inputs set the timeline more than the Kafka configuration does.

What does the work need from our team?

Expect to provide access to your directory or identity provider with rights to create or read client registrations, groups and claims. Kerberos work needs KDC administrators to create service principals and keytabs. mTLS work needs your certificate authority team to issue broker and client certificates and agree on renewal. Application owners must confirm which clients connect, which topics they use and which principals they run as. Missing any of these groups is the most common reason integration stalls, so name them in the plan before work starts.

Can our internal team set up Kafka identity without a partner?

Yes, if your team already runs the identity system involved and has Kafka operations experience. The Kafka security overview documents SSL and SASL options, and the authorization documentation explains how KRaft stores ACLs in the cluster metadata log. The harder parts are testing every client path, avoiding a cluster where resources without ACLs are open, and keeping credentials rotated. Teams new to these pieces often benefit from an external review of the design and test plan, even when they do the build themselves.

Should we choose OIDC or Kerberos for Kafka clients?

Choose based on where your identities already live and what your clients can support. OIDC through SASL/OAUTHBEARER fits organizations that centralize users and services in a modern identity provider and want token-based access. Kerberos through GSSAPI fits environments built around Active Directory or an existing KDC. Many organizations run both, for example OAUTHBEARER for applications and GSSAPI for human or legacy tools. Confirm that each client library and language you use supports the mechanism you select before committing.

How does identity integration stay current across Kafka releases?

Kafka releases on a time-based plan, and the downloads page lists 4.3.1, 4.2.2 and 4.1.2 as currently supported releases. Upgrades can be rolling from each release in the past year to the latest version, but client libraries, OAUTHBEARER handling and authorizer behavior should still be retested at each step. Ask for a support arrangement that includes compatibility testing against your current clients, a review of release notes and a defined process for certificate and credential renewal.

What evidence will our security and compliance teams receive?

You should receive a written design that lists each listener, its authentication mechanism, the identity source behind it, and the ACL model used. Test results should show that unauthenticated and wrongly mapped clients are refused. Compliance teams can use this to prepare evidence for their own assessments, but DeployOpen does not issue audit reports or certifications. Independent auditors and certification bodies make those determinations, so confirm with your assessor which artifacts they expect.

How DeployOpen scopes, builds and hands over Kafka identity integration

DeployOpen approaches Apache Kafka SSO and identity integration as a written, fixed-scope engagement inside your own infrastructure. The work covers how clients, brokers and tools authenticate, how principals map to ACLs, and how the setup is tested and documented so your security and identity teams can review it.

How we scope

  • Inventory which clients, brokers, Connect workers and admin tools need to authenticate, and which identity systems they should use.
  • Choose the SASL mechanisms and TLS listener layout, including OAUTHBEARER with an OIDC provider, GSSAPI, SCRAM or mTLS.
  • Agree in writing the principal naming scheme, the ACL model and the deliverables before any configuration work begins.

How we build

  • Configure each listener and authentication mechanism in a test cluster first, then verify client connections against the identity provider.
  • Map identity groups or service principals to StandardAuthorizer ACLs, starting from deny-by-default with explicit grants per resource.
  • Test failure paths such as expired tokens, revoked credentials and unauthorized topic access, and record the results for your reviewers.

How we hand over

  • Deliver configuration, listener and authentication settings, and ACL definitions in version-controlled form your team can review.
  • Document how each client authenticates, how credentials and certificates are rotated, and who owns each principal.
  • Walk your operations and security staff through the runbook so they can add clients and respond to identity changes.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover, scoped separately from the original engagement.
  • Re-test authentication and authorization after Kafka upgrades, identity provider changes or new client onboarding when you request it.
  • Confirm with your team which support scope, response expectations and testing frequency you need before agreeing a retainer.

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.