fmorg-git commented on code in PR #9445:
URL: https://github.com/apache/ozone/pull/9445#discussion_r2615853358


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/S3SecurityUtil.java:
##########
@@ -124,4 +137,32 @@ private static void 
validateSTSTokenAwsSignature(STSTokenIdentifier stsTokenIden
     throw new OMException(
         "STS token validation failed for token: " + 
omRequest.getS3Authentication().getSessionToken(), INVALID_TOKEN);
   }
+
+  /**
+   * Returns true if the STS token's temporary access key ID is present in the 
revoked STS token table.
+   */
+  private static boolean isRevokedStsTempAccessKeyId(STSTokenIdentifier 
stsTokenIdentifier, OzoneManager ozoneManager) {
+    try {
+      final OMMetadataManager metadataManager = 
ozoneManager.getMetadataManager();
+      if (metadataManager == null) {
+        return false;
+      }
+
+      final Table<String, String> revokedStsTokenTable = 
metadataManager.getS3RevokedStsTokenTable();
+      if (revokedStsTokenTable == null) {
+        return false;
+      }
+
+      final String tempAccessKeyId = stsTokenIdentifier.getTempAccessKeyId();
+      if (tempAccessKeyId == null || tempAccessKeyId.isEmpty()) {
+        return false;

Review Comment:
   updated



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