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

Extend kmstools to get Encryption Context from CLI #148

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

atanzu
Copy link
Contributor

@atanzu atanzu commented Dec 11, 2024

This commit modifies kmstool-instance to be able to pass Encryption context from command line arguments. Context shall be passed using the new --encryption-context KEY=VAL argument. User can specify multiple key-value pairs via an invocation like --encryption-context KEY1=VALUE1 --encryption-context KEY2=VALUE2.

Application kmstool-enclave has been modified to process Encryption context from the received command, and pass it further to the KMS API.

Issue #143

eugkoira
eugkoira previously approved these changes Dec 12, 2024
@@ -91,6 +91,7 @@ if (NOT WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 0unstable)

target_compile_definitions(${PROJECT_NAME} PUBLIC)
target_compile_options(${PROJECT_NAME} PRIVATE "-Wall" "-Werror" "-Wpedantic")
Copy link
Contributor

Choose a reason for hiding this comment

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

would be better to have it in a separate commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only for the SDK library, or for the library and the binaries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-pushed the branch, making this line a separate commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

meant for both, but was more a nit

@jplock
Copy link

jplock commented Dec 12, 2024

Can/will the same change be done for kmstool-enclave-cli?

@atanzu
Copy link
Contributor Author

atanzu commented Dec 12, 2024

Can/will the same change be done for kmstool-enclave-cli?

Can do, but probably in a separate PR. The reason is, Encryption contexts should also supported for the genkey command, which means, that aws_kms_generate_data_key_blocking API needs to be also extended to support encryption contexts.

This commit modifies `kmstool-instance` to be able to pass Encryption
context from command line arguments. Context shall be passed using the
new `--encryption-context KEY=VAL` argument. User can specify multiple
key-value pairs via an invocation like `--encryption-context KEY1=VALUE1
--encryption-context KEY2=VALUE2`.

Application `kmstool-enclave` has been modified to process Encryption
context from the received command, and pass it further to the KMS API.
This commit adds flags `-Wall`, `-Werror`, and `-Wpedantic` to the SDK
library target.
@atanzu atanzu force-pushed the feature/pass-encryption-context-as-cli-args branch from 43dfbf5 to f28070f Compare December 12, 2024 12:56
@atanzu atanzu merged commit 93844cc into main Dec 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants