You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "fmorg-git (via GitHub)" <gi...@apache.org> on 2026/03/25 02:39:04 UTC
[PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
fmorg-git opened a new pull request, #9971:
URL: https://github.com/apache/ozone/pull/9971
Please describe your PR in detail:
* Currently, there are no acl checks in the S3 ListMultipartUploads implementation. This affects STS because, for example, if a token is scoped to have only PutObject access, the token can also call ListMultipartUploads because there are no acl checks. This ticket adds the acl checks for STS requests because it is unclear how many users would be affected if acl checks were added to the base S3 apis.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14894
## How was this patch tested?
unit tests, smoke tests
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on PR #9971:
URL: https://github.com/apache/ozone/pull/9971#issuecomment-4256592805
commenting to remove stale label
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3163301535
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -882,6 +882,14 @@ public static STSTokenIdentifier getStsTokenIdentifier() {
return STS_TOKEN.get();
}
+ /**
+ * Returns true if the current RPC handler thread is processing an S3 request
+ * authenticated via STS temporary credentials.
+ */
+ public static boolean isStsS3Request() {
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi merged PR #9971:
URL: https://github.com/apache/ozone/pull/9971
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3163309582
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4057,15 +4065,24 @@ public OmMultipartUploadList listMultipartUploads(String volumeName,
String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination)
throws IOException {
- ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final String realVolumeName = bucket.realVolume();
+ final String realBucketName = bucket.realBucket();
- Map<String, String> auditMap = bucket.audit();
+ final Map<String, String> auditMap = bucket.audit();
auditMap.put(OzoneConsts.PREFIX, prefix);
- metrics.incNumListMultipartUploads();
try {
- OmMultipartUploadList omMultipartUploadList = keyManager.listMultipartUploads(bucket.realVolume(),
- bucket.realBucket(), prefix, keyMarker, uploadIdMarker, maxUploads, withPagination);
+ if (getAclsEnabled() && isStsS3Request()) {
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3158849037
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4057,15 +4065,24 @@ public OmMultipartUploadList listMultipartUploads(String volumeName,
String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination)
throws IOException {
- ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final String realVolumeName = bucket.realVolume();
+ final String realBucketName = bucket.realBucket();
- Map<String, String> auditMap = bucket.audit();
+ final Map<String, String> auditMap = bucket.audit();
auditMap.put(OzoneConsts.PREFIX, prefix);
- metrics.incNumListMultipartUploads();
try {
- OmMultipartUploadList omMultipartUploadList = keyManager.listMultipartUploads(bucket.realVolume(),
- bucket.realBucket(), prefix, keyMarker, uploadIdMarker, maxUploads, withPagination);
+ if (getAclsEnabled() && isStsS3Request()) {
Review Comment:
@fmorg-git , since it's a general fix, could you resubmit for master branch, instead of sts branch?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on PR #9971:
URL: https://github.com/apache/ozone/pull/9971#issuecomment-4389714097
Thanks for reviewing and merging.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on PR #9971:
URL: https://github.com/apache/ozone/pull/9971#issuecomment-4292733481
hi @ChenSammi - this PR has been rebased and is ready for review. Thanks!
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9971:
URL: https://github.com/apache/ozone/pull/9971#issuecomment-4256520505
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3156211525
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4057,15 +4065,24 @@ public OmMultipartUploadList listMultipartUploads(String volumeName,
String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination)
throws IOException {
- ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final String realVolumeName = bucket.realVolume();
+ final String realBucketName = bucket.realBucket();
- Map<String, String> auditMap = bucket.audit();
+ final Map<String, String> auditMap = bucket.audit();
auditMap.put(OzoneConsts.PREFIX, prefix);
- metrics.incNumListMultipartUploads();
try {
- OmMultipartUploadList omMultipartUploadList = keyManager.listMultipartUploads(bucket.realVolume(),
- bucket.realBucket(), prefix, keyMarker, uploadIdMarker, maxUploads, withPagination);
+ if (getAclsEnabled() && isStsS3Request()) {
Review Comment:
ideally yes, but since it was not there initially, I don't know who or how many people it would break if it were added for normal s3 request. Should that be a separate Jira to investigate that so it doesn't seem like STS broke "normal" s3 functionality?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "fmorg-git (via GitHub)" <gi...@apache.org>.
fmorg-git commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3156211525
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4057,15 +4065,24 @@ public OmMultipartUploadList listMultipartUploads(String volumeName,
String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination)
throws IOException {
- ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final String realVolumeName = bucket.realVolume();
+ final String realBucketName = bucket.realBucket();
- Map<String, String> auditMap = bucket.audit();
+ final Map<String, String> auditMap = bucket.audit();
auditMap.put(OzoneConsts.PREFIX, prefix);
- metrics.incNumListMultipartUploads();
try {
- OmMultipartUploadList omMultipartUploadList = keyManager.listMultipartUploads(bucket.realVolume(),
- bucket.realBucket(), prefix, keyMarker, uploadIdMarker, maxUploads, withPagination);
+ if (getAclsEnabled() && isStsS3Request()) {
Review Comment:
yes, discussed with others and they agreed (initially I was concerned it would break existing users, but this check needs to be there in any case)
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3158845435
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -882,6 +882,14 @@ public static STSTokenIdentifier getStsTokenIdentifier() {
return STS_TOKEN.get();
}
+ /**
+ * Returns true if the current RPC handler thread is processing an S3 request
+ * authenticated via STS temporary credentials.
+ */
+ public static boolean isStsS3Request() {
Review Comment:
This is not used, can be removed.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14894. [STS] Fix Latent S3 API Issue having No Acl Check for ListMultipartUploads [ozone]
Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #9971:
URL: https://github.com/apache/ozone/pull/9971#discussion_r3152450274
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4057,15 +4065,24 @@ public OmMultipartUploadList listMultipartUploads(String volumeName,
String prefix, String keyMarker, String uploadIdMarker, int maxUploads, boolean withPagination)
throws IOException {
- ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final ResolvedBucket bucket = resolveBucketLink(Pair.of(volumeName, bucketName));
+ final String realVolumeName = bucket.realVolume();
+ final String realBucketName = bucket.realBucket();
- Map<String, String> auditMap = bucket.audit();
+ final Map<String, String> auditMap = bucket.audit();
auditMap.put(OzoneConsts.PREFIX, prefix);
- metrics.incNumListMultipartUploads();
try {
- OmMultipartUploadList omMultipartUploadList = keyManager.listMultipartUploads(bucket.realVolume(),
- bucket.realBucket(), prefix, keyMarker, uploadIdMarker, maxUploads, withPagination);
+ if (getAclsEnabled() && isStsS3Request()) {
Review Comment:
Is this ACL check is also required for normal s3 request?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org