You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/11 09:11:44 UTC

[GitHub] [apisix] bzp2010 opened a new issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

bzp2010 opened a new issue #5485:
URL: https://github.com/apache/apisix/issues/5485


   # Proposal
   
   ## Background
   
   OpenWhisk is an open source Faas computing platform in the Apache Foundation, announced and contributed to the open source community by IBM in 2016. In terms of running logic, OpenWhisk, like AWS Lambda, provides users with an event-driven, stateless computing model based on a variety of programming languages with direct support.
   Its overall container-based runtime deployment (including traffic entry, controllers, triggers, etc.), using Docker to achieve function operation, management and scaling.
   Meanwhile, in addition to container invocation and function management, OpenWhisk also includes authentication, function asynchronous triggering and other functions.
   
   ## Test Environment
   Configure the standalone run as per the official documentation and execute the following command after running Docker locally.
   ```shell
   git clone https://github.com/apache/openwhisk.git
   cd openwhisk
   ./gradlew core:standalone:bootRun
   ```
   
   ## Objectives
   Supports using functions in OpenWhisk as routing "upstream" via plugins to enable access to Faas functions.
   
   ## Solutions
   1. plugin schema
   <html>
   <body>
   <!--StartFragment--><div class="okr-block-clipboard" data-okr="%7B%22okrDelta%22%3A%5B%7B%22lineType%22%3A%22unsupport%22%2C%22lineOptions%22%3A%7B%7D%2C%22lineContent%22%3A%5B%5D%7D%5D%2C%22businessKey%22%3A%22lark-doc%22%7D"></div><div data-zone-id="0" data-line-index="0" style="white-space: pre;">
   
   Name | Type | Optional | Default | Description
   -- | -- | -- | -- | --
   api_host | string | no |   | OpenWhisk API host (eg. https://localhost:3233)
   ssl_verify | bool | no | true | Whether to verify the certificate
   namespace | string | no |   | OpenWhisk  Namespace (eg. guest)
   action | string | no |   | OpenWhisk Action (eg. hello)
   result | bool | yes | true | Whether to get Action metadata (default to execute function and get response; false to get Action metadata but not execute Action, including runtime, function body, restrictions, etc.)
   service_token | string | no |   | OpenWhisk ServiceToken (The format is `xxx:xxx`,Passed through Basic Auth when calling the API)
   timeout | integer | yes | 60000ms | Functions and HTTP call timeout
   keepalive | bool | yes | true | HTTP keepalive
   keepalive_timeout | integer | yes | 60000ms | keepalive idle timeout
   keepalive_pool | integer | yes | 5 | Connection pool limit
   
   </div><!--EndFragment-->
   </body>
   </html>
   2. plugin implement
   Implement the access phase processing function to send a request to the service endpoint using `resty.http` according to the configuration, and end the request processing after writing the result of the request to the response.
   
   Request Demo:
   ```text
   POST http://localhost:3233/api/v1/namespaces/guest/actions/hello?blocking=true&result=true&timeout=60000
   Authentication: Basic xxxxx
   Content-Type: application/json
   {"name":"test"}
   
   {"payload":"Hello, test!"}
   ```
   
   ## Other
   What are your ideas?


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966340865


   > Is it more suitable to extend the Upstream so that these serverless platforms can be supported as the standard backends.
   
   @tokers I think it's a good idea. But it involves changes to the APISIX core data entity and functions, so its scheme needs further discussion, do you have any good suggestions for this?
   
   Currently @bisakhmondal is working on a similar plugin `azure-serverless` development, do you have any ideas?
   
   cc @spacewander @membphis 


-- 
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



[GitHub] [apisix] rabbah edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
rabbah edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974602463


   🎉 I'm happy to see this proposal. 
   
   You might want to consider using the OpenWhisk web action path instead of the "POST" activation. With a web action response, the function can set the status code, headers and respond with different content types. I didn't look through the PR yet, but with a POST activation, you'll have to interpret the respose from the function (it's always a JSON object) to extract the status code, headers and body.
   
   More information about web actions https://github.com/apache/openwhisk/blob/master/docs/webactions.md.
   


-- 
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



[GitHub] [apisix] rabbah commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975843769


   👋 @bzp2010 it is possible to require basic auth on web actions but the semantics of that (today) is to allow any authenticated openwhisk user to call the web action whereas you want to restrict the entitlement to just the action owner. The latter is accomplished with the `X-Require-Whisk-Auth` header. If interpreting the POST response is not too much work for you, it sounds like the best path forward right now.


-- 
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



[GitHub] [apisix] tokers edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966746639


   > at the end of the day, we need to handle framework-specific authorization
   
   That makes sense. It would be tough to change the upstream core logic to adjust these platforms' authentication. Now I prefer to implement it to a plugin. (Note why I have such an idea is that the Amazon API Gateway supports its Lambda function as an integration (backend)).
   
   However, it's my understanding that these FaaS plugins will have some common characteristics so that we may encapsulate these codes and reuse them in each of these plugins. @bisakhmondal @bzp2010 


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966340865


   > Is it more suitable to extend the Upstream so that these serverless platforms can be supported as the standard backends.
   
   @tokers I think it's a good idea. But it involves changes to the APISIX core data entity, so its scheme needs further discussion, do you have any good suggestions for this?
   
   cc @spacewander @membphis @bisakhmondal 


-- 
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



[GitHub] [apisix] tokers edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966746639


   > at the end of the day, we need to handle framework-specific authorization
   That makes sense. It would be tough to change the upstream core logic to adjust these platforms' authentication. Now I prefer to implement it to a plugin. (Note why I have such an idea is that the Amazon API Gateway supports its Lambda function as an integration (backend)).
   
   However, it's my understanding that these FaaS plugins will have some common characteristics so that we may encapsulate these codes and reuse them in each of these plugins. @bisakhmondal @bzp2010 


-- 
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



[GitHub] [apisix] rabbah edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
rabbah edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974602463


   🎉 I'm happy to see this proposal. 
   
   You might want to consider using the OpenWhisk web action path instead of the "POST" activation. With a web action response, the function can set the status code, headers and respond with different content types. I didn't look through the PR yet, but with a POST activation, you'll have to interpret the respose from the function (it's always a JSON object) to extract the status code, headers and body.
   
   More information about web actions https://github.com/apache/openwhisk/blob/master/docs/webactions.md.
   


-- 
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



[GitHub] [apisix] tokers commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966173546


   So the request is terminated by APISIX and won't be proxied to the upstream, if we use this plugin?


-- 
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



[GitHub] [apisix] tokers removed a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers removed a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974986312


   > 🎉 I'm happy to see this proposal.
   > 
   > You might want to consider using the OpenWhisk web action path instead of the "POST" activation. With a web action response, the function can set the status code, headers and respond with different content types. I didn't look through the PR yet, but with a POST activation, you'll have to interpret the respose from the function (it's always a JSON object) to extract the status code, headers and body.
   > 
   > More information about web actions https://github.com/apache/openwhisk/blob/master/docs/webactions.md.
   
   cc @bzp2010 


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975078361


   Hi, @rabbah.
   
   Thank you for pointing out the problem that. I see the following description in the Action documentation:
   
   ```text
   Authentication is required when invoking an action via an HTTPS request using this resource
   path. For more information regarding action invocations using the REST interface, see Using
   REST APIs with OpenWhisk.
   
   Another way of invoking an action which does not require authentication is via web actions.
   ```
   
   In our usage scenario, I think we need to support authenticated Action calls, is the current description above still correct? Is it possible for us to enable **BasicAuth** authentication on the web API?
   
   If this is not possible, the response JSON needs to be processed manually at this point, but then the response content needs to be judged to confirm that it contains only response data or more content such as headers. Is that a correct scheme?


-- 
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



[GitHub] [apisix] bzp2010 commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966177462


   > So the request is terminated by APISIX and won't be proxied to the upstream, if we use this plugin?
   
   Yes, I think so.


-- 
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



[GitHub] [apisix] tokers commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966746639


   > at the end of the day, we need to handle framework-specific authorization
   That makes sense. It would be tough to change the upstream core logic to adjust these platforms' authentication. Now I prefer to implement it to a plugin. (Note why I have such an idea is that the Amazon API Gateway supports its Lambda function as an integration (backend)).
   
   However, it's my understanding that these FaaS plugins will have some common characteristics so that we may reuse them in each of these plugins. @bisakhmondal @bzp2010 


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966340865






-- 
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



[GitHub] [apisix] bisakhmondal commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966400503


   > So the request is terminated by APISIX and won't be proxied to the upstream, if we use this plugin?
   
   Yes, @tokers, the serverless function URI will be treated as a new upstream. Is there any use cases when we need both conventional upstream and serverless functions as upstream-duo?
   
   > Is it more suitable to extend the Upstream so that these serverless platforms can be supported as the standard backends.
   
   The idea is really good. But I am not sure considering this massive refactoring if the benefits that come after that would be a good tradeoff. Because, at the end of the day, we need to handle framework-specific authorization. That's where we again have to introduce plugins. They not only vary in header names for authorization but also some of the providers support complex authz techniques such as (aws key-secret pair, IAM role-based authz etc). So I think we can't abstract this plugin requirement into a single entity.
   
   Let me know what do you think, definitely it's going to be a good discussion : )
   Thanks!


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975078361


   Hi, @rabbah.
   
   Thank you for pointing out the problem that. I see the following description in the Action documentation:
   
   ```text
   Authentication is required when invoking an action via an HTTPS request using this resource
   path. For more information regarding action invocations using the REST interface, see Using
   REST APIs with OpenWhisk.
   
   Another way of invoking an action which does not require authentication is via web actions.
   ```
   
   In our usage scenario, I think we need to support authenticated Action calls, is the current description above still correct? Can we enable `BasicAuth` instead of setting a custom secret?
   
   If this is not possible, the response JSON needs to be processed manually at this point, but then the response content needs to be judged to confirm that it contains only response data or more content such as headers. Is that a correct scheme?


-- 
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



[GitHub] [apisix] tokers commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966181266


   Is it more suitable to extend the Upstream so that these serverless platforms can be supported as the standard backends.


-- 
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



[GitHub] [apisix] tokers commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974986312


   > 
   
   cc @bzp2010 


-- 
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



[GitHub] [apisix] bzp2010 commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975078361


   Hi, @rabbah.
   
   Thank you for pointing out the problem that. I see the following description in the Action documentation:
   
   ```text
   Authentication is required when invoking an action via an HTTPS request using this resource
   path. For more information regarding action invocations using the REST interface, see Using
   REST APIs with OpenWhisk.
   
   Another way of invoking an action which does not require authentication is via web actions.
   ```
   
   In our usage scenario, I think we need to support authenticated Action calls, is the current description above still correct? Is it possible for us to enable authentication on the web API?
   
   If this is not possible, the response JSON needs to be processed manually at this point, but then the response content needs to be judged to confirm that it contains only response data or more content such as headers. Is that a correct scheme?


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966340865


   > Is it more suitable to extend the Upstream so that these serverless platforms can be supported as the standard backends.
   
   @tokers I think it's a good idea. But it involves changes to the APISIX core data entity and functions, so its scheme needs further discussion, do you have any good suggestions for this?
   
   cc @spacewander @membphis @bisakhmondal 


-- 
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



[GitHub] [apisix] rabbah commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974602463


   🎉 I'm happy to see this proposal. 
   
   You might want to consider using the OpenWhisk web action path instead of the "POST" activation. With a web action response, the function can set the status code, headers and respond with different content types. I didn't look through the PR yet, but with a POST activation, you'll have to interpret the respose from the function (it's always a JSON object) to extract the status code, headers and body.
   


-- 
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



[GitHub] [apisix] membphis closed issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
membphis closed issue #5485:
URL: https://github.com/apache/apisix/issues/5485


   


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975078361


   Hi, @rabbah.
   
   Thank you for pointing out the problem that. I see the following description in the Action documentation:
   
   ```text
   Authentication is required when invoking an action via an HTTPS request using this resource
   path. For more information regarding action invocations using the REST interface, see Using
   REST APIs with OpenWhisk.
   
   Another way of invoking an action which does not require authentication is via web actions.
   ```
   
   In our usage scenario, I think we need to support authenticated Action calls, is the current description above still correct? Can we enable `BasicAuth` instead of setting a custom secret by `X-Require-Whisk-Auth`?
   
   If this is not possible, the response JSON needs to be processed manually at this point, but then the response content needs to be judged to confirm that it contains only response data or more content such as headers. Is that a correct scheme?


-- 
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



[GitHub] [apisix] bzp2010 commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966340865


   > Is it more suitable to extend the Upstream so that these serverless platforms can be supported as the standard backends.
   
   I think it's a good idea. But it involves changes to the APISIX core data entity, so its scheme needs further discussion, do you have any good suggestions for this?
   
   cc @spacewander @membphis @bisakhmondal 


-- 
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



[GitHub] [apisix] tokers edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-966746639


   > at the end of the day, we need to handle framework-specific authorization
   
   That makes sense. It would be tough to change the upstream core logic to adjust these platforms' authentication. Now I prefer to implement it to a plugin. (Note why I have such an idea is that the Amazon API Gateway supports using its Lambda function as an integration (backend)).
   
   However, it's my understanding that these FaaS plugins will have some common characteristics so that we may encapsulate these codes and reuse them in each of these plugins. @bisakhmondal @bzp2010 


-- 
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



[GitHub] [apisix] rabbah commented on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974602463


   🎉 I'm happy to see this proposal. 
   
   You might want to consider using the OpenWhisk web action path instead of the "POST" activation. With a web action response, the function can set the status code, headers and respond with different content types. I didn't look through the PR yet, but with a POST activation, you'll have to interpret the respose from the function (it's always a JSON object) to extract the status code, headers and body.
   


-- 
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



[GitHub] [apisix] tokers edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
tokers edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-974986312


   > 🎉 I'm happy to see this proposal.
   > 
   > You might want to consider using the OpenWhisk web action path instead of the "POST" activation. With a web action response, the function can set the status code, headers and respond with different content types. I didn't look through the PR yet, but with a POST activation, you'll have to interpret the respose from the function (it's always a JSON object) to extract the status code, headers and body.
   > 
   > More information about web actions https://github.com/apache/openwhisk/blob/master/docs/webactions.md.
   
   cc @bzp2010 


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975078361


   Hi, @rabbah.
   
   Thank you for pointing out the problem that. I see the following description in the Action documentation:
   
   ```text
   Authentication is required when invoking an action via an HTTPS request using this resource
   path. For more information regarding action invocations using the REST interface, see Using
   REST APIs with OpenWhisk.
   
   Another way of invoking an action which does not require authentication is via web actions.
   ```
   
   In our usage scenario, I think we need to support authenticated Action calls, is the current description above still correct? Can we enable `BasicAuth` instead of setting a custom secret by `X-Require-Whisk-Auth`?
   
   If this is not possible, the response JSON needs to be processed manually at this point, but then the response content needs to be judged to confirm that it contains only response data or more content such as headers. Is that a correct scheme?
   
   ---
   
   And the OpenWhisk will use HTTP/2 for API in standalone or api-gateway?


-- 
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



[GitHub] [apisix] bzp2010 edited a comment on issue #5485: Proposal: support Apache OpenWhisk serverless framework plugin

Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on issue #5485:
URL: https://github.com/apache/apisix/issues/5485#issuecomment-975078361


   Hi, @rabbah.
   
   Thank you for pointing out the problem that. I see the following description in the Action documentation:
   
   ```text
   Authentication is required when invoking an action via an HTTPS request using this resource
   path. For more information regarding action invocations using the REST interface, see Using
   REST APIs with OpenWhisk.
   
   Another way of invoking an action which does not require authentication is via web actions.
   ```
   
   In our usage scenario, I think we need to support authenticated Action calls, is the current description above still correct? Is it possible for us to enable BasicAuth authentication on the web API?
   
   If this is not possible, the response JSON needs to be processed manually at this point, but then the response content needs to be judged to confirm that it contains only response data or more content such as headers. Is that a correct scheme?


-- 
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