Skip to content

Fixing X509 Principal Extractor regex examples #5770 #5988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The `subject-principal-regex` should contain a single group.
For example the default expression "CN=(.*?)," matches the common name field.
So if the subject name in the certificate is "CN=Jimi Hendrix, OU=...", this will give a user name of "Jimi Hendrix".
The matches are case insensitive.
So "emailAddress=(.?)," will match "[email protected],CN=..." giving a user name "[email protected]".
So "emailAddress=(+.*?+)," will match "[email protected],CN=..." giving a user name "[email protected]".
If the client presents a certificate and a valid username is successfully extracted, then there should be a valid `Authentication` object in the security context.
If no certificate is found, or no corresponding user could be found then the security context will remain empty.
This means that you can easily use X.509 authentication with other options such as a form-based login.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* expression "CN=(.*?)(?:,|$)" matches the common name field. So
* "CN=Jimi Hendrix, OU=..." will give a user name of "Jimi Hendrix".
* <p>
* The matches are case insensitive. So "emailAddress=(.?)," will match
* The matches are case insensitive. So "emailAddress=(.*?)," will match
* "[email protected], CN=..." giving a user name "[email protected]"
*
* @author Luke Taylor
Expand Down