jojochuang commented on code in PR #7394:
URL: https://github.com/apache/ozone/pull/7394#discussion_r1841317024


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/OzoneDelegationTokenSecretManager.java:
##########
@@ -436,6 +455,21 @@ private TokenInfo validateToken(OzoneTokenIdentifier 
identifier)
    */
   public boolean verifySignature(OzoneTokenIdentifier identifier,
       byte[] password) {
+    String secretKeyId = identifier.getSecretKeyId();
+    if (StringUtils.isNotEmpty(secretKeyId)) {

Review Comment:
   The PR overall looks good. The only thing I have an opinion about is six 
months from now, I won't remember why we have an if else statement here. How 
about making this an intuitive helper method, like 
   ```suggestion
       if (isSymmetricKey(identifier)) {
   ```
   
   or simply add a comment here.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to