spring-projects / spring-projects/spring-security

Authentication schema should be case insensitive

Open
#4,144 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Summary

In both BasicAuthenticationFilter and DigestAuthenticationFilter the schema is compared case sensitive.

but

According to rfc7235 authentication schema should be case-insensitive.

Wording is a bit ambiguous but I'm also seeing similar changes to other projects:
jboss
rails

Actual Behavior

Authentication BASIC or Authentication basic won't work.

Expected Behavior

Authentication BASIC, Authentication Basic, Authentication basic, Authentication BaSiC should all work.

Version

All versions are affected.

I can create a PR if needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the schema handling in web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationFilter.java around line 157 and DigestAuthenticationFilter.java around line 125. Check the RFC 7235 requirement and existing authentication filter tests; done means BASIC, Basic, basic, and mixed-case authentication schemas are accepted by both filters.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.