Repository navigation
fix(knowledge-base): grant scoped decrypt for S3 KMS keys - #2531
Open
proton0210 wants to merge 1 commit into
Open
proton0210 wants to merge 1 commit into
proton0210 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
S3 knowledge-base sources can now specify
kmsKeyArnin agentcore.json. The generated stack grants the KB service rolekms:Decrypton that key, restricted to S3 in the key's region. Sources without a key do not receive KMS permissions.The generated CDK entry point validates and retains the key separately before passing the project to the published L3 schema, which does not yet accept this field. This works with the current package pin. Existing projects need the updated generated CDK files; the documentation calls out that update and includes a configuration example.
Related Issue
Fixes #2440
Documentation PR
Documentation is included in this PR.
Type of Change
Testing
npm run test:unitandnpm run test:integ.npm run typecheck.npm run lint.The full integration run passes 355 tests, with one skipped. The full unit run passes 6,359 tests; one unrelated CreateScreen Escape timing test fails in the parallel run and passes when rerun alone. Type checking and lint report no errors.
The generated CDK project builds and passes all 17 tests, including policy synthesis for AWS, China, and GovCloud, malformed key rejection, connector validation, and unencrypted sources. The focused schema and asset suites pass all 181 tests.
Against the previous implementation, three schema cases and four IAM assertions fail. The original generated entry point rejects kmsKeyArn; the updated entry point synthesizes a stack with the scoped decrypt statement.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.