fmorg-git commented on code in PR #11134:
URL: https://github.com/apache/ozone/pull/11134#discussion_r3920591422
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3AssumeRoleRequest.java:
##########
@@ -158,33 +207,15 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
Exception exception = null;
OMClientResponse omClientResponse;
try {
- // Validate duration
- S3STSUtils.validateDuration(durationSeconds);
-
- // Validate role session name
- S3STSUtils.validateRoleSessionName(roleSessionName);
-
- // Validate role ARN and extract role
- final String targetRoleName =
AwsRoleArnValidator.validateAndExtractRoleNameFromArn(roleArn);
-
- // Note: The IamSessionPolicyResolver validates the awsIamPolicy length
internally
-
- if (!omRequest.hasS3Authentication()) {
+ if (Strings.isNullOrEmpty(tempAccessKeyId) ||
Strings.isNullOrEmpty(secretAccessKey) ||
+ Strings.isNullOrEmpty(roleId) || Strings.isNullOrEmpty(sessionToken)
|| expirationEpochSeconds <= 0) {
throw new OMException(
- "S3AssumeRoleRequest does not have S3 authentication",
OMException.ResultCodes.INVALID_REQUEST);
+ "UpdateAssumeRoleRequest is missing leader-generated AssumeRole
fields",
+ OMException.ResultCodes.INVALID_REQUEST);
Review Comment:
this isn't a concern as STS is not released yet
--
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]