Skip to content

Commit f252a3c

Browse files
committed
minor #9307 Clarification on search user (woofiewilly, javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- Clarification on search user I had issues with configuration because I misunderstood the configuration for the user provider. I didn't realize that the configured user was actually a static one only used for retrieving information. I also added a clarification for the case that you are getting information anonymously, which was what my situation required. These changes are relevant for Symfony 2.8+ (2.8 being the oldest maintained version I checked) Also, I added a note on keeping the password out of VC by using a parameter, but in Symfony 4 this should be an environment variable instead. I'm not sure how I'm supposed to propose the change for this slight difference once hitting that version. Commits ------- b7a2009 Minor reword f08eab2 Clarification on search user
2 parents ac45677 + b7a2009 commit f252a3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

security/ldap.rst

+9
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ use the ``ldap`` user provider.
173173
provider is used. However, the LDAP component itself does not provide
174174
any escaping yet. Thus, it's your responsibility to prevent LDAP injection
175175
attacks when using the component directly.
176+
177+
.. caution::
178+
179+
The user configured above in the the user provider is only used to retrieve
180+
data. It's a static user defined by its username and password (for improved
181+
security, define the password as an environment variable).
182+
183+
If your LDAP server allows to retrieve information anonymously, you can
184+
set the ``search_dn`` and ``search_password`` options to ``null``.
176185

177186
The ``ldap`` user provider supports many different configuration options:
178187

0 commit comments

Comments
 (0)