Skip to content
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

Backport of Improve Error Handling for Missing Credentials in AppRole and UserPass into release/1.17.x #28464

Conversation

hc-github-team-secure-vault-core
Copy link
Contributor

Backport

This PR is auto-generated from #28441 to be assessed for backporting due to the inclusion of the label backport/1.17.x.

The below text is copied from the body of the original PR.


Description

This PR updates the error handling for AppRole and UserPass when login credentials are missing. Currently, a 500 error is returned, but a 400 error is more accurate and aligns with the behavior of other auth engines (e.g., LDAP).

Original output:

> curl --request POST -v \
       http://127.0.0.1:8200/v1/auth/userpass/login/mitchellh | jq -r ".auth"
...
< HTTP/1.1 500 Internal Server Error
...

New output:

> curl --request POST -v \
       http://127.0.0.1:8200/v1/auth/userpass/login/mitchellh | jq -r ".auth"
...
< HTTP/1.1 400 Bad Request
...

TODO only if you're a HashiCorp employee


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/missing-login-params/virtually-pleased-parrot branch from 7d26818 to a70b946 Compare September 23, 2024 14:55
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Sep 23, 2024
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link

Build Results:
All builds succeeded! ✅

@ltcarbonell ltcarbonell merged commit bb0ee36 into release/1.17.x Sep 23, 2024
78 of 79 checks passed
@ltcarbonell ltcarbonell deleted the backport/missing-login-params/virtually-pleased-parrot branch September 23, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants