Skip to content

Conversation

@bruce-szalwinski-he
Copy link
Contributor

Adds AWS Secrets Manager and Parameter Store publish support. Works same as vault in that it uploads unencrypted results as plain text JSON.

fixes #1942, #1105

bruce-szalwinski-he and others added 8 commits September 19, 2025 22:12
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
…ive destination validation

- Add comprehensive destination conflict validation tests for all 5 destinations
  (S3, GCS, Vault, AWS Secrets Manager, AWS Parameter Store) in config_test.go
- Add keyvalue-secrets.yaml example showing optimal format for AWS console key/value editor
- Add aws-secrets-manager-keyvalue-format.md documentation explaining JSON vs key/value formats
- Add destination-test-coverage.md documenting complete test matrix (10 conflict scenarios)

This ensures proper validation of destination conflicts and provides clear guidance
for using AWS Secrets Manager key/value format to enable the AWS console editor.

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
…tinations

- Add test to verify Upload method returns NotImplementedError
- Replace Parameter Store Upload implementation with NotImplementedError
- Ensure consistency with Vault and Secrets Manager destinations
- The publish command uses UploadUnencrypted for all structured destinations

This removes unreachable code and aligns with the current design where:
- S3/GCS: Upload encrypted files (Upload method)
- Vault/Secrets Manager/Parameter Store: Upload decrypted JSON (UploadUnencrypted method)

Test-driven fix: wrote failing test, then implemented the fix.

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
…avior

- Update TestAWSParameterStoreDestination_EncryptedFile_Integration to test NotImplementedError
- Remove test of legacy Upload functionality that's not used by publish command
- Verify Upload method now returns NotImplementedError consistently with other destinations
- All integration tests pass with real AWS credentials

The publish command uses UploadUnencrypted for Parameter Store, so Upload method
should return NotImplementedError like Vault and Secrets Manager destinations.

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
@bruce-szalwinski-he bruce-szalwinski-he force-pushed the feature/aws-publishing-support branch from 094d6c9 to 292c9b0 Compare September 20, 2025 03:14
@@ -0,0 +1,123 @@
package config
Copy link
Contributor Author

Choose a reason for hiding this comment

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

config_test was getting a little long, so added aws config tests as separate file.

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
@felixfontein felixfontein requested a review from a team September 20, 2025 12:59
parameterType = "SecureString"
}

// Ensure parameter path starts with /
Copy link
Contributor Author

@bruce-szalwinski-he bruce-szalwinski-he Sep 20, 2025

Choose a reason for hiding this comment

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

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
@bruce-szalwinski-he bruce-szalwinski-he force-pushed the feature/aws-publishing-support branch from ca8cf9f to 9427fab Compare September 22, 2025 14:26
@bruce-szalwinski-he
Copy link
Contributor Author

@felixfontein I see that you have been busy preparing the 3.11.0 release, so may not have had time to look at this one. Just checking in to see if there is anything else I need to provide for this PR.

bruce-szalwinski-he and others added 6 commits October 12, 2025 10:40
Signed-off-by: bruce-szalwinski-he <150711512+bruce-szalwinski-he@users.noreply.github.com>
Signed-off-by: bruce-szalwinski-he <150711512+bruce-szalwinski-he@users.noreply.github.com>
Signed-off-by: bruce-szalwinski-he <150711512+bruce-szalwinski-he@users.noreply.github.com>
Signed-off-by: bruce-szalwinski-he <150711512+bruce-szalwinski-he@users.noreply.github.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Signed-off-by: bruce-szalwinski-he <150711512+bruce-szalwinski-he@users.noreply.github.com>
Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

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

Confirmed the functionality of both the AWS Secrets Manager and AWS Parameter Store

A question that this integration has raised is how to handle the AWS region. The existing S3 integration does not include a dedicated property and instead relies on the default properties that the golang AWS library leverages.

Why not use an aws_region property to each of the AWS related publishers instead of specific parameters. This simplifies the end user experience, but also adds functionality for the S3 publisher. If it is not included, default to the logic of the AWS library

@sabre1041
Copy link
Contributor

@bruce-szalwinski-he any chance that you might be able to resolve the conflicts?

@bruce-szalwinski-he
Copy link
Contributor Author

@bruce-szalwinski-he any chance that you might be able to resolve the conflicts?

yes. I'll resolve when I align the region as you have suggested above.

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
- Replace service-specific region fields (aws_secrets_manager_region,
  aws_parameter_store_region) with a single optional aws_region field
- Use aws_secrets_manager_secret_name and aws_parameter_store_path for
  destination detection instead of region fields
- Make region optional, falling back to AWS SDK defaults (env vars,
  config file, IAM role) - consistent with S3 behavior
- Update documentation and tests

Addresses feedback from PR review regarding inconsistent region handling
across AWS publish destinations.

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
@bruce-szalwinski-he
Copy link
Contributor Author

Confirmed the functionality of both the AWS Secrets Manager and AWS Parameter Store

A question that this integration has raised is how to handle the AWS region. The existing S3 integration does not include a dedicated property and instead relies on the default properties that the golang AWS library leverages.

Why not use an aws_region property to each of the AWS related publishers instead of specific parameters. This simplifies the end user experience, but also adds functionality for the S3 publisher. If it is not included, default to the logic of the AWS library

went with consistently named aws_region as optional element on secrets manager and parameter store. can follow up with PR against s3 if needed.

Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

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

This looks good. Theres one final comment related to the description that is populated on the backend

Signed-off-by: bruce-szalwinski-he <bruce.szalwinski@engine.com>
@sabre1041
Copy link
Contributor

sabre1041 commented Dec 15, 2025

@bruce-szalwinski-he This PR actually enabled me to investigate the full functionality of the publish subcommand. I discovered that the --recursive option was not working properly. I have submitted a PR to resolve the issue. However, it does not appear that this PR will support publishing multiple files as the latest content will overwrite previously configured/published content

@bruce-szalwinski-he
Copy link
Contributor Author

@bruce-szalwinski-he This PR actually enabled me to investigate the full functionality of the publish subcommand. I discovered that the --recursive option was not working properly. I have submitted a PR to resolve the issue. However, it does not appear that this PR will support publishing multiple files as the latest content will overwrite previously configured/published content

I'll take a peek and see if there is a way to handle this.

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.

add support for AWS Secrets Manager

2 participants