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

Move security requirements to server objects #48

Closed
fmvilas opened this issue Dec 6, 2017 · 1 comment · Fixed by #149
Closed

Move security requirements to server objects #48

fmvilas opened this issue Dec 6, 2017 · 1 comment · Fixed by #149
Assignees
Labels

Comments

@fmvilas
Copy link
Member

fmvilas commented Dec 6, 2017

Many async APIs out there have proved to support different protocols for the same API. For instance, they might support using WebSockets and MQTT, HTTP streaming and WebSockets, etc.

The way you authenticate to these APIs depend very much on the protocol, so I think it would make sense to attach the security requirement to the server you're connecting to.

Example:

servers:
  # This server supports connecting using user-password or X509 certificate
  - url: async.api.com:1883
    scheme: mqtt
    securityRequirements:
      - X509Certificate
      - userPass
  # This server only supports connecting using user-password
  - url: async.api.com
    scheme: amqp
    securityRequirements:
      - userPass

components:
  securitySchemes:
    userPass:
      type: userPassword
    X509Certificate:
      type: X509

Right now the security requirements are at the root level, making it impossible to guess which server supports which security scheme.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants