LDAP integration with AEM 5.6
Hi,
I managed to integrate LDAP with CQ 5.6 with autocreate="create". However, I believe the documentation also states that IF we only want to authenticate users, we really do not need the Auto-Creation parameters.
My "autocreate='create'" config looks like
com.day.crx {
com.day.crx.core.CRXLoginModule sufficient;
com.day.crx.security.ldap.LDAPLoginModule required
principal_provider.class="com.day.crx.security.ldap.principals.LDAPPrincipalProvider"
host="myldap.server.com"
port="389"
secure="false"
authDn="cn=myCN
authPw="mypassword"
userRoot="dc=server,dc=com"
userFilter="(objectclass=person)"
userIdAttribute="samaccountname"
autocreate="create"
autocreate.user.membership="contributor"
autocreate.user.mail="rep:e-mail"
autocreate.user.cn="rep:fullname"
autocreate.path="direct"
cache.expiration="600"
cache.maxsize="100";
};
Theoretically, if I do not want "autocreate", my config should be
com.day.crx {
com.day.crx.core.CRXLoginModule sufficient;
com.day.crx.security.ldap.LDAPLoginModule required
principal_provider.class="com.day.crx.security.ldap.principals.LDAPPrincipalProvider"
host="myldap.server.com"
port="389"
secure="false"
authDn="cn=myCN
authPw="mypassword"
userRoot="dc=server,dc=com"
userFilter="(objectclass=person)"
userIdAttribute="samaccountname"
cache.expiration="600"
cache.maxsize="100";
};
Assume that I am trying to login as userA. With "autocreate", login is successful. Without "autocreate", login is unsuccesful. The LDAP integration document states that if we set "autocreate=none", token authentication will fail. Therefore, we need to put disableTokenAuth=true. I tried this and my ldap.log file does have "Token Authentication disabled" like messages. However, the authentication attempt will still try to find a token, which never gets created on the server and the error.log keeps throwing "invalid token" errors.
If I disable the token authentication handler via OSGI Configuration, then with my registered authentication handler having only "Day CQ Login Selector" and "HTTP Basic Authentication Handler", login will never be successful. If I further disable "Day CQ Login Selector" and leave only "HTTP Basic Authentication Handler", I find that I can authenticate via AD, access crx/de but can never get to pages like "tools.html" or "projects.html"...
Has anyone managed to get LDAP authentication working with autocreate='none'?
Thank You.