conduktor.io ↗

Kafka Exception SaslAuthenticationException

org.apache.kafka.common.errors.SaslAuthenticationException
Non-retriable Security

This exception indicates that SASL authentication has failed. The error message in the exception indicates the actual cause of failure. SASL authentication failures typically indicate invalid credentials, but could also include other failures specific to the SASL mechanism used for authentication. Note:If evaluateResponse(byte[]) throws this exception during authentication, the message from the exception will be sent to clients in the SaslAuthenticate response. Custom SaslServer implementations may throw this exception in order to provide custom error messages to clients, but should take care not to include any security-critical information in the message that should not be leaked to unauthenticated clients.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.common.errors.SaslAuthenticationException: SASL Authentication failed.

Diagnostic Commands

# Look for authentication errors in logs grep -i 'AuthenticationException\|SaslAuthentication\|SASL' /path/to/kafka/logs/server.log | tail -20 # Check user credential configuration kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type users --entity-name <user>

Related

Protocol error: SASL_AUTHENTICATION_FAILED (code 58)

Related Security exceptions: AuthenticationException · AuthorizationException · AuthorizerNotReadyException · ClusterAuthorizationException · GroupAuthorizationException · IllegalSaslStateException · SslAuthenticationException · TopicAuthorizationException

Hitting SaslAuthenticationException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.