-
Notifications
You must be signed in to change notification settings - Fork 18
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
support OIDC client credentials auth? #324
Comments
This is not really feasible for web apps as client credentials need a client secret, i.e. you'd need to enter client_id and client_secret for every login and then keep the browser open. What's the usecase for a browser app? Usually a refresh token should cover a long enough time span... |
The typical use case is users that use client credentials based machine-to-machine auth for non-interactive workflows, but still want to be able to follow up e.g. batch job progress through the web editor. |
So effectively this would be implemented similar to a username (client ID)/password (client secret) login workflow? At some point we need to upgrade from the deprecated oidc-client-js to oidc-client-ts anyway, but it doesn't support client credentials either: https://github.com/authts/oidc-client-ts So it would need a whole new library and I'm not sure which one would cover all our use cases. So this is a major effort. |
I'm fine with the current assessment that the effort outweighs the added value at the moment. To the user interested in a feature like this:
|
Notes from the recent meeting with @jdries and @soxofaan:
The question really is how often this is really useful for users. Is there a big advantage over the lifetime of a refresh token? Users can simply login again after the refresh token expired. |
An alternative approach to avoid passing tokens over GET requests, which indeed risks exposure through logs, is using POST requests. For example: python client POSTs tokens to some web editor end point, which sends back a short term (one-time) token. Python client then uses this token to build URL to forward user to web editor (with GET request). |
The Web Editir is a static HTML page, so I don't think it can read from POST right now 🤔 |
ah ok nevermind then. I kind of vaguely remember that there was some dynamic component too (e.g. to clear/prime caches), but maybe that was for the hub |
Nothing is impossible, it's just a matter of effort ;-) |
Another train of thought: Interested uses could then run a "personal" instance of the web editor on their own system (e.g. through docker) with an access token that is produced "out of band" in some way (e.g. with a startup script that uses client credentials). |
@soxofaan That would mean the access token would be pretty much valid until it's revoked. Where's the difference just to have a client ID for AuthCode+PKCE that creates such access tokens (or refresh tokens) with infinite validtity time span? |
indeed, but I think that is fine in the solution path where the access token was obtained outside of the scope of the web editor itself.
I'm not completely sure I understand your question here, but with OIDC AuthCode flow the web editor obtains tokens that identify the user, while the with the client credentials flow (as feature-requested here), you get tokens that identify the client, which is a different entity. Client credentials flow is the only way to get to that identity. |
Found a client library that we could potentially migrate to: https://github.com/panva/openid-client |
I'm not sure if this is even remotely feasible, but we recently had several users asking about this, so just putting this here for future reference:
Is it possible to use the openEO web editor with service accounts (which only support the OIDC "client credentials" grant)?
The text was updated successfully, but these errors were encountered: