[
https://issues.apache.org/jira/browse/HADOOP-17822?focusedWorklogId=632234&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-632234
]
ASF GitHub Bot logged work on HADOOP-17822:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 02/Aug/21 09:25
Start Date: 02/Aug/21 09:25
Worklog Time Spent: 10m
Work Description: steveloughran commented on a change in pull request
#3249:
URL: https://github.com/apache/hadoop/pull/3249#discussion_r680815210
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ACannedACLs.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs.s3a;
+
+import java.util.List;
+
+import com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.model.AccessControlList;
+import com.amazonaws.services.s3.model.Grant;
+import com.amazonaws.services.s3.model.GroupGrantee;
+import com.amazonaws.services.s3.model.Permission;
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.contract.ContractTestUtils;
+import org.apache.hadoop.fs.s3a.audit.S3AAuditConstants;
+import org.apache.hadoop.fs.s3a.impl.StoreContext;
+
+import static org.apache.hadoop.fs.s3a.Constants.CANNED_ACL;
+import static
org.apache.hadoop.fs.s3a.S3ATestUtils.removeBaseAndBucketOverrides;
+
+/**
+ * Tests of ACL handling in the FS.
+ * If you enable logging, the grantee list adds
+ * Grant [grantee=GroupGrantee
[http://acs.amazonaws.com/groups/s3/LogDelivery], permission=WRITE]
+ */
+public class ITestS3ACannedACLs extends AbstractS3ATestBase {
+
+ private static final Logger LOG =
+ LoggerFactory.getLogger(ITestS3ACannedACLs.class);
+
+ @Override
+ protected Configuration createConfiguration() {
+ Configuration conf = super.createConfiguration();
+ removeBaseAndBucketOverrides(conf,
+ CANNED_ACL);
+
+ conf.set(CANNED_ACL, LOG_DELIVERY_WRITE);
+ // needed because of direct calls made
+ conf.setBoolean(S3AAuditConstants.REJECT_OUT_OF_SPAN_OPERATIONS, false);
+ return conf;
+ }
+
+ @Test
+ public void testCreatedObjectsHaveACLs() throws Throwable {
+ S3AFileSystem fs = getFileSystem();
+ Path dir = methodPath();
+ fs.mkdirs(dir);
+ assertObjectHasLoggingGrant(dir, false);
+ Path path = new Path(dir, "1");
+ ContractTestUtils.touch(fs, path);
+ assertObjectHasLoggingGrant(path, true);
+ Path path2 = new Path(dir, "2");
+ fs.rename(path, path2);
+ assertObjectHasLoggingGrant(path2, true);
+ }
+
+ /**
+ * Assert that a given object granded the AWS logging service
Review comment:
thx. Interesting spelling didn't flag that ... will need to check my
settings
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 632234)
Time Spent: 2h (was: 1h 50m)
> fs.s3a.acl.default not working after S3A Audit feature added
> ------------------------------------------------------------
>
> Key: HADOOP-17822
> URL: https://issues.apache.org/jira/browse/HADOOP-17822
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.3.2
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h
> Remaining Estimate: 0h
>
> After HADOOP-17511 the fs.s3a.acl.default propperty isn't being passed
> through to S3 PUT/COPY requests.
> The new RequestFactory is being given the acl values from the S3A FS
> instance, but the factory is being created before the acl settings are loaded
> from the configuration.
> Fix, and ideally, test (if the getXAttr lets us see this now)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]