Skip to main content
To configure Conduktor Gateway, we recommend setting up environment variables. They can be set in the Gateway container or taken from a file. To make sure the values were set correctly, check the startup logs.

Use the Gateway container

You can set the environment variables during the docker-run command with -e or --env:
Or in a docker-compose.yaml:

Use a file

You can mount a file with the key-value pairs into the container and provide its path by setting the environment variable GATEWAY_ENV_FILE. Note these variables should be exported by the file as they are injected in the wrapper that starts the Gateway process.
Example
You’ll get a confirmation in the logs: Sourcing environment variables from $GATEWAY_ENV_FILE (or a warning if the file isn’t found: Warning: GATEWAY_ENV_FILE is set but the file does not exist or is not readable.).

Listeners

Per-listener configuration with GATEWAY_LISTENER_<NAME>_* variables is available from Gateway 3.20.0. On earlier versions, networking is configured with the global variables described in Legacy network configuration. To move an existing deployment over, see Migrate to listener configuration.
Configure listeners using the pattern GATEWAY_LISTENER_<NAME>_<PROPERTY>, where <NAME> is a label you choose. See Configure Gateway listeners for details.
Listener names have to start with a letter and contain only alphanumeric characters. Underscores are reserved as delimiters in GATEWAY_LISTENER_<NAME>_<PROPERTY>, so a name like MY_LISTENER would be ambiguous. Gateway only recognizes variables whose <NAME> matches this pattern — variables using any other name are ignored, and the listener is silently not created.
The following global variable applies to all listeners that use port routing:

Listeners: port specification format

GATEWAY_LISTENER_<NAME>_PORTS accepts ranges, individual values, or a combination of both, separated by commas:
When the advertised ports differ from the local ports (for example, behind a NAT or in Docker), use the advertised:local format:
You can mix ranges and individual ports with local mappings. For example, with GATEWAY_MIN_BROKERID=0 and three brokers:
For SNI routing, the listener uses a single port; the advertised:local format maps the advertised port (for example, a load balancer’s 443) to the local one:

Listeners: SSL client authentication modes

The GATEWAY_LISTENER_<NAME>_SSL_CLIENT_AUTH setting controls whether the Gateway requests a client certificate during the TLS handshake for a specific listener:
When SSL_CLIENT_AUTH is set to OPTIONAL or REQUIRE, you must configure a truststore in sslConfig.trustStore containing the CA certificates used to verify client certificates.

Listeners: zero-config mode

If you don’t set any listener or networking environment variables, Gateway configures itself automatically. It creates a single listener named DEFAULT with port routing, assigning ports from 6969 (one per broker, plus two for headroom), and takes the listener’s security protocol from the backing Kafka cluster. GATEWAY_ACL_ENABLED defaults to false in this mode. When GATEWAY_SECURITY_MODE is not set, Gateway infers it from the backing cluster’s security protocol:
Zero-config mode is for local development and testing only. Configure your listeners, security mode and ACLs explicitly for production deployments.

Listeners: legacy configuration

Per-listener configuration replaces these global variables. Gateway doesn’t start if one of them is set. For how they behave on earlier versions, see Legacy network configuration; to switch, see Migrate to listener configuration.

External connections

Declare connections to external systems using the pattern GATEWAY_EXTERNAL_CONNECTION_<NAME>_CONFIG_<PROPERTY>, where <NAME> is a label you choose and is how a resource references the connection. See Configure Gateway external connections for details.
Connection names have to start with a letter and can contain letters, numbers and underscores, so DEFAULT_SR is a valid name. A name can’t contain _CONFIG_, because that’s the delimiter between the name and the property. Gateway rejects such a variable at startup rather than guessing where the name ends. Names are case-insensitive and Gateway stores them in upper case, so default_sr and DEFAULT_SR are the same connection. We recommend you declare them in upper case to match the variable.
Every connection needs a TYPE:

External connections: Confluent-like schema registry

Set TYPE to CONFLUENT_SCHEMA_REGISTRY.

External connections: AWS Glue schema registry

