-
Notifications
You must be signed in to change notification settings - Fork 1
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
[PFMENG-1371] Feat/vault ent secret sync #1
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hazmei add the LICENSE as well, let's publish to public registry.
Special thanks to @shisheng10 and @uchinda-sph for the sharing session of their POC, issues faced and use case of secret sync.
This PR adds the following resources:
Previously tested on web2-platform-infra webcore dev environment.
This setup provide a way to unassociate some vault secret from the secret sync as well as removing the secret sync cleanly (requires 2 step approach for removing the secret sync destination and association).
Current code only supports AWS destination for now. Will add more destinations in the future.
Note
The secret name in aws secrets manager is not configurable. It follows the following format:
vault/<vault accessor id>/<vault secret name>
.There's a need to have different vault_generic_endpoint resource for associating and disassociating the vault secret as the endpoint for deleting association doesn't support the
DELETE
method. See the doc here.terraform-vault-secret-sync/main.tf
Lines 145 to 178 in 5dddf82
Creating secret sync destination and association
Removing secret association
Removing the secret sync destination and secret association
This requires a 2 step flow to remove the destination and association. Secret associations must be removed before the destination can be removed.
Step 1
Step 2