ahuang98 commented on code in PR #19655:
URL: https://github.com/apache/kafka/pull/19655#discussion_r2082371275


##########
clients/src/main/java/org/apache/kafka/common/requests/AlterUserScramCredentialsRequest.java:
##########
@@ -81,4 +81,23 @@ public AbstractResponse getErrorResponse(int throttleTimeMs, 
Throwable e) {
                         .collect(Collectors.toList());
         return new AlterUserScramCredentialsResponse(new 
AlterUserScramCredentialsResponseData().setResults(results));
     }
+
+    // Do not print salt or saltedPassword
+    @Override
+    public String toString() {

Review Comment:
   the JsonConverter class for AlterScram will convert the salt and 
saltPassword to binary when creating the ScramRequest from the JsonNode value. 
see below:
   
   ```
      public static class ScramCredentialUpsertionJsonConverter {
           public static ScramCredentialUpsertion read(JsonNode _node, short 
_version) {
               ScramCredentialUpsertion _object = new 
ScramCredentialUpsertion();
               ...
               JsonNode _saltNode = _node.get("salt");
               if (_saltNode == null) {
                   throw new RuntimeException("ScramCredentialUpsertion: unable 
to locate field 'salt', which is mandatory in version " + _version);
               } else {
                   _object.salt = MessageUtil.jsonNodeToBinary(_saltNode, 
"ScramCredentialUpsertion");
               }
   ```
   
   so having "REDACTED" show up for the value isn't really supported with just 
the JsonConverter methods. for now I've just overwritten the salt and 
saltPassword with an empty string to remove the values entirely. 



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to