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.18.x #28465

Merged

Conversation

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

Backport

This PR is auto-generated from #28441 to be assessed for backporting due to the inclusion of the label backport/1.18.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/mutually-grown-shrew branch from 4543c7f to 3607fe8 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

github-actions bot commented Sep 23, 2024

CI Results:
All Go tests succeeded! ✅

Copy link

Build Results:
All builds succeeded! ✅

@ltcarbonell ltcarbonell merged commit 1511c37 into release/1.18.x Sep 23, 2024
79 of 80 checks passed
@ltcarbonell ltcarbonell deleted the backport/missing-login-params/mutually-grown-shrew branch September 23, 2024 15:37
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