
KAFKA_ are mapped to configuration properties for connecting Gateway to the Kafka cluster.
As Gateway is based on the Java-based Kafka-clients, it supports all configuration properties that Java-clients do.
Kafka configuration properties are mapped to Gateway environment variables as follows:
- Add a
KAFKA_prefix - Replace each dot,
., with an underscore,_ - Convert to uppercase
bootstrap.servers is set by the KAFKA_BOOTSTRAP_SERVERS environment variable.
Supported protocols
You can use all the Kafka security protocols to authenticate Gateway to the Kafka cluster;PLAINTEXT, SASL_PLAINTEXT, SASL_SSL and SSL.
These can be used with all SASL mechanisms supported by Apache Kafka: PLAIN, SCRAM-SHA, OAuthBearer, Kerberos etc. In addition, we support IAM authentication for AWS MSK clusters.
In the following examples, we provide blocks of environment variables which can be provided to Gateway, e.g. in a docker-compose file, or a helm deployment.
Information which should be customized is enclosed by < and >.
PLAINTEXT
Kafka cluster without authentication or encryption in transit,PLAINTEXT.
In this case you just need the bootstrap servers:
SSL
mTLS
Kafka cluster with mTLS client authentication.SASL_PLAINTEXT
Kafka cluster with SASL_PLAINTEXT security protocol but no encryption in transit, supporting the following SASL_MECHANISMs.SASL PLAIN
SASL SCRAM
OAuthbearer
SASL_SSL
Kafka cluster that uses SASL for authentication and TLS (formerly SSL) for encryption in transit.PLAIN
Kafka cluster with SASL_SSL and PLAIN SASL mechanism.Confluent Cloud with API key/secret
This example can be seen as a special case of the above.GATEWAY_SECURITY_PROTOCOL to DELEGATED_SASL_PLAINTEXT. Clients will then be able to authenticate using their own API keys/secrets.
SASL SCRAM
SASL GSSAPI (Kerberos)
OAuthbearer
AWS MSK cluster with IAM
Service account and ACL requirements
Depending on the client to Gateway authentication method you choose, the service account used to connect Gateway might need different ACLs to operate properly.Delegated authentication
In delegated authentication, the credentials provided to establish the connection between the client and Gateway are the same used from Gateway to the backing Kafka. As a result, the client will inherit the ACLs of the service account configured on the backing cluster. On top of that, Gateway needs its own service account with the following ACLs to operate correctly:Readon internal topics and they should exist- Describe consumer group for internal topic
- Describe on cluster
- Describe topics for alias topics creation
Non-delegated
In non-delegated authentication (Local, Oauth or mTLS), the connection is using Gateway’s service account to connect to the backing Kafka. This service account must have all the necessary ACLs to perform not only these Gateway operations:Readon internal topics and they should exist- Describe consumer group for internal topic
- Describe on cluster
- Describe topics for alias topics creation but also all the permissions necessary to serve all Gateway users.
GATEWAY_ACL_STORE_ENABLED=true and then you can use AdminClient to maintain ACLs with any service account declared in GATEWAY_ADMIN_API_USERS.