-
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
Return a UserError if aead.Open() fails to align with documentation #10914
Return a UserError if aead.Open() fails to align with documentation #10914
Conversation
c53bd7a
to
2fa1338
Compare
2fa1338
to
f05c449
Compare
Note the 400 message before was pretty generic : Currently the 500 message also tells you what algorithm is used which seems like revealing unnecessary (albeit benign) details. Like if it's a poly1305-chacha20 keyring it will say that in the error message. |
It's an interesting one, traditionally you'd want neither the 500 nor the 400 revealing anything internal but it's also possible to go too far (IMO) at the expense of user experience/debugging. It's also 100% possible that someone changes some code causing Probably worth someone working on Vault full-time reviewing it who is aware of those internal decisions. |
f05c449
to
9c7f107
Compare
…e is a problem with the user input for said decryption
9c7f107
to
660c9e3
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.
👍
Thank you for the fix @crozzy, it is very much appreciated. |
As mentioned in this issue: #10842 the API documentation states that:
This change means that failures in key decryption at the
aead.Open()
step will result in a 400 status code being returned as opposed to a 500 as the problem probably originates from incorrect user data entry (there are other possibilites I imagine).