Hi, Bisakh. Your Proposal looks great. But I have a little question.
> I am trying to maintain a generic schema so that it can be extended in > cloud functions from multiple cloud providers. We just have to take care of > the schema.authorization part and the related nuisances Can you tell me more about this part? Are you trying to implement an easily extensible Serverless BasePlugin? Best regards! Zeping Bai @bzp2010 Bisakh Mondal <[email protected]> 于2021年11月11日周四 上午4:02写道: > Hi folks, > > This proposal is for integrating a new plugin to support Microsoft Azure > cloud functions into Apache APISIX. > > proposed plugin_name = "azure-functions" > > The idea is fairly simple. Whenever a route is called with the plugin > enabled, the serverless function will be treated as an upstream and will be > called in OpenResty "access" phase. The request headers, body and request > params will be forwarded to the upstream and the response header, body and > status code will be returned back to the client which has invoked the > route. > > Plugin schema: > > { > type = "object", > properties = { > function_uri = {type = "string"}, > authorization = { > type = "object", > properties = { > apikey = {type = "string"}, > clientid = {type = "string"} > } > }, > timeout = {type = "integer", minimum = 1000, default = 3000}, > ssl_verify = {type = "boolean", default = false}, > keepalive = {type = "boolean", default = true}, > keepalive_timeout = {type = "integer", minimum = 1000, default = > 60000}, > keepalive_pool = {type = "integer", minimum = 1, default = 5} > }, > required = {"function_uri"} > } > > function_uri is the field where the users will pass the URI of the azure > function. For example ( > https://test-apisix.azurewebsites.net/api/HttpTrigger1). > The authorization subschema has two fields > - apikey - this could be either Function specific key or a host key > (azure specific). > - clientid: mainly for webhooks (secured by azure active directory) > The rest of the fields are pretty much normal for any proxy plugins to > provide the users with the flexibility of customizing an HTTP request. > (I am trying to maintain a generic schema so that it can be extended in > cloud functions from multiple cloud providers. We just have to take care of > the schema.authorization part and the related nuisances) > > For the first version of the plugin, we are going to support only HTTP and > HTTPS schemes. We will think about different schemes (gRPC, WebSockets) in > the subsequent upgrades. > > I have started working with a draft PR[1]. If you have any updates, > suggestions, recommendations, feel free to add so. > Thank you. > > Best regards, > Bisakh <https://github.com/bisakhmondal> > > [1]: https://github.com/apache/apisix/pull/5479 >
