Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Polaris can't use S3 when KMS is enabled #480

Open
1 task done
jbonofre opened this issue Nov 25, 2024 · 1 comment
Open
1 task done

[BUG] Polaris can't use S3 when KMS is enabled #480

jbonofre opened this issue Nov 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jbonofre
Copy link
Member

Is this a possible security vulnerability?

  • This is NOT a possible security vulnerability

Describe the bug

When using Polaris with S3 (without KMS), everything is working fine (I can create Iceberg table from spark-sql on Polaris).

However, when I enable S3 KMS, I get:

ServerError: S3Exception: User: arn:aws:sts::601864557682:assumed-role/cep-analytics-platform-role-dev-polaris-catalog/snowflake is not authorized to perform: kms:GenerateDataKey on resource: arn:aws:kms:eu-west-1:601864557682:key/401edca7-d545-4907-9c9f-2695305beb5e because no session policy

allows the kms:GenerateDataKey action (Service: S3, Status Code: 403, Request ID: C0MA61C4VYNS88CP, Extended Request ID: ZboVDdn8eh4YBIjMUbG8X6fDT4oq6OFFqDcq/dKbVsrNDGW3IIhojELznwkyWhMDmSxO376I5o0=)

It seems that we have a missing security configuration to use with KMS.

To Reproduce

Just use S3 KMS with Polaris.

Actual Behavior

It works fine without KMW, but fails with S3 KMS enabled:

ServerError: S3Exception: User: arn:aws:sts::601864557682:assumed-role/cep-analytics-platform-role-dev-polaris-catalog/snowflake is not authorized to perform: kms:GenerateDataKey on resource: arn:aws:kms:eu-west-1:601864557682:key/401edca7-d545-4907-9c9f-2695305beb5e because no session policy

allows the kms:GenerateDataKey action (Service: S3, Status Code: 403, Request ID: C0MA61C4VYNS88CP, Extended Request ID: ZboVDdn8eh4YBIjMUbG8X6fDT4oq6OFFqDcq/dKbVsrNDGW3IIhojELznwkyWhMDmSxO376I5o0=)

Expected Behavior

No response

Additional context

No response

System information

No response

@jbonofre jbonofre added the bug Something isn't working label Nov 25, 2024
@MonkeyCanCode
Copy link
Contributor

In my setup, I am using S3 with KMS. To get it working, the IAM role needed to include additional IAM policy (for my setup, i have kms:GenerateDataKey, kms:Decrypt, and kms:DescribeKey added to the IAM role used by Polaris).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants