-
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
Correctly distinguish empty issuer names in PKI #18466
Correctly distinguish empty issuer names in PKI #18466
Conversation
When using client.Logical().JSONMergePatch(...) with an empty issuer name, patch incorrectly reports: > issuer name contained invalid characters In this case, both the error in getIssuerName(...) is incorrect and patch should allow setting an empty issuer name explicitly. Signed-off-by: Alexander Scheel <[email protected]>
Signed-off-by: Alexander Scheel <[email protected]>
Signed-off-by: Alexander Scheel <[email protected]>
I completely agree with the new patch behaviour. Could you expand a bit though on why we want to keep the POST behaviour different, feels a bit odd that if an end-user wants to blank out an issuer name that it must be done through a PATCH command only? Is this just a way to force people to use PATCH semantics for updates? |
@stevendpclark On POST/ Up to you :) |
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.
Yup you are correct, pretty sure I was thinking of how we treat unset params for the various config POST requests.
Thank you! |
* Correctly distinguish empty issuer names When using client.Logical().JSONMergePatch(...) with an empty issuer name, patch incorrectly reports: > issuer name contained invalid characters In this case, both the error in getIssuerName(...) is incorrect and patch should allow setting an empty issuer name explicitly. Signed-off-by: Alexander Scheel <[email protected]> * Add changelog Signed-off-by: Alexander Scheel <[email protected]> * Add tests Signed-off-by: Alexander Scheel <[email protected]> Signed-off-by: Alexander Scheel <[email protected]>
* Correctly distinguish empty issuer names When using client.Logical().JSONMergePatch(...) with an empty issuer name, patch incorrectly reports: > issuer name contained invalid characters In this case, both the error in getIssuerName(...) is incorrect and patch should allow setting an empty issuer name explicitly. Signed-off-by: Alexander Scheel <[email protected]> * Add changelog Signed-off-by: Alexander Scheel <[email protected]> * Add tests Signed-off-by: Alexander Scheel <[email protected]> Signed-off-by: Alexander Scheel <[email protected]>
When using
client.Logical().JSONMergePatch(...)
with an empty issuer name, patch incorrectly reports:In this case, both the error in getIssuerName(...) is incorrect and patch should allow setting an empty issuer name explicitly.
Signed-off-by: Alexander Scheel <[email protected]>
Notably, while this also affects
vault write
, the new error message should be clearer and users can simply elide theissuer_name
parameter (with empty value) and the the same behavior (clearing the name). However, forvault patch
there is no equivalent and thus they have to have this bug fix.