Documentation Index
Fetch the complete documentation index at: https://docs.conduktor.io/llms.txt
Use this file to discover all available pages before exploring further.

Principal that represents the authenticated identity of the Kafka client.
Configuring Gateway client connections involves two key decisions:
- Security mode (
GATEWAY_SECURITY_MODE): defines where authentication and authorization take place - Gateway or Kafka. - Security protocol (
GATEWAY_SECURITY_PROTOCOL): defines how clients communicate and authenticate with Gateway.
Security mode
TheGATEWAY_SECURITY_MODE environment variable determines where authentication and authorization take place. Gateway supports two modes:
GATEWAY_MANAGED
Gateway handles authentication and authorization. Use this mode when:- You want Gateway to manage clients’ credentials using local service accounts, or external ones from your identity provider (for OIDC) or certificates (for mTLS)
- You need Gateway to enforce ACLs
- You want the Gateway to be an abstraction layer that manages its own identities and ACLs
PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL
ACL behavior: ACLs are enabled by default on the passthrough virtual cluster. You can change this using GATEWAY_ACL_ENABLED.
Example configuration:
KAFKA_MANAGED
Kafka handles authentication and authorization. Gateway forwards client credentials to the backing Kafka cluster. Use this mode when:- Your backing Kafka cluster manages all credentials
- You want clients to use their existing Kafka credentials through Gateway
- You need Gateway to respect Kafka’s ACLs and permissions
SASL_PLAINTEXT, SASL_SSL only
KAFKA_MANAGED mode is incompatible with PLAINTEXT or SSL security protocols because these protocols don’t support credential forwarding to Kafka.Security protocols
Gateway supports the following security protocols for client connections:| Clients ⟶ GW transit in plaintext | Clients ⟶ GW transit is encrypted | |
|---|---|---|
| Anonymous access only | Security mode: GATEWAY_MANAGEDSecurity protocol: PLAINTEXTAuthentication mechanism: None | Security mode: GATEWAY_MANAGEDSecurity protocol: SSLAuthentication mechanism: None |
| Credentials managed by Gateway | Security mode: GATEWAY_MANAGEDSecurity protocol: SASL_PLAINTEXTAuthentication mechanism: PLAIN | Security mode: GATEWAY_MANAGEDSecurity protocol: SASL_SSLAuthentication mechanism: PLAIN |
| Gateway configured with OAuth | Security mode: GATEWAY_MANAGEDSecurity protocol: SASL_PLAINTEXTAuthentication mechanism: OAUTHBEARER | Security mode: GATEWAY_MANAGEDSecurity protocol: SASL_SSLAuthentication mechanism: OAUTHBEARER |
| Clients are identified by certificates (mTLS) | Not possible (mTLS requires encryption) | Security mode: GATEWAY_MANAGEDSecurity protocol: SSLAuthentication mechanism: MTLS |
| Credentials managed by Kafka | Security mode: KAFKA_MANAGEDSecurity protocol: SASL_PLAINTEXTAuthentication mechanism: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, OAUTHBEARER or AWS_MSK_IAM | Security mode: KAFKA_MANAGEDSecurity protocol: SASL_SSLAuthentication mechanism: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, OAUTHBEARER or AWS_MSK_IAM |
Configure security protocol
TheGATEWAY_SECURITY_PROTOCOL environment variable defines how clients communicate with Gateway.
You don’t set
GATEWAY_SASL_MECHANISM - this environment variable does not exist. Gateway automatically detects the authentication mechanism based on how the client presents itself. For example, if a client uses OAUTHBEARER, Gateway uses the OAuth configuration. If a client uses PLAIN, Gateway validates credentials based on the security mode.PLAINTEXT
There is no client authentication to Gateway and all communication is exchanged without any network security. Security mode:GATEWAY_MANAGED only
Gateway configuration:
SSL
With SSL only, there is no client authentication, but communication between the client and Gateway broker will be encrypted. Security mode:GATEWAY_MANAGED only
Gateway configuration:
mTLS
Mutual TLS leverages client side certificates to authenticate a Kafka client.Principal for an mTLS connection can be detected from the subject of the certificate using the same feature as Apache Kafka, the SSL principal mapping.
Security mode: GATEWAY_MANAGED only
Gateway configuration:
SASL_PLAINTEXT
Authentication from the client is mandatory but all communications are exchanged without any network security. Security mode:GATEWAY_MANAGED or KAFKA_MANAGED
Gateway-managed (PLAIN mechanism)
Plain mechanism uses username/password credentials to authenticate against Gateway. Credentials take the form of a JWT token managed in Gateway using the Admin (HTTP) API. Gateway configuration:GATEWAY_USER_POOL_SECRET_KEY has to be set to a random base64 encoded value of 256bits long to ensure that tokens aren’t forged. For example: openssl rand -base64 32. Otherwise, a default value for signing tokens will be used.
Client configuration:
- Create the service account, the username
- Generate a token for the service account, the password
Gateway-managed (OAUTHBEARER mechanism)
OAuthbearer uses an OAuth2/OIDC security provider to authenticate a token in Gateway. The OAuth credentials base is managed in the configured provider. This mechanism also allows you to verify claims from your OIDC provider (audience and issuer).
Gateway configuration:
Kafka-managed
Gateway forwards client credentials to the backing Kafka cluster for authentication. Credentials are managed by your backing Kafka cluster. Supported SASL mechanisms:PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, OAUTHBEARER, AWS_MSK_IAM
Gateway configuration:
SASL_SSL
Authentication from client is mandatory and communication will be encrypted using TLS. Security mode:GATEWAY_MANAGED or KAFKA_MANAGED
Gateway-managed (PLAIN mechanism)
Plain mechanism uses username/password credentials to authenticate against Gateway. Credentials are managed in Gateway using the HTTP API. Gateway configuration:GATEWAY_USER_POOL_SECRET_KEY to a random value to ensure that tokens cannot be forged. Otherwise, a default value for signing tokens will be used.
Client configuration:
Gateway-managed (OAUTHBEARER mechanism)
OAuthbearer uses an OAuth2/OIDC security provider to authenticate a token in Gateway. The OAuth credentials base is managed in the configured provider. This mechanism also allows you to verify claims from your OIDC provider (audience and issuer).
Gateway configuration:
Kafka-managed
Gateway forwards client credentials to the backing Kafka cluster for authentication. Credentials are managed by your backing Kafka cluster. Supported SASL mechanisms:PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, OAUTHBEARER, AWS_MSK_IAM
Gateway configuration:
Principal resolver
When using Confluent Cloud authentication with Kafka-managed mode, Gateway supports automatically resolving API keys to their associated service account. This feature enhances security and improves usability by working with the service account principals instead of raw API keys. See the principal resolver environment variables. Gateway configuration using environment variables:The value of
GATEWAY_CONFLUENT_CLOUD_API_KEY has to be a Confluent Cloud API key because it will be used to access the Confluent Cloud API. Find out more about Confluent Cloud API keys.XIGMNERQXOUKXDQU) to their associated owner, which will be either the user (e.g. u-12345) or the service account (e.g. sa-72839j).
Authentication flow
Automatic security detection (default behavior)
If you don’t specifyGATEWAY_SECURITY_MODE or GATEWAY_SECURITY_PROTOCOL, Gateway will attempt to detect them on startup based on the backing Kafka cluster’s configuration. If no security protocol is configured on the backing Kafka cluster, Gateway defaults to PLAINTEXT with GATEWAY_MANAGED mode.
With multi-listener configuration (preview feature),
GATEWAY_SECURITY_MODE, the per-listener security protocol (GATEWAY_LISTENER_<NAME>_SECURITY_PROTOCOL) and GATEWAY_ACL_ENABLED have to be set explicitly — Gateway does not infer them.| Kafka cluster security protocol | Inferred GATEWAY_SECURITY_MODE | Inferred GATEWAY_SECURITY_PROTOCOL |
|---|---|---|
| SASL_SSL | KAFKA_MANAGED | SASL_SSL |
| SASL_PLAINTEXT | KAFKA_MANAGED | SASL_PLAINTEXT |
| SSL | GATEWAY_MANAGED | SSL |
| PLAINTEXT | GATEWAY_MANAGED | PLAINTEXT |