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

unspecific error message when scope names don't fit the naming schema #1456

Open
ePaul opened this issue Jul 11, 2023 · 0 comments
Open

unspecific error message when scope names don't fit the naming schema #1456

ePaul opened this issue Jul 11, 2023 · 0 comments

Comments

@ePaul
Copy link
Member

ePaul commented Jul 11, 2023

Current behavior

When an API has security schemes with scopes which don't fit the naming schema defined in rule 225, Zally reports an unspecific violation for rule 105.

...
paths:
  '/example':
   get:
     security:
       foo:
         - example/read
     ...
components:
  securitySchemes:
    foo:
      type: oauth2
      description: Example OAuth scheme
      flows:
        clientCredentials:
          tokenUrl: https://api.example.com/oauth/token
          scopes:
            example/read: Read access to this API
            example/write: Write access to this API

(The correct scope names would be example.read and example.write.)

Expected behavior

Instead, there should be a violation for rule 225, telling that the rule name is not fitting naming convention.

A violation for rule 105 is still applicable if there is an endpoint without any scope assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant