Skip to content

Feature: Support OAuth2/OIDC and Bearer token #647

Open
@alexellis

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 an id_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)

  1. Configure OAuth2 for the gateway auth module
  2. Run faas-cli login and see data stored in ~/.openfaas/config.yml
  3. Run faas-cli up successfully

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions