-
Notifications
You must be signed in to change notification settings - Fork 35
feat(config): add secret management for KMS config files #932
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
Open
p0wline
wants to merge
20
commits into
develop
Choose a base branch
from
feat/config-secret-management
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
58d692b
feat(config): add secret management for KMS config files
p0wline ee0f151
fix(clippy): fix restriction lint violations in secret_backends AWS m…
p0wline bba35e1
feat(config): add cosmian-kms:// secret URI backend
p0wline 98791ca
build: reset Nix vendor hashes (rebase onto develop)
p0wline 0e0689c
build: update all Nix vendor hashes after rebase on develop
p0wline 98b1084
build: regenerate Cargo.lock and reset Nix vendor hashes
p0wline e6f3126
update nix hashes
p0wline 86d32a7
update nix hashes
p0wline 65b1757
update nix hashes
p0wline 44dd245
add eviden favicon
p0wline b53dad2
Revert "add eviden favicon"
p0wline 1a1bbe9
Merge branch 'develop' into feat/config-secret-management
p0wline aeaeb65
Merge branch 'develop' into feat/config-secret-management
p0wline 1e5c227
fix: restore reusable_scripts submodule, fix nix.sh test_command, upd…
p0wline e4bf663
fix: nix hash
p0wline 7cd1c20
fix: nix hash
p0wline 70f9979
fix: replace actions/checkout@v6 with actions/checkout@v4 in all work…
Copilot 77f0b08
Revert "fix: replace actions/checkout@v6 with actions/checkout@v4 in …
p0wline f256f9d
remove branch changelog
p0wline bdec9d6
docs(config): add cosmian-kms:// URI scheme to secret backends docume…
p0wline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| set -x | ||
|
|
||
| # Secret backend integration test — AWS Systems Manager Parameter Store | ||
| # | ||
| # Creates a SecureString parameter in SSM, runs the Rust #[ignore] integration | ||
| # test, then deletes the parameter. | ||
| # | ||
| # Required env vars (from GitHub secrets): | ||
| # AWS_ACCESS_KEY_ID — IAM credentials with ssm:GetParameter / ssm:PutParameter | ||
| # AWS_SECRET_ACCESS_KEY — (or AWS_PROFILE / instance role) | ||
| # AWS_REGION — region where the parameter is created (e.g. eu-west-1) | ||
| # KMS_TEST_AWS_KMS_KEY_ID — (optional) KMS key ID for SecureString encryption; | ||
| # defaults to "alias/aws/ssm" | ||
| # | ||
| # Feature flag: secret-aws | ||
|
|
||
| SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) | ||
| source "${SCRIPT_DIR}/../common.sh" | ||
|
|
||
| init_build_env "$@" | ||
| setup_test_logging | ||
|
|
||
| require_cmd cargo "Cargo is required." | ||
| require_cmd aws "AWS CLI v2 is required." | ||
|
|
||
| echo "=========================================" | ||
| echo "Running secret backend test: AWS SSM Parameter Store" | ||
| echo "Variant: ${VARIANT_NAME}" | ||
| echo "=========================================" | ||
|
|
||
| AWS_REGION="${AWS_REGION:-eu-west-1}" | ||
| PARAM_NAME="/kms/ci/secret-backend-test" | ||
| SECRET_VALUE="ci-secret-value" | ||
| KMS_KEY="${KMS_TEST_AWS_KMS_KEY_ID:-alias/aws/ssm}" | ||
|
|
||
| cleanup() { | ||
| echo "Deleting SSM parameter ${PARAM_NAME}..." | ||
| aws ssm delete-parameter \ | ||
| --name "${PARAM_NAME}" \ | ||
| --region "${AWS_REGION}" 2>/dev/null || true | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| echo "Creating SSM SecureString parameter ${PARAM_NAME} in ${AWS_REGION}..." | ||
| aws ssm put-parameter \ | ||
| --name "${PARAM_NAME}" \ | ||
| --value "${SECRET_VALUE}" \ | ||
| --type SecureString \ | ||
| --key-id "${KMS_KEY}" \ | ||
| --region "${AWS_REGION}" \ | ||
| --overwrite | ||
|
|
||
| echo "Building cosmian_kms_server with secret-aws feature..." | ||
| cargo build -p cosmian_kms_server --features secret-aws | ||
|
|
||
| echo "Running AWS SSM integration test..." | ||
| AWS_REGION="${AWS_REGION}" \ | ||
| KMS_TEST_AWS_SSM_URI="aws-ssm://${AWS_REGION}${PARAM_NAME}" \ | ||
| KMS_TEST_AWS_SSM_EXPECTED="${SECRET_VALUE}" \ | ||
| cargo test -p cosmian_kms_server --features secret-aws --lib -- \ | ||
| --ignored --nocapture test_secret_aws_ssm | ||
|
|
||
| echo "AWS SSM secret backend test completed successfully." |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.