Skip to content

Conversation

@aajisaka
Copy link
Member

@aajisaka aajisaka commented Aug 22, 2023

This PR is to support S3 Dual-layer Server Side Encryption (DSSE) for Iceberg tables.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingDSSEncryption.html

@nastra
Copy link
Contributor

nastra commented Aug 22, 2023

I think it would be better to split this into 2 PRs (one that only updates the AWS SDK version)

* If S3 encryption type is SSE-KMS, input is a KMS Key ID or ARN. In case this property is not
* set, default key "aws/s3" is used. If encryption type is SSE-C, input is a custom base-64
* AES256 symmetric key.
* If S3 encryption type is SSE-KMS or DSSE-KMS, input is a KMS Key ID or ARN. In case this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can rephrase this

Copy link
Member Author

@aajisaka aajisaka Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, what does that exactly mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what i meant here was the comment describe an if else structure which makes it a bit hard to follow was wondering if we can re-write this comment in such as way that it's easy for a user to understand / read it.

This is just a nit and not a blocking comment, as you are just adding a disjunstion to an already existing if branch. please feel free to ignore.

@aajisaka
Copy link
Member Author

Thank you @nastra and @singhpk234 for your review.

Let me create a separate PR to upgrade AWS SDK version.

@aajisaka
Copy link
Member Author

Opened #8379 to upgrade AWS SDK version

* <p>For more details:
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingDSSEncryption.html
*/
public static final String DSSE_TYPE_KMS = "kms.dsse";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming kms.dsse implies that DSSE will exist as a property namespace under KMS. Are there any other configurations which would actually go under this namespace? If not should we just call it dsse-kms?

Copy link
Member Author

@aajisaka aajisaka Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there isn't any other configuration go under this namespace. Changed to dsse-kms.

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @aajisaka ! Will wait for @singhpk234 @jackye1995 to take a look before merging

Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! Thanks @aajisaka !

@Fokko Fokko removed the python label Oct 2, 2023
@aajisaka
Copy link
Member Author

From my side, is there something do to make it forward?

@aajisaka aajisaka force-pushed the support-dsse-kms branch from 8e8cf40 to 2598066 Compare May 20, 2024 08:23
@aajisaka
Copy link
Member Author

Rebased for the latest main branch

Copy link
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@aajisaka
Copy link
Member Author

I think this patch is ready to merge:

  • Built Iceberg and ran a Spark job using Glue 4.0. I confirmed the Spark job successfully created an Iceberg table under the S3 prefix which is configured to reject any PutObject request without DSSE-KMS encryption.
  • Ran integration tests and TestS3FileIOIntegration passed.

cc: @jackye1995 @amogh-jahagirdar

@jackye1995
Copy link
Contributor

Was waiting for @nastra , but I agree this is ready to be merged, I will go ahead to do that, thanks for the contribution!

@jackye1995 jackye1995 merged commit 311dbbb into apache:main May 24, 2024
@aajisaka
Copy link
Member Author

Thanks!

@aajisaka aajisaka deleted the support-dsse-kms branch May 25, 2024 06:52
sasankpagolu pushed a commit to sasankpagolu/iceberg that referenced this pull request Oct 27, 2024
zachdisc pushed a commit to zachdisc/iceberg that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants