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 @@
## Added key: 'user.read_only'
## Updated key: 'user.properties.info'
## Added key: 'session.details.priority'
## Added section: 'setup.ldap.*'
## Added key: 'muc.service-name'
# Wildfire
......@@ -1330,6 +1331,41 @@ setup.datasource.standard.timeout_info=The time (in days) before connections in
pool are recycled.
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.title=Setup Complete!
......
......@@ -271,7 +271,7 @@ public class LdapGroupProvider implements GroupProvider {
searchControls.setReturningAttributes(new String[] { manager.getGroupNameField() });
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);
for (int i=0; i < startIndex; i++) {
if (answer.hasMoreElements()) {
......@@ -320,6 +320,7 @@ public class LdapGroupProvider implements GroupProvider {
public Collection<String> getGroupNames(JID user) {
return Collections.emptyList();
// TODO: the implementation of this method is broken.
/* XMPPServer server = XMPPServer.getInstance();
String username;
if (!manager.isPosixMode()) {
......@@ -494,7 +495,7 @@ public class LdapGroupProvider implements GroupProvider {
StringBuilder filter = new StringBuilder();
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);
for (int i=0; i < startIndex; i++) {
if (answer.hasMoreElements()) {
......
......@@ -23,67 +23,66 @@
%>
<html>
<head>
<title>Profile Settings - Directory Server</title>
<title><fmt:message key="setup.ldap.server.title" /></title>
<meta name="currentStep" content="3"/>
</head>
<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 -->
<div id="jive-contentBox_stepbar">
<span class="jive-stepbar_step"><strong>1. Connection Settings</strong></span>
<span class="jive-stepbar_step"><em>2. User Mapping</em></span>
<span class="jive-stepbar_step"><em>3. Group Mapping</em></span>
<span class="jive-stepbar_step"><strong>1. <fmt:message key="setup.ldap.connection_settings" /></strong></span>
<span class="jive-stepbar_step"><em>2. <fmt:message key="setup.ldap.user_mapping" /></em></span>
<span class="jive-stepbar_step"><em>3. <fmt:message key="setup.ldap.group_mapping" /></em></span>
</div>
<!-- END jive-contentBox-stepbar -->
<!-- BEGIN jive-contentBox -->
<div class="jive-contentBox jive-contentBox_for-stepbar">
<h2>Step 1 of 3: <span>Connection Settings</span></h2>
<p>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.</p>
<h2><fmt:message key="setup.ldap.step_one" />: <span><fmt:message key="setup.ldap.connection_settings" /></span></h2>
<p><fmt:message key="setup.ldap.server.description" /></p>
<form action="" method="get">
<!-- BEGIN jive-contentBox_bluebox -->
<div class="jive-contentBox_bluebox">
<table border="0" cellpadding="0" cellspacing="2">
<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>
<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">
<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="3">OpenLDAP</option>
<option value="4">Other or Unknown</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>
<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', '<fmt:message key="setup.ldap.server.type_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
</tr>
<tr>
<td align="right">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 align="right">&nbsp;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 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', '<fmt:message key="setup.ldap.server.host_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></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', '<fmt:message key="setup.ldap.server.port_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
</tr>
<tr>
<td align="right">Base DN:</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 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', '<fmt:message key="setup.ldap.server.basedn_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 16000);"></a></span></td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="4"><strong>Authentication:</strong></td>
<td colspan="4"><strong><fmt:message key="setup.ldap.server.auth" />:</strong></td>
</tr>
<tr>
<td align="right">Administrator DN:</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 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', '<fmt:message key="setup.ldap.server.admindn_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', -1);"></a></span></td>
</tr>
<tr>
<td align="right">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 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', '<fmt:message key="setup.ldap.server.password_help" />', 'styleClass', 'jiveTooltip', 'trail', true, 'delay', 300, 'lifetime', 8000);"></a></span></td>
</tr>
</table>
</div>
......@@ -92,7 +91,7 @@
<!-- BEGIN 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>
<!-- END jiveAdvancedButton -->
......@@ -104,8 +103,8 @@
<tr>
<th width="10%"></th>
<th></th>
<th width="50">Yes</th>
<th width="50">No</th>
<th width="50"><fmt:message key="global.yes" /></th>
<th width="50"><fmt:message key="global.no" /></th>
</tr>
</thead>
<tbody>
......
......@@ -75,23 +75,14 @@
</tr>
<tr>
<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>
<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
LDAP protocol. Users and groups are stored in the directory and treated as read-only.
</td>
</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>
<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