-
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
Optional automatic default issuer selection #17824
Conversation
When setting a new default issuer, our helper function would overwrite other parameters in the issuer configuration entry. However, up until now, there were none. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
@@ -52,6 +53,11 @@ func pathConfigIssuers(b *backend) *framework.Path { | |||
Type: framework.TypeString, | |||
Description: `Reference (name or identifier) to the default issuer.`, | |||
}, | |||
"default_follows_latest_issuer": { | |||
Type: framework.TypeBool, | |||
Description: `Whether the default issuer should automatically follow the latest generated or imported issuer. Defaults to false.`, |
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 is meant to allow opt-in to unbreak a change, should the original change be documented as breaking, and point to this new field as a way to opting into the previous behavior if necessary, while suggesting that callers move to using the new multi-issuer functionality more explicitly as they can? (just a thought)
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 yeah, its in the web docs that I've not pushed, one second.
This parameter will allow operators to have the default issuer automatically update when a new root is generated or a single issuer with a key (potentially with others lacking key) is imported. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
These internal members shouldn't be tested by the storage migration code, and so should be elided from the test results. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
This updates the two places where issuers can be created (outside of legacy CA bundle migration which already sets the default) to follow newly created issuers when the config is set. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
ffc9861
to
3ae7100
Compare
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.
Looks good to me. I had the tiny concern that the concept of "follows" in the API docs wasn't clear enough but the main docs are.
If you have suggestions, I'm happy to update. But in general I think we point people towards the online docs as being more comprehensive than the in-Vault docs. |
Nah, its fine. |
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.
This looks great to me!
When attempting compatibility against multiple versions of Vault, one major breaking change in Vault 1.11 was the multiple issuer's functionality and behavior changes around importing issuers (wherein
/config/ca
required a deletion first) and generation of new issuers (where both root/intermediate generation silently removed old keys!).While we don't wish to remove key material any more, thus becoming more safe, the net was a breaking change across APIs: because the default issuer was not updated on these operations, the issuer would appear "lost" to any callers. Only when an operator updated the default issuer would non-multi-issuer aware applications see this new CA.
However, not everyone will want to automatically change the default issuer: for applications and operators aware of multi-issuer functionality, who wish to proactively prime new isseurs prior to enabling them (perhaps for distribution purposes), this change shouldn't be automatic and retroactive.
Thus, make this an opt-in change on
/config/issuers
.This obviously needs:
Like #17823, I'm curious to get people's thoughts.