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

Security: Multi-API Key #293

Open
xxJimxx opened this issue Oct 25, 2024 · 5 comments
Open

Security: Multi-API Key #293

xxJimxx opened this issue Oct 25, 2024 · 5 comments

Comments

@xxJimxx
Copy link

xxJimxx commented Oct 25, 2024

Authentication seems to be reading security directly from the components and not the security descriptor. When adding multiple keys they all show as individual authorization keys and not multi-key as documents indicate.

https://swagger.io/docs/specification/v3_0/authentication/api-keys/#multiple-api-keys

@ak1394
Copy link
Collaborator

ak1394 commented Oct 25, 2024

Could you clarify which part of the extension you're referring to? Editor, preview, try it, etc?

@xxJimxx
Copy link
Author

xxJimxx commented Oct 29, 2024

When clicking authorize each header appears as an independent authorization with it's own set of buttons to authorize and close.

@xxJimxx
Copy link
Author

xxJimxx commented Oct 30, 2024

Even wIthout the security descriptor all headers still appear in the authorize click but as individual authorization..
security:

  • ID: []
    NAME: []
    ENV: []
    TIMESTAMP: []
    SIGNATURE: []
    KEY_VERSION: []

components:
securitySchemes:
ID:
type: apiKey
in: header
name: CONSUMER.ID
NAME:
type: apiKey
in: header
name: SVC.NAME
ENV:
type: apiKey
in: header
name: SVC.ENV
TIMESTAMP:
type: apiKey
in: header
name: INTIMESTAMP
SIGNATURE:
type: apiKey
in: header
name: AUTH_SIGNATURE
KEY_VERSION:
type: apiKey
in: header
name: KEY_VERSION

@ak1394
Copy link
Collaborator

ak1394 commented Oct 30, 2024

Again, could you explain which part of the extension you're referring to? Providing a screenshot might help.

@anthony-42crunch
Copy link
Contributor

@xxJimxx
I've quickly tested and confirmed the tool does correctly implement the security schema for AND/OR cases.

You can check out the example illustrated here and add a comment if anything is unclear or different about your use case:

https://developers.42crunch.com/t/apis-with-multiple-auth-schemes/86

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

No branches or pull requests

3 participants