Configure eXist - LDAP security manager -


i trying configure exist ldap authenticate users , have checked out documentation @ exist ldap security. turns out default configuration supports 3 settings: security.ldap.connection.url (the connection url of ldap server), security.ldap.dn.user(the user list dn), , security.ldap.dn.group (the group list dn).

it doesn't work case because ldap server not enable anonymous queries, means have provide user name/password in order establish connection.

any suggestion on how achieve other enable anonymous queries on ldap server?

thanks, thomas

it seems can implement own context factory , feed exist security.ldap.contextfactory parameter.

the context factory java class used initialize connection directory. can implement context factory initializes connection ad-hoc credentials.

the idea implement class this:

public class mycustomcontextfactory implements initialcontextfactory {    public context getinitialcontext(hashtable env) {      // fetch application dn , password somehow (config file...)     string applicationdn = ...;     string password = ...;      env.put(context.security_authentication, "simple");     env.put(context.security_principal, applicationdn);     env.put(context.security_credentials, password);      return new initialdircontext(env);    } } 

you generate jar file, add in classpath of server, , specify configuration parameter:

security.ldap.contextfactory = your.java.package.name.mycustomcontextfactory 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -