spring-projects / spring-projects/spring-security
SEC-1892: Make the client certificate authentication enterprise ready
Open
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:
- It is common case when the client certificate authentication performed by a front end web server (IIS or Apache)
- It is common case when the user identifier is stored in the Subject Alternative Name of the client certificate.
- 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: - 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) - Use SubjectAlternativeNameRetriever and SubjectDnRetriever to extract the user identifier from Subject Alternative Name or Subject respectively
- 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: - Will update the configuration schema (with your help)
- Will update AuthenticationConfigBuilder to create SubjectAlternativeNameRetriever or SubjectDnRetriever depends on the configuration
- Will change names from *Retriever to *Extractor
- Will create the first draft of the documentation
Waiting for your comments.
Best regards,
Michael
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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