New Action: Rotate secret backend root credentials#2956
Open
drewmullen wants to merge 8 commits into
Open
Conversation
Contributor
Author
|
FWIW - using this locally: vault_mount.database: Creating...
vault_mount.database: Creation complete after 0s [id=oracle]
vault_database_secret_backend_connection.oracle: Creating...
vault_database_secret_backend_connection.oracle: Creation complete after 0s [id=oracle/config/db-1-dev]
Action started: action.vault_secret_backend_rotate_root.test (triggered by vault_database_secret_backend_connection.oracle)
vault_database_secret_backend_role.oracle_dba: Creating...
Action action.vault_secret_backend_rotate_root.test (triggered by vault_database_secret_backend_connection.oracle): Rotating root credentials at oracle/rotate-root/db-1-dev
vault_database_secret_backend_role.oracle_dba: Creation complete after 0s [id=oracle/roles/db-1-dev-admin]
Action action.vault_secret_backend_rotate_root.test (triggered by vault_database_secret_backend_connection.oracle): Successfully rotated root credentials at oracle/rotate-root/db-1-dev
Action complete: action.vault_secret_backend_rotate_root.test (triggered by vault_database_secret_backend_connection.oracle)
Apply complete! Resources: 3 added, 0 changed, 0 destroyed. Actions: 1 invoked. |
Contributor
Author
|
also closes: #202 |
Contributor
Author
|
Ok so the action tests are working: https://github.com/hashicorp/terraform-provider-vault/actions/runs/28615276902/job/84857830818?pr=2956 **=== RUN TestAccSecretBackendRotateRoot_basic
--- PASS: TestAccSecretBackendRotateRoot_basic (2.06s)
=== RUN TestAccSecretBackendRotateRoot_invalidBackend
--- PASS: TestAccSecretBackendRotateRoot_invalidBackend (1.15s)
PASS**but the action tests rotate the root password used by other tests causing other false-failures. These tests get the password from === RUN TestAccDatabaseSecretBackendConnection_postgresql_import
resource_database_secret_backend_connection_test.go:58: Step 1/2 error: Error running apply: exit status 1
Error: error configuring database connection "tf-test-db-3454244516925818279/config/db-2531120351711995218": Error making API request.A few options...
|
Contributor
Author
|
Advice from TFVP team was to create a new user on the DB for this action to rotate - will implement this week |
26697b4 to
bf0bd37
Compare
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
Adds an action to automate rotating backend root creds on a secret engine config creation.
Potential disagreements:
rotate-root, not attempting to hardcode it to a type (ex:database)vault/secrets/rotate/References:
Relates OR Closes #2954
Checklist
Output from acceptance testing:
Community Note
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.