Replies: 1 comment 2 replies
-
|
Hello @j-kowal I am not interested in such behaviour. The module had it in the past (before version 6.5.0), relaxing it poses no security risk and improves general interop with off the shelf software where basic is default sometimes, post otherwise. It's just these two methods that are interchangeable and it is very much intentional. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello 👋
Currently, in
oidc-provider(tested withv9.1.1), thetoken_endpoint_auth_methodconfigured per client (e.g.,client_secret_basicorclient_secret_post) is not strictly enforced during token requests.Even if a client is registered with:
it is still possible to authenticate using
client_secret_post(i.e., by sending the client ID and secret in the POST body rather than the Authorization header).Upon reviewing the source code
(lib/shared/client_auth.js, it appears that bothclient_secret_basicandclient_secret_postare always added to the allowed methods (ctx.oidc.authorization.methods) regardless of the client's configured method, making these methods effectively interchangeable.Expected Behavior
The server should enforce the authentication method specified in the
client's token_endpoint_auth_method. If a client is configured to useclient_secret_basic, any attempt to authenticate viaclient_secret_post(or any other method) should result in aninvalid_clienterror.Proposal
Update the client authentication logic to only allow the method defined in
client.tokenEndpointAuthMethod(or its default if not set), and reject all others withinvalid_client.I'd be happy to help contribute a patch if you're open to this change.
Thanks for your work on this excellent project! 🙌
Beta Was this translation helpful? Give feedback.
All reactions