spring-projects / spring-projects/spring-security

SEC-1892: Make the client certificate authentication enterprise ready

Open
#2,119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: web type: enhancement type: jira
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Michael Furman (Migrated from SEC-1892) said:

Dear Luke,
During my work with our enterprise customers I have found the following:

  1. It is common case when the client certificate authentication performed by a front end web server (IIS or Apache)
  2. It is common case when the user identifier is stored in the Subject Alternative Name of the client certificate.
  3. When the user identifier is stored in the Subject of the client certificate it can be stored in e-mail, CN or in the hold Subject
    See the attached x509Examples.docx
    I recommend to improve the Spring Security client certificate authentication:
  4. Use ClientCertificateRetriever to be able to get X509Certificate from the String attribute
    Note: When authentication is performed by IIS or Apache it can come as the String type (not as X509Certificate type)
  5. Use SubjectAlternativeNameRetriever and SubjectDnRetriever to extract the user identifier from Subject Alternative Name or Subject respectively
  6. The configuration of SubjectAlternativeNameRetriever and SubjectDnRetriever is very simple - the end user need to configure what he / she see in the client certificate window (as in attached examples)
    The attached code already works more than year at production in more than one customer.
    If you will agree for my contribution I will continue the refactoring:
  7. Will update the configuration schema (with your help)
  8. Will update AuthenticationConfigBuilder to create SubjectAlternativeNameRetriever or SubjectDnRetriever depends on the configuration
  9. Will change names from *Retriever to *Extractor
  10. Will create the first draft of the documentation
    Waiting for your comments.
    Best regards,
    Michael

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

The issue names client certificate authentication and AuthenticationConfigBuilder but provides no repository file or test paths. Start by locating those entry points and reviewing the attached x509Examples.docx; completion would span certificate retrieval, configuration schema, builder changes, naming updates, and documentation, subject to maintainer agreement.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.