-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Out of spec HTTP authorization scheme seems accepted (Basic). #5965
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
Comments
Note to developers: |
New PR: swagger-api/swagger-js#1531 |
char0n
added a commit
to swagger-api/swagger-js
that referenced
this issue
Jun 18, 2020
As per RFC7235 auth scheme is case insensitive. 2.1. Challenge and Response HTTP provides a simple challenge-response authentication framework that can be used by a server to challenge a client request and by a client to provide authentication information. It uses a case- insensitive token as a means to identify the authentication scheme, followed by additional information necessary for achieving. https://tools.ietf.org/html/rfc7235#section-2.1 Refs #1531, #1473 Refs OAI/OpenAPI-Specification#1876 Refs swagger-api/swagger-ui#5965
10 tasks
char0n
added a commit
to swagger-api/swagger-js
that referenced
this issue
Jun 18, 2020
As per RFC7235 auth scheme is case insensitive. 2.1. Challenge and Response HTTP provides a simple challenge-response authentication framework that can be used by a server to challenge a client request and by a client to provide authentication information. It uses a case- insensitive token as a means to identify the authentication scheme, followed by additional information necessary for achieving. https://tools.ietf.org/html/rfc7235#section-2.1 Refs #1531, #1473 Refs OAI/OpenAPI-Specification#1876 Refs swagger-api/swagger-ui#5965
char0n
added a commit
to swagger-api/swagger-js
that referenced
this issue
Jun 18, 2020
As per RFC7235 auth scheme is case insensitive. 2.1. Challenge and Response HTTP provides a simple challenge-response authentication framework that can be used by a server to challenge a client request and by a client to provide authentication information. It uses a case- insensitive token as a means to identify the authentication scheme, followed by additional information necessary for achieving. https://tools.ietf.org/html/rfc7235#section-2.1 Co-authored-by: Helen Kosova <[email protected]> Refs #1531, #1473 Refs OAI/OpenAPI-Specification#1876 Refs swagger-api/swagger-ui#5965
🎉 Fixed in Swagger UI 3.27.0, Swagger Editor 3.11.4, swagger-client 3.10.8. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
I had a typo.
scheme
field on the HTTP auth wasBasic
instead ofbasic
.But even with this typo all UI features seemed to work okay. I was able to click authorize and enter my credentials. Only for them to not being send on request.
And actually on
available authorizations
modal, authorization method is depicted asbasicAuth (http, Basic)
with capital B. As how it would be depicted in many other places.This causes confusion as everything seems fine but authorization headers are not send on try it out requests. Since many issues about authorization headers seem to point at CORS issues, whole situation causes a witch hunt over a simple typo.
Expected behavior
When authorization scheme value is wrong (Basic instead of basic) do not show (http, Basic) authorization in
available authorizations
modal.Or better show a warning about an unsupported authorization method.
The text was updated successfully, but these errors were encountered: