Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe vended S3 configuration extracts the SSE key when the SSE type is ChangesS3 SSE-KMS configuration
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The advertised warehouse KMS key reaches the validation writes, so no material merge risk is evident. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The validation write now names the warehouse’s advertised encryption key without expanding storage permissions or key access. The reviewed path introduces no material security risk; live AWS behavior was not tested. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the S3 key, Comment |
|
anbu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
lakekeeper_io_from_vended_table_config reads s3.sse.type / s3.sse.key from the vended table config and sets aws_kms_key_arn on the S3Settings it builds, so the credential validation write carries SSE-KMS with the warehouse key -- the one key the downscoped session policy grants. On a bucket whose default encryption key differs from the warehouse key, the write was encrypted with the bucket default and refused by that session policy (kms:GenerateDataKey), so a warehouse with sts-enabled and aws-kms-key-arn could not be created or updated there. Unit test: KMS advertised -> the client names that key; nothing advertised or another SSE type -> none. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1d11fc2 to
4213046
Compare
✅ PR Title Formatted CorrectlyThe title of this PR match the correct format. Thank you! |
…ey (#2036) Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: Christian <[email protected]> (cherry picked from commit 079bf2b)
What
lakekeeper_io_from_vended_table_config— the clientvalidate_vended_credentials_accesswrites its test object with — now readss3.sse.type/s3.sse.keyfrom the vended table config and setsaws_kms_key_arnon theS3Settingsit builds, so that write carries SSE-KMS with the warehouse key, the way a client honouring the vended config does.Why
generate_table_configadvertisess3.sse.type = kmsands3.sse.key = <aws-kms-key-arn>whenever the warehouse profile names a KMS key, and the downscoped session policy it vends (get_sts_policy_string) grantskms:Decryptandkms:GenerateDataKeyon that one key only. The validation client read region, endpoint, path-style access and the three credential fields and nothing else, so its test write carried no SSE header, S3 encrypted it with the bucket's default key, and on any bucket whose default key is not the warehouse key the write was refused by the very session policy the server had just vended:That makes
sts-enabled: true+aws-kms-key-arnunusable at create and at every storage-profile update on a bucket keyed by a different CMK (a per-warehouse or per-tenant CMK on a bucket with its own default encryption is the ordinary shape in AWS), while the same warehouse works when the profile's key equals the bucket default — which is why it does not show on MinIO or on a single-key bucket. Measured on Lakekeeper 0.13.4 withcredential-type: aws-system-identity,assume-role-arnand an external id; the path is unchanged onmain.Change
crates/lakekeeper/src/service/storage/s3.rs:lakekeeper_io_from_vended_table_configmapss3.sse.type == "kms"+s3.sse.keytoS3Settings::aws_kms_key_arn; other SSE types and an absent advertisement set no key (S3 applies the bucket default, as before for those cases). Doc comment says what the client does with it.test_vended_io_names_the_advertised_sse_kms_key: KMS advertised → the client names that key; nothing advertised → none; another SSE type → none. No network: it inspectsS3Storage::aws_kms_key_arn().S3Storagealready setsServerSideEncryption::AwsKmsandssekms_key_idonput_objectandcreate_multipart_uploadfrom that field, so no change inlakekeeper-io.Release notes
sts-enabledandaws-kms-key-arncan now be created and updated on buckets whose default encryption key differs from the warehouse key: the vended-credential validation write names the warehouse's KMS key, matching the downscoped session policy it is vended with.Summary by CodeRabbit