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

"MUST Secure Endpoints" violation using Bearer Auth #1251

Closed
cberg-zalando opened this issue Jun 7, 2021 · 4 comments · Fixed by #1253
Closed

"MUST Secure Endpoints" violation using Bearer Auth #1251

cberg-zalando opened this issue Jun 7, 2021 · 4 comments · Fixed by #1253
Assignees

Comments

@cberg-zalando
Copy link
Member

Even with the implementation of #1247, our builds still fails due to violating MUST Secure Endpoints endpoints saying e.g. The scope 'BearerAuth/wrapping-eligibility.read' is not specified in the clientCredentials flow of the OAuth2 security definition (see https://sunrise.zalando.net/cdp/ghe/broadway/wrapping-eligibility/l-2fdr94fskn5ymahu4h82yvirbc/steps/0/logs for details).

As the RESTful API guidelines do not mention anything about specifying scope information, either the check needs to be adjusted or something is missing in the guidelines.

@vadeg vadeg added the type: bug label Jun 8, 2021
@vadeg
Copy link
Contributor

vadeg commented Jun 8, 2021

@cberg-zalando thank you for creating the ticket. There is a bug in one of the checks. The mitigation strategy for now is to use oauth2 security scheme instead of bearer.

@cberg-zalando
Copy link
Member Author

I also learned that the definition of scopes before OpenAPI 3.1.0 is actually a violation, so the ideal situation would be if zally would support the latest OpenAPI version as outlined already in #1230.

@tkrop
Copy link
Member

tkrop commented Jun 8, 2021

@vadeg I actually fixed the first part in #1247. However, I overlooked, that OpenAPI 3.1.0 added scopes for Bearer Authentication that conflicts with the current scope validation check. I will try to fix this too, but I'm currently not sure what prevents 3.1.0 specs from being handled by Zally. Any hint about this is welcome.

@tkrop tkrop self-assigned this Jun 8, 2021
tkrop added a commit that referenced this issue Jun 8, 2021
tkrop added a commit that referenced this issue Jun 8, 2021
@vadeg
Copy link
Contributor

vadeg commented Jun 8, 2021

@tkrop thanks. I am fixing this one already.

tkrop added a commit that referenced this issue Jun 9, 2021
tkrop added a commit that referenced this issue Jun 9, 2021
vadeg added a commit that referenced this issue Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants