mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 05:53:08 +00:00
Added anonymous authentication option to initial bind in LDAPHierarchicalAuthentication
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3448 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -397,10 +397,19 @@ public class LDAPHierarchicalAuthentication
|
|||||||
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
|
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
|
||||||
env.put(javax.naming.Context.PROVIDER_URL, ldap_provider_url);
|
env.put(javax.naming.Context.PROVIDER_URL, ldap_provider_url);
|
||||||
|
|
||||||
// Authenticate
|
if ((adminUser != null) && (!adminUser.trim().equals("")) &&
|
||||||
env.put(javax.naming.Context.SECURITY_AUTHENTICATION, "simple");
|
(adminPassword != null) && (!adminPassword.trim().equals("")))
|
||||||
env.put(javax.naming.Context.SECURITY_PRINCIPAL, adminUser);
|
{
|
||||||
env.put(javax.naming.Context.SECURITY_CREDENTIALS, adminPassword);
|
// Use admin credencials for search// Authenticate
|
||||||
|
env.put(javax.naming.Context.SECURITY_AUTHENTICATION, "simple");
|
||||||
|
env.put(javax.naming.Context.SECURITY_PRINCIPAL, adminUser);
|
||||||
|
env.put(javax.naming.Context.SECURITY_CREDENTIALS, adminPassword);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Use anonymous authentication
|
||||||
|
env.put(javax.naming.Context.SECURITY_AUTHENTICATION, "none");
|
||||||
|
}
|
||||||
|
|
||||||
DirContext ctx = null;
|
DirContext ctx = null;
|
||||||
try
|
try
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
- Fix for SF bug [2086481] xmlui Administrative log in as another eperson
|
- Fix for SF bug [2086481] xmlui Administrative log in as another eperson
|
||||||
- Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly
|
- Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly
|
||||||
|
|
||||||
(Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini)
|
(Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini / Paulo Matos)
|
||||||
- [2057378] Hierarchical LDAP support
|
- [2057378] Hierarchical LDAP support
|
||||||
|
|
||||||
(Paul Needham / Jon Bell / Stuart Lewis)
|
(Paul Needham / Jon Bell / Stuart Lewis)
|
||||||
|
@@ -466,7 +466,8 @@ webui.ldap.autoregister = true
|
|||||||
#ldap.search_scope = 2
|
#ldap.search_scope = 2
|
||||||
|
|
||||||
# The full DN and password of a user allowed to connect to the LDAP server
|
# The full DN and password of a user allowed to connect to the LDAP server
|
||||||
# and search for the DN of the user trying to log in.
|
# and search for the DN of the user trying to log in. If these are not specified,
|
||||||
|
# the initial bind will be performed anonymously.
|
||||||
#ldap.search.user = cn=admin,ou=people,o=myu.edu
|
#ldap.search.user = cn=admin,ou=people,o=myu.edu
|
||||||
#ldap.search.password = password
|
#ldap.search.password = password
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user