Hi, Bisakh.
Great! I'm looking forward to seeing how the solutions you provide are
implemented. XD


Best regards!
Zeping Bai  @bzp2010

Bisakh Mondal <[email protected]> 于2021年11月11日周四 下午1:58写道:

> Thanks guys, for the cool responses and feedbacks.
> @spacewander - You are right, we can provide the flexibility. Let's change
> the min value to 100ms and the default value of ssl_verify to true.
>
> Thank you!
>
>
> On Thu, 11 Nov 2021 at 10:14, Ayush das <[email protected]> wrote:
>
> > Hi Bisakh,
> > Your proposal SGTM,
> > Ping me if you need any sort of help.
> >
> > Thank you
> > Best regards
> > Ayush Das<https://github.com/iamayushdas>
> >
> > On Thu, 11 Nov 2021 at 10:08 AM, Zeping Bai <[email protected]> wrote:
> >
> > > 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?
> > >
> >
>
> Hi Zeping, Yes kinda like that to reduce code duplication. See the thing
> is, for every serverless plugin, we have to make a request to the cloud
> provider's endpoint whenever the route is invoked. They all differ in the
> way authorization is handled. What I have though is like this - a base
> package module with a function that has the schema except for the
> authorization part. It takes the authorization schema as a request argument
> and returns the full schema (here plugins for the different service
> providers can define their respective authorization schema in the
> respective plugin Lua file). Another method that takes the HTTP params to
> invoke the function URI.
>
> This is just a rough draft that I thought. Let's see how I end up
> implementing it.
>
>
> > > 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
> > > >
> > >
> >
>

Reply via email to