Open
Description
Feature: Support OAuth2/OIDC and Bearer token
Expected Behaviour
As a user with a custom OAuth2/OIDC OpenFaaS authentication plugin configured on my gateway, I need to be able to "log in" and invoke the various CLI commands.
Current Behaviour
We can accommodate this in the OpenFaaS portal UI with no additional changes through the use of cookies issued in the OpenFaaS authentication plugin.
The OpenFaaS CLI does not support this workflow
Possible Solution
- Update
faas-cli login
to obtain anid_token
via implicit flow/grant-type - Update
faas-cli login
to store an id_token optionally instead of basic-auth credentials - add a new flag perhaps? - Update the various commands which currently add basic-auth credentials to set a header of
Authorization: Bearer {ID_TOKEN}
Test e2e with a test harness like faas-memory or a hacked end-point.
Steps to Reproduce (for bugs)
- Configure OAuth2 for the gateway auth module
- Run
faas-cli login
and see data stored in~/.openfaas/config.yml
- Run
faas-cli up
successfully
Activity