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 DB Secrets #29497

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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: failed ❌
Failures:

Test Type Package Test Logs
race builtin/credential/aws TestBackend_ConfigClient view test results
race builtin/credential/aws TestBackend_pathConfigClient view test results
race builtin/credential/aws TestBackend_pathLogin_IAMHeaders view test results
race builtin/credential/aws TestBackend_pathLogin_IAMHeaders/Default view test results
race builtin/logical/aws TestBackend_PathConfigRoot view test results
race builtin/logical/aws TestBackend_PathConfigRoot_RegisterRootRotation view test results
race builtin/logical/aws TestBackend_PathConfigRoot_STSFallback view test results
race builtin/logical/aws TestBackend_iamGroupsCRUD view test results
race builtin/logical/aws TestBackend_iamTagsCRUD view test results
race builtin/logical/aws TestBackend_policyArnCRUD view test results

and 124 - 10 other tests

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
builtin/logical/database/backend.go Dismissed Show dismissed Hide dismissed
builtin/logical/database/backend.go Dismissed Show dismissed Hide dismissed
@@ -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?

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.

2 participants