-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Misuse of client_credentials and password grant #6139
Comments
I think some of the reason for this is due to https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow using client_credentials in conjunction with I'm not sure how we could implement a spec-accurate version of this, since there would need to be some kind of user in authentik to attribute actions to. The exception should definitely not happen though |
/~https://github.com/goauthentik/authentik/blob/0b5870f16e41d9eb5535b495443dd2b0bb65a19c/authentik/providers/oauth2/views/token.py#L456C1-L469C1 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I don’t think this issue is fully fixed yet, can @BeryJu reopen it? |
I agree and also was kind of confused to see this way of passing credentials ( One quick suggestion (hack?) to make it RFC6749 compliant: concatenate |
Hey guys, Just came across this issue thanks to CommanderStorm's mention.
Would a dynamically created service user + role per outpost (if selected for example) be sufficient or would that be overcomplicating matters? Keycloak seems to have a similar-ish method to assign the |
Hey guys, Apologies for poking, but is there any progress on this one? I'm unable to use Authentik with services like UptimeKuma, which means unfortunately I can't migrate things across. Cheers! |
We're weighing solution with an aim to fix this in the next (March/April) release in a backwards-compatible way. |
grant_type password does not seem to work, still. Getting HTTP 400 when trying to use it. |
Is this fixed? I'm trying to get token with:
and i'm getting:
|
I also can't figure it out how to access an application behind Authentik via OAuth2 |
Partially the Oauth2-Proxy Feature Request is affected by the broken Client Credentials grant FYI. #13173 The whole issue is also mentioned here https://news.ycombinator.com/item?id=39338344 with replies by @BeryJu |
Describe the bug
According to Section 4.3 of RFC6749, the
client_credentials
grant should only take inclient_id
andclient_secret
(if any) as its authentication method and return an access token, however, this is not the case in authentik.According to authentik docs, the "
client_credentials
" grant somehow requires both username and password, which is not whatclient_credentials
grant was originally designed for in the standards.On the other hand, there is this
password
grant defined in Section 4.4 of RFC6749, stating it requires bothusername
andpassword
fields in the request body, which I believe is what authentik is originally targeting for.Expected behavior
client_credentials
to not takeusername
andpassword
as a required field, this grant should be namedpassword
instead.Version and Deployment (please complete the following information):
Additional context
In authentik docs, there's this line that says
However, after testing, it appears that passing in a
grant_type
ofpassword
makes authentik throw the following exceptionWhich is not expected by the documentations
The text was updated successfully, but these errors were encountered: