Replies: 1 comment
-
OAuth2-Proxy ProblemCurrently, OAuth2-Proxy can not do the request, as it only looks for the JWT and verifies it. Thus a JWT A much preferable solution would be a direct implementation in the OAuth2-Proxy Go Middleware linked in the OAuth2-Proxy Feature Request: oauth2-proxy/oauth2-proxy#2966. Which has been done for other Auth/ID services. So we can let OAuth-Proxy do the requests to Authentik after only receiving the username + token for m2m, then returning the JWT, storing it as with the other JWTs, and using the regular JWT flow for the m2m requests. client_credentials grant issuesAuthentik offers the OAuth2 A lot of confusion exists around forementioned OAuth2
Documentation Improvements requiredAs @BeryJu mentions in #5860, the documentation needs to be more precise and code examples where to find e.g. the Token and the Client_ID (Application ID or AUD) required for the request. The token is currently separated from the client_credentials grant not workingIn my tests, even if configured in My tiny mistake (HTTP Basic Auth from the issue)Seemingly, I misunderstood a cruicial part in the issue mentioning HTTP Basic Auth in issue #4435 (comment). That part was about Nginx as outpost + Authentik + Authorization header, despite the docs not mentioning this functionality around nginx+BasicAuth either. (No idea about the details!) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The problem with OAuth-Proxy is that it only forwards to the default login page, which works quite well for normal human accounts, but not for m2m.
Currently Authentik's client_grant (for machine-to-machine/m2m/service-to-service) does not seem to work, which could return a JWT being passed down to Oauth2-proxy, which it could verify. As more specified in my second message of today.
Better would be OAuth2-Proxy requesting itself a Token via the Authentik Endpoint using the middleware. So it can only use the username + token. For that Authentik people and OAauth2-Proxy people could work together. To make m2m work with both via each other.
Furthermore, the docs are quite insufficient regarding m2m/service accounts, requesting and using tokens for it.
To setup service accounts and the tokens: Basically, one needs to add a service account, then link it with the provider and then manually add a token and copy it over (its not shown directly, and if the clip board permission is not given it is shown as a weird popup). More over, there are settings to set APP Password or API Token. Then the
/application/o/token/
route is HTTP POST requested eventually returning a JWTaccess_token
or a error messageinvalid grant
.How can we fix that? While it seems to be an issue on oauth2-proxy side. The benefit of usability, security, stability & ergonomics (instead of implementing Authentik calls in every backend service) outweights all our other efforts
OAuth2-Proxy Issues regarding M2M & the Feature request
Authentik's client_credentials grant issues
Beta Was this translation helpful? Give feedback.
All reactions