-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Support OAuth2/OIDC and Bearer token #647
Comments
OpenFaaS authentication plugins: https://github.com/openfaas/faas/tree/master/auth |
In addition to what is proposed here, could we also include an option to "download credentials" through the UI? |
Hi Andrew, thanks for your suggestion. That is not something that I'd considered for an MVP. My questions would be: What is the workflow there and how does it work with cookie security such as "HttpOnly" where the stored Is this a workflow you've seen elsewhere? Alex |
I haven't looked at the gateway implementation closely yet, but knowing what I do about JWT, OAuth2: If the user has been authorized by the 3rd party, and a JWT has been set as a cookie in the browser (HttpOnly, domain restricted), OpenFaaS gateway I like JWT because we don't have to maintain state/db of token, user relationships which allows us to use the JWT token in the auth header: The end response would be the same in the implicit grant flow, having the gateway/server-side deal only with processing JWT tokens. |
Hi Alex,
|
@itsmurugappan for point 1) this has been implemented and released. Would be great if you could test it out? Advise me here or on Slack how that goes. For point 2) we have implemented the "client credentials" workflow, but I'd be interested to see you try this with keycloak's service accounts and potentially submit a patch if required. https://docs.openfaas.com/reference/cron/#authentication Alex |
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
faas-cli login
to obtain anid_token
via implicit flow/grant-typefaas-cli login
to store an id_token optionally instead of basic-auth credentials - add a new flag perhaps?Authorization: Bearer {ID_TOKEN}
Test e2e with a test harness like faas-memory or a hacked end-point.
Steps to Reproduce (for bugs)
faas-cli login
and see data stored in~/.openfaas/config.yml
faas-cli up
successfullyThe text was updated successfully, but these errors were encountered: