-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
VAULT-30877: Repopulate AWS static creds queue in initialize #28775
VAULT-30877: Repopulate AWS static creds queue in initialize #28775
Conversation
CI Results: |
Build Results: |
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! Thanks @miagilepner for picking this up!
updatedRole2Secret = getSecret(c, "role2") | ||
|
||
if originalRole1Secret == updatedRole1Secret && originalRole2Secret == updatedRole2Secret { | ||
return fmt.Errorf("secrets haven't been rotated") |
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.
nit: Is there a way to make this error point to the test file? Instead of the testhelpers.go file:
testhelpers.go:726: did not complete before deadline, err: secrets haven't been rotated
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.
That's a good idea! I added a t.Helper() to the testhelpers function, so now we see:
rotation_test.go:554: did not complete before deadline, err: secrets haven't been rotated
I was testing this today and after stopping and restarting Vault (with vcm) I am getting an error:
I am not sure if this is just my setup though. |
@fairclothjm interesting, how are you setting this up? I tested it now with vcm using: $ vault write aws/config/root \
access_key=<redacted> \
secret_key=<redacted> # this is an IAM user with username [email protected]
$ vault write aws/static-roles/test-role \
[email protected] \
rotation_period=1m # this is a separate IAM user I didn't see any errors in the server logs from the rollbacks. |
0b6f9b7
to
9bea0ed
Compare
@miagilepner Thanks, I was using the same user for the vault admin and static user. 😅 Now I am working through a policy issue with my vault admin user. |
@miagilepner I got it working. Apparently the permission boundary I am using requires a certain naming convention to function properly. |
Description
Closes #21935
Use the initialize function to re-populate the rotation queue on an active node. Store the credential's expiration value in storage and update it when it changes.
TODO only if you're a HashiCorp employee
to N, N-1, and N-2, using the
backport/ent/x.x.x+ent
labels. If this PR is in the CE repo, you should only backport to N, using thebackport/x.x.x
label, not the enterprise labels.of a public function, even if that change is in a CE file, double check that
applying the patch for this PR to the ENT repo and running tests doesn't
break any tests. Sometimes ENT only tests rely on public functions in CE
files.
in the PR description, commit message, or branch name.
description. Also, make sure the changelog is in this PR, not in your ENT PR.