SASL_PLAINTEXT only on a trusted private network. Use SASL_SSL to encrypt client traffic with TLS.
Enable SASL_PLAINTEXT
Server configuration
When you create the instance, enable SASL authentication and theSASL_PLAINTEXT listener. Create an ACL user and grant only the Topic and Consumer Group permissions required by the application.
Client configuration
Configure the Kafka client with the credentials created in AutoMQ. The following example uses SASL/PLAIN:Enable SASL_SSL
SASL_SSL combines SASL client authentication with TLS server authentication and transport encryption. Server certificate responsibilities depend on the DNS Zone mode selected when the instance is created.
Select the DNS Zone mode and enable
SASL_SSL when you create the instance. Existing instances cannot be changed from an unencrypted listener to SASL_SSL.Use an AutoMQ Managed Public DNS Zone
- When creating the instance, select Public DNS Zone and the AutoMQ managed mode.
- Enable the
SASL_SSLlistener and configure SASL authentication. - Do not upload user-managed server certificate files. AutoMQ provisions and renews the server certificate.
- Create an ACL user and grant the required resource permissions.
Use a customer-managed Private DNS Zone
For a customer-managed Private DNS Zone, you must provide a CA certificate, Server Certificate, and Server Private Key. Use certificates issued by your organization’s certificate authority when available. If you need to create and maintain a private CA, use the following procedure as a reference.1. Create a private CA
Createca.cnf. Replace the distinguished-name values before running the commands.
2. Issue the Server Certificate
Createserver.cnf. The Subject Alternative Name (SAN) must cover the AutoMQ private endpoint names associated with the Private DNS Zone. Use the exact DNS name or wildcard required by the instance endpoint. Do not rely on the Common Name for hostname verification.
3. Configure AutoMQ
- When creating the instance, select the customer-managed Private DNS Zone and enable the
SASL_SSLlistener. - Upload
ca.crtas the Server CA certificate,server.crtas the Server Certificate, andserver.keyas the Private Key. - Create an ACL user and grant only the Topic and Consumer Group permissions required by the application.
4. Configure a Kafka client
Importca.crt into the client truststore when the client runtime does not already trust the private CA:
Certificate expiration responsibility
- AutoMQ Managed Public DNS Zone: AutoMQ monitors and renews the server certificate. You do not rotate the server certificate.
- Customer-managed Private DNS Zone: You are responsible for monitoring and rotating the server CA and certificate before expiration. Use
kafka_stream_cert_expiry_timestamp_millisecondsandkafka_stream_cert_days_remainingto monitor the installed server certificate. For collection methods, see Monitoring and Alerting with Prometheus.