You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "markokocic (via GitHub)" <gi...@apache.org> on 2023/09/13 09:43:57 UTC

[GitHub] [apisix] markokocic opened a new issue, #10196: Allow multiple authentication methods per route

markokocic opened a new issue, #10196:
URL: https://github.com/apache/apisix/issues/10196

   ### Description
   
   Right now, it is not possible to have multiple authentication methods defined for one route. If you want to expose one service to multiple consumers, where some consumers use basic auth, some key auth and some jwt, you need to define three different routes.
   
   A better approach would be to allow different authentication methods for a route, maybe with some prioritization, e.g. if basic auth params present - use basic, if app-key present, use key auth, if jwt-key present, use jwt-auth, ....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Allow multiple authentication methods per route [apisix]

Posted by "madhawa-gunasekara (via GitHub)" <gi...@apache.org>.
madhawa-gunasekara commented on issue #10196:
URL: https://github.com/apache/apisix/issues/10196#issuecomment-1807113251

   Hi @shreemaan-abhishek , 
   
   I have looked into the code, I found two ways to implement this feature.
   
   - Plugin Addition:
   Consider integrating an additional plugin, acting as a wrapper, to facilitate multi-authentication seamlessly. This would enhance the existing authentication framework and provide a streamlined solution.
   
   - Modifying the Core Plugin
   The second approach involves modifying the [apisix.plugin](https://github.com/apache/apisix/blob/master/apisix/plugin.lua#L1108) to support multiple authentications at the route level. Given our current execution flow, where plugins are prioritized and filtered, this adjustment requires a special case. We will iterate through all plugins associated with a route, identify those related to authentication, and execute them sequentially. This way, we can discern if any authentication method aligns with the incoming request.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Allow multiple authentication methods per route [apisix]

Posted by "moonming (via GitHub)" <gi...@apache.org>.
moonming closed issue #10196: Allow multiple authentication methods per route
URL: https://github.com/apache/apisix/issues/10196


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Allow multiple authentication methods per route [apisix]

Posted by "madhawa-gunasekara (via GitHub)" <gi...@apache.org>.
madhawa-gunasekara commented on issue #10196:
URL: https://github.com/apache/apisix/issues/10196#issuecomment-1746886502

   Hi, 
   I would like to implement this. 
   This feature should be integrated into the core functionality, as all the authentication plugins have “auth” as their plugin type. The implementation can be done by iterating through all the auth plugins, and stopping the iteration once a plugin is accepted and passing it on. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Allow multiple authentication methods per route [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10196:
URL: https://github.com/apache/apisix/issues/10196#issuecomment-1748029974

   Thanks @madhawa-gunasekara 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Allow multiple authentication methods per route [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10196:
URL: https://github.com/apache/apisix/issues/10196#issuecomment-1812181395

   @madhawa-gunasekara which way did you use?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Allow multiple authentication methods per route [apisix]

Posted by "juzhiyuan (via GitHub)" <gi...@apache.org>.
juzhiyuan commented on issue #10196:
URL: https://github.com/apache/apisix/issues/10196#issuecomment-1776804471

   similar to https://github.com/apache/apisix/issues/6217


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org