Set TYPE to AWS_SCHEMA_REGISTRY. Omit every BASIC_CREDENTIALS_ variable and Gateway falls back to the AWS SDK’s default credentials provider. See what it searches.

External connections: schema registry client properties

Both schema registry types also accept any property their client library understands, in the same namespace. See the formats and precedence rules.

External connections: HashiCorp Vault KMS

Set TYPE to HASHICORP_VAULT. These are the connection’s own properties. Its credentials depend on AUTH_TYPE and are listed in the sections that follow. Write ENGINE_TYPE, AUTH_TYPE and CONNECTION_BACKOFF_CHRONO_UNIT in upper case, as shown. Gateway matches these values exactly, so transit and seconds fail startup.

External connections: Vault token authentication

Set AUTH_TYPE to TOKEN.
Gateway doesn’t renew a token you supply — with AUTH_TYPE set to TOKEN it never calls Vault’s renew endpoint, so the token stays in use until its TTL expires, and recovering means replacing the variable and restarting. AppRole and username/password avoid that: Vault issues a short-lived token and Gateway renews it in the background. If you do use a token, give it a TTL that outlives your deployment window, or keep it fresh outside Gateway. See Vault’s production hardening guidance .

External connections: Vault AppRole authentication

Set AUTH_TYPE to APP_ROLE.

External connections: Vault username and password authentication

Set AUTH_TYPE to USERNAME_PASSWORD.

External connections: Vault JWT authentication

Set AUTH_TYPE to JWT.

External connections: Vault LDAP authentication

Set AUTH_TYPE to LDAP.

External connections: Vault GitHub authentication

Set AUTH_TYPE to GITHUB.

External connections: Vault Kubernetes authentication

Set AUTH_TYPE to KUBERNETES. Gateway has to run inside the target cluster.

External connections: Vault GCP authentication

Set AUTH_TYPE to GCP.

External connections: Vault AWS IAM authentication

Set AUTH_TYPE to AWS_IAM.

External connections: Vault AWS EC2 authentication

Set AUTH_TYPE to AWS_EC2. Gateway has to run on an EC2 instance.

External connections: Vault AWS EC2 PKCS7 authentication

Set AUTH_TYPE to AWS_EC2_PKCS7. Gateway has to run on an EC2 instance.

External connections: Vault Transform Secrets Engine

Set ENGINE_TYPE to TRANSFORM and leave ENGINE_MOUNT unset.

External connections: AWS KMS

Set TYPE to AWS_KMS. These are the connection’s own properties. Its credentials depend on CREDENTIALS_TYPE and are listed in the three sections that follow. Write CREDENTIALS_TYPE in upper case, as shown. Gateway matches the value exactly, so basic fails startup.

External connections: AWS KMS access keys

Set CREDENTIALS_TYPE to BASIC.

External connections: AWS KMS temporary credentials

Set CREDENTIALS_TYPE to SESSION. Gateway doesn’t refresh these, so they stop working when they expire.

External connections: AWS KMS default provider chain

Set CREDENTIALS_TYPE to DEFAULT and pass no credentials. Gateway resolves them through the AWS SDK’s default provider chain. See what it searches.

External connections: Azure Key Vault

Set TYPE to AZURE_KMS. These are the connection’s own properties. Its credentials depend on CREDENTIALS_TYPE and are listed in the three sections that follow.

External connections: Azure Key Vault client secret

Set CREDENTIALS_TYPE to TOKEN.

External connections: Azure Key Vault username and password

Set CREDENTIALS_TYPE to USERNAME_PASSWORD.

External connections: Azure Key Vault default credential chain

Set CREDENTIALS_TYPE to DEFAULT and pass no credentials. Gateway resolves them through the Azure SDK’s default credential chain. See what it searches.

External connections: Google Cloud KMS

Set TYPE to GCP_KMS.

External connections: Fortanix DSM

Set TYPE to FORTANIX_KMS. These are the connection’s own properties. Its credentials depend on CREDENTIALS_TYPE and are listed in the two sections that follow.

External connections: Fortanix DSM API key

Set CREDENTIALS_TYPE to API_KEY.

External connections: Fortanix DSM username and password

Set CREDENTIALS_TYPE to USERNAME_PASSWORD.

External connections: Thales CipherTrust Manager

Set TYPE to CIPHERTRUST_KMS.

External connections: startup checks

Applies to the connection types Gateway contacts at startup, which means the two schema registry types. Gateway doesn’t contact a KMS at startup.

Load balancing

Connect Gateway to Kafka

Conduktor Gateway’s connection to Kafka is configured by the KAFKA_ environment variables. When translating Kafka’s properties, use upper case instead and replace the . with _. For example: When defining Gateway’s Kafka property bootstrap.servers, declare it as the environment variable KAFKA_BOOTSTRAP_SERVERS. Any variable prefixed with KAFKA_ will be treated as a connection parameter by Gateway.

Connection pooling

Cluster switch failover

Setting up your Kafka clusters for failover is similar to the standard setup, but you need to provide two sets of properties: one for your main cluster and one for your failover cluster. You can define these properties as environment variables or load a cluster configuration file.

Security and authentication

These global settings determine where authentication and authorization take place, and how clients authenticate. The security protocol itself is set per listener — see Listeners.
Set the security protocol clients use to connect to Gateway per listener, with GATEWAY_LISTENER_<NAME>_SECURITY_PROTOCOL (see Listeners). The global GATEWAY_SECURITY_PROTOCOL and its DELEGATED_* values apply only to legacy network configuration, removed in Gateway 3.23.0.

SSL authentication

The keystore and truststore are shared across all listeners. mTLS client authentication is set per listener with GATEWAY_LISTENER_<NAME>_SSL_CLIENT_AUTH. The global GATEWAY_SSL_CLIENT_AUTH applies only to legacy network configuration, removed in Gateway 3.23.0.
Password values (GATEWAY_SSL_KEY_STORE_PASSWORD, GATEWAY_SSL_KEY_PASSWORD, GATEWAY_SSL_TRUST_STORE_PASSWORD) support any characters except a literal single-quote ('). Pattern: [^']*

OAuthbearer

Some of these definitions (e.g. SASL_OAUTHBEARER_JWKS_ENDPOINT_REFRESH) are taken from Kafka documentation .

Principal resolver

Find out more about the principal resolver.

Plain authentication

Security provider

HTTP API

Password values (GATEWAY_HTTPS_KEY_STORE_PASSWORD, GATEWAY_HTTPS_TRUST_STORE_PASSWORD) support any characters except a literal single-quote ('). Pattern: [^']*

Records API

The produce records API has a listener of its own, which Gateway starts only when GATEWAY_FEATURE_FLAGS_RECORDS_API is true.

Feature flags

Lifecycle metrics scoping

When GATEWAY_FEATURE_FLAGS_LIFECYCLE_METRICS is enabled, these settings bound the cardinality of the recorded metrics. Find out more about request lifecycle metrics.

Licensing

Monitoring

Audit

GATEWAY_AUDIT_LOG_EVENT_TYPES valid value is ALL (default) or a comma-separated list of the following:
  • CONNECTION for initial connection event, i.e. receiving Kafka’s API_VERSIONS request
  • AUTHENTICATION for authentication success or failure event
  • REST_API for all REST v1 admin requests and all REST v2 requests (see API reference)
  • ACL_ADMIN for ACL management events done via Kafka Admin API, i.e. CREATE_ACLS and DELETE_ACLS requests
  • AUTHORIZATION for authorization failure events, i.e. when ACL permissions deny an operation on a resource
Find out more about Gateway audit event types, including Kafka API key auditing.

Logging

Product analytics

Advanced configuration

These settings are for advanced tuning and debugging. Most deployments don’t need to change them.

Threading

Gateway internal timeout

These timeout thresholds are used by Gateway and typically don’t need modification since they match Apache Kafka’s defaults. If your Kafka brokers or clients use non-default timeout values, you may want to adjust these.

Graceful shutdown

