Skip to content

enable PKCE for confidential dynamic clients - #1682

Open
alari wants to merge 1 commit into
sebadob:mainfrom
alari:dcr-pkce
Open

enable PKCE for confidential dynamic clients#1682
alari wants to merge 1 commit into
sebadob:mainfrom
alari:dcr-pkce

Conversation

@alari

@alari alari commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

DCR clients register confidential by default, but MCP / OAuth 2.1 clients still send a code_challenge, so /authorize rejects them with 'code_challenge' not enabled for this client. Enable PKCE for every dynamic client, not only public ones.

MCP / OAuth 2.1 clients send a code_challenge even when they register
confidential, and /authorize then rejects them with "'code_challenge' not
enabled for this client". enable it for every dynamic client, not only public
ones.

@sebadob sebadob left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not going to happen in this way, as it would break lots of clients. Rauthy is very strict. If PKCE is enabled, it enforces it. This means a confidential client MUST always provide a PKCE challenge if configured, it is not optional.

The only proper solution for this would be a new config variable that allows optional PKCE values for confidential DCR clients only. You cannot implement a fix that only works for one specific client. It must work for all of them. Usually, clients will not send a PKCE challenge when they are confidential. It will very slightly boost the security, but it's also kind of redundant. PKCE was created to make public client logins more safe. In terms of security, you don't really need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants