Description
What would you like to be added:
At the moment there is no notion of authentication within the spec when using a rest
state. Let's assume we have a function such as
functions:
- name: secureAPI
operation: "openapi.yaml#createPets"
The OpenAPI file might contain a security scheme such as Bearer Token. So how do I describe in my SW that I need to provide a bearer token for this request? One of the solutions might be to pass it in the argument for the functionRef
but this isn't ideal since you would have to add it every time you want to use that function.
The best solution would be to have a new construct within the spec where you can define the different types of authentication for the functions being used. We can use the existing auth used to access the resource containing the function invocation information but in this case, it would be authentication information for the function invocation. Not saying we should use the same contract, but a have similar one for function invocation.
Why is this needed:
In order to describe the authentication needed a function invocation.