During shutdown, Gateway closes client connections in controlled manner to simulate rolling Kafka broker restart, with GATEWAY_SHUTDOWN_DELAY_BETWEEN_BROKERS_MS pause between brokers. For librdkafka clients, set GATEWAY_SHUTDOWN_DELAY_BETWEEN_BROKERS_MS to 1000 or higher to prevent them from crashing during shutdown because of ALL_BROKERS_DOWN error.

Internal topics

As Gateway is stateless, it uses Kafka topics to store its internal state. Use the following environment variables to configure these internal topics. If missing, Gateway will automatically create the topics (if it has the permission to do so). You can also create the topics independently of Gateway, just make sure they are configured as described below.

Internal state

Firstly, there are some general configuration settings for Gateway internal state management which apply to all used topics.

Topic names

Required topic configuration

The most important setting is log.cleanup.policy which defines the clean up policy for the topic. Most of the topics used by Gateway are compacted, but some use time-based retention. If this isn’t set up properly, Gateway will throw an error on startup. Set the following:
  • log.cleanup.policy=compact for compaction
  • log.cleanup.policy=delete for time based retention
If Gateway creates the topics for you, it will set the right values. The second vital setting is the replication factor. This should be set to at least 3 in production environments to ensure that the data is safe (Gateway will warn you on startup, if it’s set to less than three). When creating topics, Gateway uses the default value for your Kafka brokers for this setting. For partition count, most of the topics are low volume and can operate well with only a single partition. This isn’t enforced (Gateway will work with multi partition topics for internal state), however there is no need to have more than one partition. The exception to this is the audit log topic which can have a lot of events written to it, if enabled for a busy cluster. We recommend starting with 3 partitions for audit logs (this doesn’t affect Gateway performance as it is a writer, not a reader), but will impact any other consumers you may run reading from it.

Data Quality topic configs

API blocking modes

The GATEWAY_FEATURE_FLAGS_BLOCK_UNSUPPORTED_APIS environment variable controls how Gateway handles Kafka APIs that aren’t explicitly supported. Two modes:
  • Permissive mode (false, default): Gateway allows unsupported APIs to pass through - maintains backward compatibility
  • Restrictive mode (true): Gateway blocks unsupported APIs for enhanced security
When to use each:
  • Use permissive (default) when upgrading or if you have legacy applications
  • Use restrictive when you want maximum security and only allow known, supported APIs
Impact of each mode: Permissive mode (false):
  • ✅ Backward compatibility: Legacy applications continue to work
  • ✅ Smooth upgrades: No breaking changes during Gateway updates
  • ⚠️ Security risk: Unsupported APIs bypass Gateway’s security controls
Restrictive mode (true):
  • ✅ Enhanced security: Only explicitly supported APIs are allowed
  • ✅ Controlled environment: Prevents access to potentially problematic APIs
  • ❌ Breaking changes: Applications using unsupported APIs will fail
APIs not supported by Gateway: Gateway categorizes unsupported APIs into two groups:
  1. Stability-blocked APIs (always blocked):
    • Stability (APIs not yet fully implemented or tested in Gateway):
      • DESCRIBE_TOPIC_PARTITIONS - New API for describing topic partitions
    • KIP-848 consumer group protocol (blocked unless both GATEWAY_FEATURE_FLAGS_TOPIC_ID_SUPPORT and GATEWAY_FEATURE_FLAGS_CONSUMER_GROUP_PROTOCOL are true, see the consumer group protocol):
      • CONSUMER_GROUP_HEARTBEAT
      • CONSUMER_GROUP_DESCRIBE
    • New Kafka 4 group protocols (Gateway has no rebuilder for these, so it blocks them for every client):
      • Share groups (KIP-932), also known as Kafka queues: SHARE_GROUP_HEARTBEAT, SHARE_GROUP_DESCRIBE, SHARE_FETCH, SHARE_ACKNOWLEDGE, INITIALIZE_SHARE_GROUP_STATE, READ_SHARE_GROUP_STATE, WRITE_SHARE_GROUP_STATE, DELETE_SHARE_GROUP_STATE, READ_SHARE_GROUP_STATE_SUMMARY, DESCRIBE_SHARE_GROUP_OFFSETS, ALTER_SHARE_GROUP_OFFSETS, DELETE_SHARE_GROUP_OFFSETS
      • Streams groups (KIP-1071), the new Kafka Streams rebalance protocol: STREAMS_GROUP_HEARTBEAT, STREAMS_GROUP_DESCRIBE
    • Admin operations (these operations should be performed directly on the underlying Kafka cluster rather than through Gateway):
      • ALTER_REPLICA_LOG_DIRS - Admin operation for altering replica log directories
      • ELECT_LEADERS - Admin operation for leader election
      • ALTER_PARTITION_REASSIGNMENTS - Admin operation for partition reassignments
      • LIST_PARTITION_REASSIGNMENTS - Admin operation for listing partition reassignments
      • ALTER_PARTITION - Admin operation for altering partitions
      • ALLOCATE_PRODUCER_IDS - Admin operation for producer ID allocation
      • CREATE_DELEGATION_TOKEN - Admin operation for creating delegation tokens
      • RENEW_DELEGATION_TOKEN - Admin operation for renewing delegation tokens
      • EXPIRE_DELEGATION_TOKEN - Admin operation for expiring delegation tokens
      • DESCRIBE_DELEGATION_TOKEN - Admin operation for describing delegation tokens
      • DESCRIBE_USER_SCRAM_CREDENTIALS - Admin operation for describing SCRAM credentials
      • ALTER_USER_SCRAM_CREDENTIALS - Admin operation for altering SCRAM credentials
      • DESCRIBE_CLIENT_QUOTAS - Admin operation for describing client quotas
      • ALTER_CLIENT_QUOTAS - Admin operation for altering client quotas
      • UPDATE_FEATURES - Admin operation for updating cluster features
      • DESCRIBE_QUORUM - Admin operation for describing the KRaft quorum
      • ADD_RAFT_VOTER - Admin operation for adding a KRaft controller voter
      • REMOVE_RAFT_VOTER - Admin operation for removing a KRaft controller voter
      • UNREGISTER_BROKER - Admin operation for unregistering a broker
      • LIST_CONFIG_RESOURCES - Admin operation for listing config resources, called LIST_CLIENT_METRICS_RESOURCES before Kafka 4.1
      • WRITE_TXN_MARKERS - Internal transaction marker management
  2. Unknown/Unsupported APIs (affected by this setting):
    • Internal/Admin APIs (not meant for client use):
      • LEADER_AND_ISR - Internal leader election and ISR management
      • STOP_REPLICA - Internal replica management
      • UPDATE_METADATA - Internal metadata updates
      • CONTROLLED_SHUTDOWN - Internal broker shutdown coordination
      • ENVELOPE - Internal request envelope handling
    • Future Kafka APIs not yet implemented in Gateway
    • Any other APIs that may bypass Gateway’s security controls or don’t work correctly with Gateway features
Security implications: When GATEWAY_FEATURE_FLAGS_BLOCK_UNSUPPORTED_APIS=false (permissive mode):
  • Unsupported APIs are passed through to Kafka without Gateway processing
  • Internal API access: Internal/Admin APIs meant for broker-to-broker communication may be accessible to clients
  • Topic mapping and other Gateway features may not work correctly
  • Potential for unauthorized access to restricted resources and information disclosure
The KIP-932 share-group and KIP-1071 streams-group APIs are not affected by this setting — Gateway always blocks them, in both modes. When GATEWAY_FEATURE_FLAGS_BLOCK_UNSUPPORTED_APIS=true (restrictive mode):
  • All unsupported APIs are blocked at the Gateway level
  • Prevents internal API access: Blocks internal/Admin APIs that should not be accessible to clients
  • Enhanced security through explicit allow-list approach
  • Applications must use only Gateway-supported APIs

Low-level network configuration

These variables should not be changed without consulting the Conduktor support team. They allow tuning and debugging uncommon network behavior.