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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3RevokeSTSTokenRequest.java:
##########
@@ -63,16 +69,14 @@ public OMRequest preExecute(OzoneManager ozoneManager) 
throws IOException {
     final OMRequest omRequest = super.preExecute(ozoneManager);
     final OzoneManagerProtocolProtos.RevokeSTSTokenRequest revokeReq =
         omRequest.getRevokeSTSTokenRequest();
+    validateRevokeRequestFields(revokeReq);
 
-    // Get the original (long-lived) access key id from the session token
-    // and enforce the same permission model that is used for S3 secret
+    // Use the original (long-lived) access key ID from the request and enforce
+    // the same permission model that is used for S3 secret
     // operations (get/set/revoke). Only the owner of the original access
     // key (i.e. the creator of the STS token) or an S3 / tenant admin is 
allowed
     // to revoke its temporary STS credentials.
-    final String sessionToken = revokeReq.getSessionToken();
-    final STSTokenIdentifier stsTokenIdentifier = 
STSSecurityUtil.constructValidateAndDecryptSTSToken(
-        sessionToken, ozoneManager.getSecretKeyClient(), CLOCK);
-    final String originalAccessKeyId = 
stsTokenIdentifier.getOriginalAccessKeyId();
+    final String originalAccessKeyId = revokeReq.getOriginalAccessKeyId();

Review Comment:
   this is no longer applicable after redesign.  Only `originalAccessKeyId` is 
there and there is a check in `S3RevokeSTSTokenRequest` that the 
`originalAccessKeyId` is valid.



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