You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/09/24 07:24:07 UTC
Re: [PR] Support cross-account KMS decryption for S3 [polaris]
Copilot commented on code in PR #5598:
URL: https://github.com/apache/polaris/pull/5598#discussion_r4090980321
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/aws/AwsCredentialsStorageIntegration.java:
##########
@@ -521,8 +525,14 @@ private static void addKmsKeyResources(
}
private static void addAllKeysResource(
- String region, String accountId, IamStatement.Builder allowKms) {
- String allKeysArn = arnKeyAll(region, accountId);
+ String region,
+ String accountId,
+ boolean allowCrossAccountKmsKeys,
+ IamStatement.Builder allowKms) {
+ String allKeysArn =
+ allowCrossAccountKmsKeys
+ ? String.format("arn:aws:kms:%s:*:key/*", region)
Review Comment:
The new cross-account branch hardcodes the commercial `aws` partition, but this integration supports `aws-cn` and `aws-us-gov` (and derives the partition from the role ARN). With the flag enabled in those partitions, the session policy contains an `arn:aws` KMS resource that cannot match keys in the configured partition, so decryption still fails. Please pass the storage partition into this helper and format `arn:<partition>:kms:<region>:*:key/*`, with coverage for the supported partitions.
--
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@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org