Hello,
Ad i’ve contacted matt a few times about this and don’t know what is to become of the modification i did, i’am opening a thread here.
I’am actualy trying to have a nicer implementation of Jabber at my work (we are actualy running jabberd1.4 on a local server). The nicer means to integrate it with th AD ldap and allow users to simply user jabber. This also means to have the mail as jid (no big security problem as the server is only internal).
So my first problem is to authenticate with the e-mail, wich i resolved by modifying openfire. To do this i set the attruid to the mail field of the AD ldap and add a property to indicate to consider this as an e-mail (jid*@*domain). All these modifications takes places in the org.jivesoftware.openfire.ldap.LdapManager class (see bellow)
Changes to LdapManager.java:
…
* <li>ldap.usernameField – default value is “uid”.</li>
- <li>ldap.usernameIsMail</li>
* <li>ldap.nameField – default value is “cn”.</li>
…
…
private String usernameField;
private boolean usernameIsMail = false;
private String nameField;
…
…
usernameField = “uid”;
-
}+
usernameIsMail = false;
String usernameIsMailStr = properties.get(“ldap.usernameIsMail”);
if (usernameIsMailStr != null) {
usernameIsMail = Boolean.valueOf(usernameIsMailStr);
}
baseDN = properties.get(“ldap.baseDN”);
…
…
+Log.debug("Trying to find a user’s DN based on their username. " + usernameField + ": " + username+
-
+ ", Base DN: " + baseDN + "...");+
-
}+
if (usernameIsMail) {
String xmppdomain = JiveGlobals.getProperty(“xmpp.domain”,"");
if (xmppdomain!="") {
username = username + “@” + xmppdomain;
}
}
DirContext ctx = null;
…
Hope this everybody finds it usefull and additionnaly that it might be integrated in openfire.
Cédric