Skip to content

Make Authorization header auth-scheme case-insensitive - #48406

Closed
alimmirk wants to merge 4 commits into
keycloak:mainfrom
alimmirk:fix-auth-scheme-case-insensitivity
Closed

Make Authorization header auth-scheme case-insensitive#48406
alimmirk wants to merge 4 commits into
keycloak:mainfrom
alimmirk:fix-auth-scheme-case-insensitivity

Conversation

@alimmirk

@alimmirk alimmirk commented Apr 23, 2026

Copy link
Copy Markdown

Closes #48387

This PR makes the 'Bearer' and 'DPoP' auth schemes in the Authorization header case-insensitive, as required by RFC 9110, Section 11.1. Previously, Keycloak was strictly case-sensitive for these schemes (especially DPoP).

@alimmirk
alimmirk requested a review from a team as a code owner April 23, 2026 11:46
…itive

Signed-off-by: alimmirk <alim.95@yandex.ru>
@alimmirk
alimmirk force-pushed the fix-auth-scheme-case-insensitivity branch from a7f5651 to f724cde Compare April 23, 2026 11:57
@ahus1 ahus1 changed the title Fix #48387: Make Authorization header auth-scheme case-insensitive Make Authorization header auth-scheme case-insensitive Apr 23, 2026

@stianst stianst left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with supporting case-insensitive headers, but this PR also adds support for case-insensitive token types, which is not needed as the tokens are generated by KC so we know what case they will use. So please remove those changes and focus on what is mentioned in the linked issue.

There is also no tests added here.

@alimmirk

Copy link
Copy Markdown
Author

Closing this PR as the required case-insensitivity changes for the Authorization header have already been integrated into main, and the internal token type checks should remain case-sensitive as requested by @stianst. Thanks for the review!

@alimmirk alimmirk closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authorization Header's auth-scheme should be case-insensitive

2 participants