Description
This follows after #3913, which is a really nice article about pre-auth and X509. I still have 2 things I'd like to improve:
-
1) Near the end of the article, we use
your_user_provider
in the code example as the user provider. Below, I think we should explicitly mention this string again. For example:your_user_provider
is the name of your user provider, which is responsible for taking the username and turning it into a User object. For more information on creating or configuring a user provider, see... -
2) I don't think our note on
SSL_CLIENT_S_DN
is correct. See my note about this value (second paragraph) in this comment: [Cookbook][Security] Added doc for x509 pre authenticated listener #3913 (comment). Basically, it appears that this value is never used during authentication (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php#L63) and is not available later to the user on the authenticated token. So, I'm not sure at all what this "credentials" is used for. It could even be a code bug.