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

Automated rotate root support for AWS Auth and Secrets #29497

Merged
merged 9 commits into from
Feb 10, 2025

Conversation

vinay-gopalan
Copy link
Contributor

@vinay-gopalan vinay-gopalan commented Feb 4, 2025

Description

Adds new support for using Automated Rotation with AWS Auth and DB Secrets.
Note: This feature is Enterprise only and will only work with an Enterprise Vault instance. Tests for the feature will also be added against Vault Enterprise once this PR is merged.

Other changes:

  • Refactors some rotate root methods to be re-usable between manual and automated root rotations
  • Uses MountPoint instead of MountType to correctly route requests to custom mount aliases (eg: foo/bar/baz/config)
  • Adds validation for fields along with tests
  • Adds an error log in configuration steps in case the write to storage fails but a rotation operation succeeds. User will receive an error as well as see a verbose error log in this case.

@vinay-gopalan vinay-gopalan requested a review from a team as a code owner February 4, 2025 17:23
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Feb 4, 2025
@vinay-gopalan vinay-gopalan requested a review from a team as a code owner February 4, 2025 17:27
@vinay-gopalan vinay-gopalan added this to the 1.19.0-rc milestone Feb 4, 2025
Copy link

github-actions bot commented Feb 4, 2025

CI Results:
All Go tests succeeded! ✅

Copy link

github-actions bot commented Feb 4, 2025

Build Results:
All builds succeeded! ✅

@vinay-gopalan vinay-gopalan removed the request for review from kiannaquach February 4, 2025 17:28
@@ -13,7 +13,7 @@ import (
const (
// Minimum allowed value for rotation_window
minRotationWindowSeconds = 3600
parseOptions = cron.Second | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow
parseOptions = cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In production, schedules using seconds should be disallowed. Only useful in testing. Matches behavior with the DB Engine as well

}
}

if region, ok := data.GetOk("region"); ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does updating the data extraction like this change any of the user-facing behaviors?

@vinay-gopalan vinay-gopalan changed the title Automated rotate root support for AWS Auth and DB Secrets Automated rotate root support for AWS Auth and Secrets Feb 10, 2025
robmonte
robmonte previously approved these changes Feb 10, 2025
@vinay-gopalan vinay-gopalan enabled auto-merge (squash) February 10, 2025 23:25
@vinay-gopalan vinay-gopalan merged commit 9b70487 into main Feb 10, 2025
90 of 92 checks passed
@vinay-gopalan vinay-gopalan deleted the VAULT-33367/automated-root-rotation-aws-auth branch February 10, 2025 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants