Feature: Support OAuth2/OIDC and Bearer token
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 816
- Forks
- 230
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 1
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 loginto obtain anid_tokenvia implicit flow/grant-type - Update
faas-cli loginto 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 loginand see data stored in~/.openfaas/config.yml - Run
faas-cli upsuccessfully
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the faas-cli login flow, credential storage in ~/.openfaas/config.yml, and the commands that currently use basic authentication. Review the proposed OAuth2/OIDC flow and test against faas-memory or a hacked endpoint. Done means login can store an id_token and CLI commands can authenticate with a Bearer token, with end-to-end coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100