showuon commented on code in PR #15280:
URL: https://github.com/apache/kafka/pull/15280#discussion_r1469537246


##########
clients/src/main/java/org/apache/kafka/common/security/scram/internals/ScramSaslServer.java:
##########
@@ -127,10 +127,10 @@ public byte[] evaluateResponse(byte[] response) throws 
SaslException, SaslAuthen
                         }
                         this.scramCredential = 
credentialCallback.scramCredential();
                         if (scramCredential == null)
-                            throw new SaslException("Authentication failed: 
Invalid user credentials");
+                            throw new 
SaslException(String.format("Authentication failed: Invalid user {%s} 
credentials", username));
                         String authorizationIdFromClient = 
clientFirstMessage.authorizationId();
                         if (!authorizationIdFromClient.isEmpty() && 
!authorizationIdFromClient.equals(username))
-                            throw new 
SaslAuthenticationException("Authentication failed: Client requested an 
authorization id that is different from username");
+                            throw new 
SaslAuthenticationException(String.format("Authentication failed: Client 
requested an authorization id {%s} that is different from username {%s}", 
authorizationIdFromClient, username));

Review Comment:
   The username is got in L111. Adding it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to