-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
PKI read legacy CA bundle prior to migration #15120
PKI read legacy CA bundle prior to migration #15120
Conversation
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.
Largely looks good, some minor nits I think.
Will this PR handle updating the buildCRL
path (now that it has merged) or should I do that after this merges?
Also, not sure if the complete "new APIs should error" will be done here now or in a separate PR :-)
// and reset its compatibility mode. | ||
b.updatePkiStorageVersion(ctx) | ||
} | ||
// FIXME: We need to hook into CRL generation here for issuer/bundle updates. |
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.
Since we merged the CRL stuff, a call to buildCRLs
should suffice here. :-)
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.
Will defer to another PR, since we don't have a request object here this isn't as trivial as calling buildCRLs.
if err != nil { | ||
return err | ||
return migrationInfo, err |
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.
If this has been deleted (or never created), does it mean we'll err out here?
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.
Ah, I think we don't err. Only on other storage issues.
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.
Correct, but this comment led me to a missing nil check within fetchCAInfo so thanks 👍
- Leverage an existing helper method within the PKI backend tests to setup a PKI backend with storage.
…red on secondaries. - Track the migration state forbidding an issuer/key writing api call if we have not migrated - For operations that just need to read the CA bundle, use the same tracking variable to switch between reading the legacy bundle or use the new key/issuer storage. - Add an invalidation function that will listen for updates to our log path to refresh the state on secondary clusters.
771c042
to
19a2981
Compare
- Some PR feedback and handle a case in which the primary cluster does not have a CA bundle within storage but somehow a secondary does.
19a2981
to
0c53f24
Compare
When the new Vault version starts up and becomes the leader node on a secondary performance cluster it should be able to still support certificate issue/revoke and list commands even when the storage was not migrated.
Known limitations
The new api on the secondary does not return the proper information in regards to issuers and keys as we don't fallback for those api calls.
Testing performed