openfaas / openfaas/faas-cli

Support for OpenID based authentication

Open
#629 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
816
Forks
230
Avg merge
6h 4m
Merged PRs (30d)
1

Description

Support for OpenID based authentication

why open id ?

  1. enterprise standard to support variety of user flows.
  2. connect various to various identity broker like github, ldap
  3. All major languages have open id packages

Openfaas currently supports basic authentication. If it has to support openid based auth either

  1. gateway has to be changed
  2. proxy in front of gateway

To get started we can just have proxy like keycloak gatekeeper in front of openfaas gateway and proxy all requests through it. (No change needed on the gateway)

So what are the changes needed ?

3 ways to connect to openfaas gateway

  1. ui
  2. api
  3. cli

ui - we can use redirect flow, which will redirect to openid providers ui and can login from there
api - bearer token in header
cli - cli is the one which needs change. Need a way to pass bearer token

my proposal

add functionality to the login, similar to openshift login (oc login)

For example

faas login -u -p --gateway=https://openfaasgateway --well-know-url=openidurl client=openidclient

  • once logged in the open id token can be stores in the config file.
  • every request to gateway made with the token in the header
  • once the token expires , alert for login again

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing faas login command and the CLI's configuration and gateway-request handling. The issue proposes OpenID login, token storage, bearer-token requests, and expiry handling, but the gateway-versus-proxy approach and exact scope still need to be decided before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.