Commit 19c3de81 authored by Matt Tucker's avatar Matt Tucker Committed by matt

More LDAP work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5421 b35dd754-fafc-0310-a699-88a17e54d16e
parent fa18e71c
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
## Added key: 'user.read_only' ## Added key: 'user.read_only'
## Updated key: 'user.properties.info' ## Updated key: 'user.properties.info'
## Added key: 'session.details.priority' ## Added key: 'session.details.priority'
## Added section: 'setup.ldap.*'
## Added key: 'muc.service-name' ## Added key: 'muc.service-name'
# Wildfire # Wildfire
...@@ -1330,6 +1331,41 @@ setup.datasource.standard.timeout_info=The time (in days) before connections in ...@@ -1330,6 +1331,41 @@ setup.datasource.standard.timeout_info=The time (in days) before connections in
pool are recycled. pool are recycled.
setup.datasource.standard.note=Note, it might take between 30-60 seconds to connect to your database. setup.datasource.standard.note=Note, it might take between 30-60 seconds to connect to your database.
# Setup LDAP pages
setup.ldap.title=Profile Settings
setup.ldap.connection_settings=Connection Settings
setup.ldap.user_mapping=User Mapping
setup.ldap.group_mapping=Group Mapping
setup.ldap.step_one=Step 1 of 3
setup.ldap.server.title=Profile Settings - Directory Server
setup.ldap.server.description=Configure connection settings for your LDAP directory below. All \
fields are required; if you need additional information about a field, hover your mouse over \
the corresponsing help icon.
setup.ldap.server.settings=LDAP Connection Settings
setup.ldap.server.ldap_server=LDAP Server
setup.ldap.server.type=Server Type
setup.ldap.server.type_select=--Select directory server type--
setup.ldap.server.type_other=Other or Unknown
setup.ldap.server.type_help=The type of directory server you are connecting to.
setup.ldap.server.host=Host
setup.ldap.server.host_help=LDAP server host name; e.g. ldap.example.com, etc.
setup.ldap.server.port=Port
setup.ldap.server.port_help=LDAP server port number. The default value is 389.
setup.ldap.server.basedn=Base DN
setup.ldap.server.basedn_help=The starting DN that contains all user accounts. The entire subtree \
under the base DN will be searched for user accounts (unless subtree searching is disabled).
setup.ldap.server.auth=Authentication
setup.ldap.server.admindn=Administrator DN
setup.ldap.server.admindn_help=The DN of a directory administrator. All directory operations will be \
performed with this account. The admin must be able to perform searches and load user records. \
The user does not need to be able to make changes to the directory, as Wildfire treats the \
directory as read-only. If this property is not set, an anonymous login to the server will be attempted.
setup.ldap.server.password=Password
setup.ldap.server.password_help=The password for the directory administrator.
setup.ldap.server.advanced=Advanced Settings
# Setup finished Page # Setup finished Page
setup.finished.title=Setup Complete! setup.finished.title=Setup Complete!
......
...@@ -271,7 +271,7 @@ public class LdapGroupProvider implements GroupProvider { ...@@ -271,7 +271,7 @@ public class LdapGroupProvider implements GroupProvider {
searchControls.setReturningAttributes(new String[] { manager.getGroupNameField() }); searchControls.setReturningAttributes(new String[] { manager.getGroupNameField() });
String filter = MessageFormat.format(manager.getGroupSearchFilter(), "*"); String filter = MessageFormat.format(manager.getGroupSearchFilter(), "*");
// TODO: used paged results is supported by LDAP server. // TODO: used paged results if supported by LDAP server.
NamingEnumeration answer = ctx.search("", filter, searchControls); NamingEnumeration answer = ctx.search("", filter, searchControls);
for (int i=0; i < startIndex; i++) { for (int i=0; i < startIndex; i++) {
if (answer.hasMoreElements()) { if (answer.hasMoreElements()) {
...@@ -320,6 +320,7 @@ public class LdapGroupProvider implements GroupProvider { ...@@ -320,6 +320,7 @@ public class LdapGroupProvider implements GroupProvider {
public Collection<String> getGroupNames(JID user) { public Collection<String> getGroupNames(JID user) {
return Collections.emptyList(); return Collections.emptyList();
// TODO: the implementation of this method is broken.
/* XMPPServer server = XMPPServer.getInstance(); /* XMPPServer server = XMPPServer.getInstance();
String username; String username;
if (!manager.isPosixMode()) { if (!manager.isPosixMode()) {
...@@ -494,7 +495,7 @@ public class LdapGroupProvider implements GroupProvider { ...@@ -494,7 +495,7 @@ public class LdapGroupProvider implements GroupProvider {
StringBuilder filter = new StringBuilder(); StringBuilder filter = new StringBuilder();
filter.append("(").append(manager.getGroupNameField()).append("=").append(query).append(")"); filter.append("(").append(manager.getGroupNameField()).append("=").append(query).append(")");
// TODO: used paged results is supported by LDAP server. // TODO: used paged results if supported by LDAP server.
NamingEnumeration answer = ctx.search("", filter.toString(), searchControls); NamingEnumeration answer = ctx.search("", filter.toString(), searchControls);
for (int i=0; i < startIndex; i++) { for (int i=0; i < startIndex; i++) {
if (answer.hasMoreElements()) { if (answer.hasMoreElements()) {
......
...@@ -23,67 +23,66 @@ ...@@ -23,67 +23,66 @@
%> %>
<html> <html>
<head> <head>
<title>Profile Settings - Directory Server</title> <title><fmt:message key="setup.ldap.server.title" /></title>
<meta name="currentStep" content="3"/> <meta name="currentStep" content="3"/>
</head> </head>
<body> <body>
<h1>Profile Settings <span>- LDAP Connection Settings</span></h1> <h1><fmt:message key="setup.ldap.title" /> <span><fmt:message key="setup.ldap.server.settings" /></span></h1>
<!-- BEGIN jive-contentBox_stepbar --> <!-- BEGIN jive-contentBox_stepbar -->
<div id="jive-contentBox_stepbar"> <div id="jive-contentBox_stepbar">
<span class="jive-stepbar_step"><strong>1. Connection Settings</strong></span> <span class="jive-stepbar_step"><strong>1. <fmt:message key="setup.ldap.connection_settings" /></strong></span>
<span class="jive-stepbar_step"><em>2. User Mapping</em></span> <span class="jive-stepbar_step"><em>2. <fmt:message key="setup.ldap.user_mapping" /></em></span>
<span class="jive-stepbar_step"><em>3. Group Mapping</em></span> <span class="jive-stepbar_step"><em>3. <fmt:message key="setup.ldap.group_mapping" /></em></span>
</div> </div>
<!-- END jive-contentBox-stepbar --> <!-- END jive-contentBox-stepbar -->
<!-- BEGIN jive-contentBox --> <!-- BEGIN jive-contentBox -->
<div class="jive-contentBox jive-contentBox_for-stepbar"> <div class="jive-contentBox jive-contentBox_for-stepbar">
<h2>Step 1 of 3: <span>Connection Settings</span></h2> <h2><fmt:message key="setup.ldap.step_one" />: <span><fmt:message key="setup.ldap.connection_settings" /></span></h2>
<p>Configure connection settings for your LDAP directory below. All fields are required; if you <p><fmt:message key="setup.ldap.server.description" /></p>
need additional information about a field, hover your mouse over the corresponsing help icon.</p>
<form action="" method="get"> <form action="" method="get">
<!-- BEGIN jive-contentBox_bluebox --> <!-- BEGIN jive-contentBox_bluebox -->
<div class="jive-contentBox_bluebox"> <div class="jive-contentBox_bluebox">
<table border="0" cellpadding="0" cellspacing="2"> <table border="0" cellpadding="0" cellspacing="2">
<tr> <tr>
<td colspan="4"><strong>LDAP Server</strong></td> <td colspan="4"><strong><fmt:message key="setup.ldap.server.ldap_server" /></strong></td>
</tr> </tr>
<tr> <tr>
<td align="right">Server Type:</td> <td align="right"><fmt:message key="setup.ldap.server.type" />:</td>
<td colspan="3" nowrap><select name="servertype" size="1" id="jiveLDAPserverType"> <td colspan="3" nowrap><select name="servertype" size="1" id="jiveLDAPserverType">
<option value="1" SELECTED>--Select directory server type--</option> <option value="1" SELECTED><fmt:message key="setup.ldap.server.type_select" /></option>
<option value="2">Active Directory</option> <option value="2">Active Directory</option>
<option value="3">OpenLDAP</option> <option value="3">OpenLDAP</option>
<option value="4">Other or Unknown</option> <option value="4"><fmt:message key="setup.ldap.server.type_other" /></option>
</select><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'The type of directory server you are connecting to.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td> </select><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.type_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
</tr> </tr>
<tr> <tr>
<td align="right">Host:</td> <td align="right"><fmt:message key="setup.ldap.server.host" />:</td>
<td><input type="text" name="host" id="jiveLDAPphost" size="22" maxlength="50"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'LDAP server host name; e.g. ldap.example.com, etc.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td> <td><input type="text" name="host" id="jiveLDAPphost" size="22" maxlength="50"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.host_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
<td align="right">&nbsp;Port:</td> <td align="right">&nbsp;<fmt:message key="setup.ldap.server.port" />:</td>
<td><input type="text" name="port" id="jiveLDAPport" size="5" maxlength="5" value="389"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'LDAP server port number. The default value is 389.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td> <td><input type="text" name="port" id="jiveLDAPport" size="5" maxlength="5" value="389"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.port_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
</tr> </tr>
<tr> <tr>
<td align="right">Base DN:</td> <td align="right"><fmt:message key="setup.ldap.server.basedn" />:</td>
<td colspan="3"><input type="text" name="basedn" id="jiveLDAPbasedn" size="40" maxlength="50"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'The starting DN that contains all user accounts. The entire subtree under the base DN will be searched for user accounts (unless subtree searching is disabled).', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 16000);"></a></span></td> <td colspan="3"><input type="text" name="basedn" id="jiveLDAPbasedn" size="40" maxlength="50"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.basedn_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 16000);"></a></span></td>
</tr> </tr>
<tr><td colspan="4">&nbsp;</td></tr> <tr><td colspan="4">&nbsp;</td></tr>
<tr> <tr>
<td colspan="4"><strong>Authentication:</strong></td> <td colspan="4"><strong><fmt:message key="setup.ldap.server.auth" />:</strong></td>
</tr> </tr>
<tr> <tr>
<td align="right">Administrator DN:</td> <td align="right"><fmt:message key="setup.ldap.server.admindn" />:</td>
<td colspan="3"><input type="text" name="admindn" id="jiveLDAPadmindn" size="40" maxlength="50"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'A directory administrator\'s DN. All directory operations will be performed with this account. The admin must be able to perform searches and load user records. The user does not need to be able to make changes to the directory, as Wildfire treats the directory as read-only. If this property is not set, an anonymous login to the server will be attempted.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td> <td colspan="3"><input type="text" name="admindn" id="jiveLDAPadmindn" size="40" maxlength="50"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.admindn_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr> </tr>
<tr> <tr>
<td align="right">Password:</td> <td align="right"><fmt:message key="setup.ldap.server.password" />:</td>
<td colspan="3"><input type="text" name="adminpwd" id="jiveLDAPadminpwd" size="22" maxlength="30"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', 'The password for the directory administrator.', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td> <td colspan="3"><input type="text" name="adminpwd" id="jiveLDAPadminpwd" size="22" maxlength="30"><span class="jive-setup-helpicon"><a href="" onmouseover="domTT_activate(this, event, 'content', '<fmt:message key="setup.ldap.server.password_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -92,7 +91,7 @@ ...@@ -92,7 +91,7 @@
<!-- BEGIN jiveAdvancedButton --> <!-- BEGIN jiveAdvancedButton -->
<div class="jiveAdvancedButton"> <div class="jiveAdvancedButton">
<a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink">Advanced Settings</a> <a href="#" onclick="togglePanel(jiveAdvanced); return false;" id="jiveAdvancedLink"><fmt:message key="setup.ldap.server.advanced" /></a>
</div> </div>
<!-- END jiveAdvancedButton --> <!-- END jiveAdvancedButton -->
...@@ -104,8 +103,8 @@ ...@@ -104,8 +103,8 @@
<tr> <tr>
<th width="10%"></th> <th width="10%"></th>
<th></th> <th></th>
<th width="50">Yes</th> <th width="50"><fmt:message key="global.yes" /></th>
<th width="50">No</th> <th width="50"><fmt:message key="global.no" /></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
......
...@@ -75,23 +75,14 @@ ...@@ -75,23 +75,14 @@
</tr> </tr>
<tr> <tr>
<td align="center" valign="top"> <td align="center" valign="top">
<input type="radio" name="mode" value="ldap" id="rb02" disabled> <input type="radio" name="mode" value="ldap" id="rb02">
</td> </td>
<td> <td>
<label for="rb02"><b>Directory Server (LDAP) - Coming soon!</b></label><br> <label for="rb02"><b>Directory Server (LDAP)</b></label><br>
Integrate with a directory server such as Active Directory or OpenLDAP using the Integrate with a directory server such as Active Directory or OpenLDAP using the
LDAP protocol. Users and groups are stored in the directory and treated as read-only. LDAP protocol. Users and groups are stored in the directory and treated as read-only.
</td> </td>
</tr> </tr>
<tr>
<td align="center" valign="top">
<input type="radio" name="mode" value="other" id="rb03" disabled>
</td>
<td>
<label for="rb03"><b>Other</b></label><br>
Users and groups are stored in a different external system.
</td>
</tr>
</table> </table>
<br> <br>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment