Two authentication modes
Gateway offers two distinct modes for managing client authentication and authorization: Gateway-managed mode- Gateway handles all authentication and authorization
- and defined in Gateway
- Supports both local and external service accounts
- Local service accounts authenticate with
PLAIN(token) orSCRAM-SHA-512/SCRAM-SHA-256credentials managed by Gateway - Full control over client access without touching Kafka configuration
- Enables and other Gateway-specific features
- With the default
GATEWAY_UPSTREAM_CONNECTION_POOL_TYPE=NONE, each client connection gets its own upstream connection to Kafka - Enables connection pooling (
GATEWAY_UPSTREAM_CONNECTION_POOL_TYPE=ROUND_ROBIN) to multiplex client connections onto a pool of connections per broker. This cuts connections to Kafka at the cost of latency. The added latency is highest with consumers, because fetch requests can wait for data and hold the shared connection meanwhile. Use it only when few consumers are active
- Authentication and authorization delegated to the backing Kafka cluster
- Existing Kafka service accounts and ACLs continue to work
- Useful for gradual migration to Gateway
- External service accounts can still be mapped for friendly names in Gateway
- Virtual resources (Virtual Clusters, alias topics) not available
- Connection pooling not available (each client authenticates on its own connection)
Client properties in Gateway-managed mode
In Gateway-managed mode, Gateway connects to Kafka with its own credentials, set in theKAFKA_* environment variables. Every other client property reaches Kafka as the client set it, for example client.id, session timeouts and the fetch.* settings, unless an Interceptor such as the fetch policy overrides it.
Key decisions
When configuring Gateway authentication, you need to decide:- Where to authenticate: at Gateway or delegate to Kafka
- Authentication method: SASL (PLAIN, SCRAM, OAUTHBEARER), mTLS, or anonymous
- Service account type: local (Gateway-managed) or external (identity provider)
- Authorization location: Gateway ACLs or Kafka ACLs
Benefits
- Gradual adoption: start with Kafka-managed mode and migrate to Gateway-managed
- Unified access control: manage authentication across multiple clusters from one place
- Flexible identity integration: work with existing identity providers or use Gateway’s built-in authentication
- Enhanced security: add Gateway policies and without changing Kafka security