asyncapi / spec

The AsyncAPI specification allows you to create machine-readable definitions of your asynchronous APIs.
https://www.asyncapi.com
Apache License 2.0
4.26k stars 269 forks source link

How to handle Bearer Authentication using a JMS Header? #920

Open adamretter opened 1 year ago

adamretter commented 1 year ago

The securitySchemes mechanism of AsyncAPI 2.6.0 spec does not seem compatible with the idea of sending an Auth token (e.g. similar to Bearer Authentication) in a header when using the JMS protocol. The 2.6.0 version of the spec seems to restrict this to HTTP only for some reason.

I would like to be able to achieve something like:

securitySchemes:
  bearerAuthentication:
    type: apiKey
    in: header
    name: AuthenticationToken
    description: Bearer Authentication Token should be provided in the `AuthenticationToken` header.

Thoughts on how I can achieve this, or should I contribute an update to the spec?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

adamretter commented 1 year ago

I would still like a response to this if possible?

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

adamretter commented 11 months ago

Can someone reply to this please?

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

adamretter commented 7 months ago

Id still like some feedback on this

Shimork04 commented 2 months ago

I noticed that the current securitySchemes mechanism in AsyncAPI 2.6.0 seems to limit sending an Auth token in a header (similar to Bearer Authentication) to the HTTP protocol only. For use cases like JMS, it would be valuable to extend this capability.

I'm looking to achieve something like:

securitySchemes: bearerAuthentication: type: apiKey in: header name: AuthenticationToken description: Bearer Authentication Token should be provided in the AuthenticationToken header.

Is there a recommended way to implement this with the current spec, or should we consider updating the spec to support this for protocols beyond HTTP?