fivetran-ashokborra commented on code in PR #1424:
URL: https://github.com/apache/polaris/pull/1424#discussion_r2054398964
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/aws/AwsCredentialsStorageIntegration.java:
##########
@@ -185,7 +184,14 @@ private IamPolicy policyString(
bucketGetLocationStatementBuilder
.values()
.forEach(statementBuilder ->
policyBuilder.addStatement(statementBuilder.build()));
- return
policyBuilder.addStatement(allowGetObjectStatementBuilder.build()).build();
+
+ policyBuilder.addStatement(allowGetObjectStatementBuilder.build());
+
+ policyBuilder.addStatement(
+
IamStatement.builder().effect(IamEffect.ALLOW).addAction("kms:GenerateDataKey").addAction("kms:Decrypt").addAction(
+ "kms:DescribeKey").addResource("*").build());
Review Comment:
I have thought of it. While it's possible to control at the policy level
like this, making it configurable would just have the right permissions. I
don't have a strong opinion on that.
```
{
"Sid": "DenyObjectsThatAreNotSSEKMS",
"Effect": "Deny",
"Action": [
"s3:PutObject"
],
"Resource": "{bucket}/*",
"Condition": {
"StringNotLike": {
"s3:x-amz-server-side-encryption-aws-kms-key-id":
"{key-id}"
}
}
```
--
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]