sodonnel commented on code in PR #9372:
URL: https://github.com/apache/ozone/pull/9372#discussion_r2585634027
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/OMClientRequest.java:
##########
@@ -168,11 +169,39 @@ public OzoneManagerProtocolProtos.UserInfo getUserInfo()
throws IOException {
OzoneManagerProtocolProtos.UserInfo.Builder userInfo =
OzoneManagerProtocolProtos.UserInfo.newBuilder();
- // If S3 Authentication is set, determine user based on access ID.
+ // If S3 Authentication is set, determine user based on STS token first,
+ // falling back to accessId if session token not present.
if (omRequest.hasS3Authentication()) {
- String principal = OzoneAclUtils.accessIdToUserPrincipal(
- omRequest.getS3Authentication().getAccessId());
- userInfo.setUserName(principal);
+ final String accessKeyId = omRequest.getS3Authentication().getAccessId();
+ if (accessKeyId.startsWith("ASIA") &&
!omRequest.getS3Authentication().hasSessionToken()) {
Review Comment:
Is ASIA defined somewhere else too? Would it make sense for it to be a
centralized constant somewhere?
--
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]