Commit c6c75543 authored by Sebastian Wendel's avatar Sebastian Wendel Committed by Dave Cridland

Added the missing frontend integration to use LDAP StartTLS connections.

Referring to the patch from danm:
https://igniterealtime.org/issues/browse/OF-66
parent 17c6c719
...@@ -1300,6 +1300,8 @@ setup.ldap.server.connection_pool=Use Connection Pool ...@@ -1300,6 +1300,8 @@ setup.ldap.server.connection_pool=Use Connection Pool
setup.ldap.server.connection_pool_help=Connection Pooling. Default is 'Yes' setup.ldap.server.connection_pool_help=Connection Pooling. Default is 'Yes'
setup.ldap.server.ssl=Use SSL setup.ldap.server.ssl=Use SSL
setup.ldap.server.ssl_help=Enable SSL connections to your LDAP server, default port is usually 636 setup.ldap.server.ssl_help=Enable SSL connections to your LDAP server, default port is usually 636
setup.ldap.server.starttls=Verwende StartTLS
setup.ldap.server.starttls_help=Verwende StartTLS Verbindungen zu deinem LDAP server, der standard port ist normalerweise 389
setup.ldap.server.debug=Enable Debug setup.ldap.server.debug=Enable Debug
setup.ldap.server.debug_help=Write trace information about LDAP connections to System.out setup.ldap.server.debug_help=Write trace information about LDAP connections to System.out
setup.ldap.server.referral=Follow Referrals setup.ldap.server.referral=Follow Referrals
......
...@@ -2016,6 +2016,8 @@ setup.ldap.server.connection_pool=Use Connection Pool ...@@ -2016,6 +2016,8 @@ setup.ldap.server.connection_pool=Use Connection Pool
setup.ldap.server.connection_pool_help=Connection Pooling. Default is 'Yes' setup.ldap.server.connection_pool_help=Connection Pooling. Default is 'Yes'
setup.ldap.server.ssl=Use SSL setup.ldap.server.ssl=Use SSL
setup.ldap.server.ssl_help=Enable SSL connections to your LDAP server, default port is usually 636 setup.ldap.server.ssl_help=Enable SSL connections to your LDAP server, default port is usually 636
setup.ldap.server.starttls=Use StartTLS
setup.ldap.server.starttls_help=Enable StartTLS connections to your LDAP server, default port is usually 389
setup.ldap.server.debug=Enable Debug setup.ldap.server.debug=Enable Debug
setup.ldap.server.debug_help=Write trace information about LDAP connections to System.out setup.ldap.server.debug_help=Write trace information about LDAP connections to System.out
setup.ldap.server.referral=Follow Referrals setup.ldap.server.referral=Follow Referrals
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
String adminPassword; String adminPassword;
boolean connectionPoolEnabled = true; boolean connectionPoolEnabled = true;
boolean sslEnabled = false; boolean sslEnabled = false;
boolean startTlsEnabled = false;
boolean debugEnabled = false; boolean debugEnabled = false;
boolean referralsEnabled = false; boolean referralsEnabled = false;
boolean aliasReferralsEnabled = true; boolean aliasReferralsEnabled = true;
...@@ -47,6 +48,7 @@ ...@@ -47,6 +48,7 @@
connectionPoolEnabled = connectionPoolEnabled =
ParamUtils.getBooleanParameter(request, "connectionpool", connectionPoolEnabled); ParamUtils.getBooleanParameter(request, "connectionpool", connectionPoolEnabled);
sslEnabled = ParamUtils.getBooleanParameter(request, "ssl", sslEnabled); sslEnabled = ParamUtils.getBooleanParameter(request, "ssl", sslEnabled);
startTlsEnabled = ParamUtils.getBooleanParameter(request, "starttls", startTlsEnabled);
debugEnabled = ParamUtils.getBooleanParameter(request, "debug", debugEnabled); debugEnabled = ParamUtils.getBooleanParameter(request, "debug", debugEnabled);
referralsEnabled = ParamUtils.getBooleanParameter(request, "referrals", referralsEnabled); referralsEnabled = ParamUtils.getBooleanParameter(request, "referrals", referralsEnabled);
aliasReferralsEnabled = ParamUtils.getBooleanParameter(request, "aliasreferrals", aliasReferralsEnabled); aliasReferralsEnabled = ParamUtils.getBooleanParameter(request, "aliasreferrals", aliasReferralsEnabled);
...@@ -68,6 +70,7 @@ ...@@ -68,6 +70,7 @@
settings.put("ldap.connectionPoolEnabled", settings.put("ldap.connectionPoolEnabled",
Boolean.toString(connectionPoolEnabled)); Boolean.toString(connectionPoolEnabled));
settings.put("ldap.sslEnabled", Boolean.toString(sslEnabled)); settings.put("ldap.sslEnabled", Boolean.toString(sslEnabled));
settings.put("ldap.startTlsEnabled", Boolean.toString(startTlsEnabled));
settings.put("ldap.debugEnabled", Boolean.toString(debugEnabled)); settings.put("ldap.debugEnabled", Boolean.toString(debugEnabled));
settings.put("ldap.autoFollowReferrals", Boolean.toString(referralsEnabled)); settings.put("ldap.autoFollowReferrals", Boolean.toString(referralsEnabled));
settings.put("ldap.autoFollowAliasReferrals", Boolean.toString(aliasReferralsEnabled)); settings.put("ldap.autoFollowAliasReferrals", Boolean.toString(aliasReferralsEnabled));
...@@ -91,6 +94,7 @@ ...@@ -91,6 +94,7 @@
manager.setAdminPassword(adminPassword); manager.setAdminPassword(adminPassword);
manager.setConnectionPoolEnabled(connectionPoolEnabled); manager.setConnectionPoolEnabled(connectionPoolEnabled);
manager.setSslEnabled(sslEnabled); manager.setSslEnabled(sslEnabled);
manager.setStartTlsEnabled(startTlsEnabled);
manager.setDebugEnabled(debugEnabled); manager.setDebugEnabled(debugEnabled);
manager.setFollowReferralsEnabled(referralsEnabled); manager.setFollowReferralsEnabled(referralsEnabled);
manager.setFollowAliasReferralsEnabled(aliasReferralsEnabled); manager.setFollowAliasReferralsEnabled(aliasReferralsEnabled);
...@@ -105,6 +109,7 @@ ...@@ -105,6 +109,7 @@
xmppSettings.put("ldap.adminPassword", adminPassword); xmppSettings.put("ldap.adminPassword", adminPassword);
xmppSettings.put("ldap.connectionPoolEnabled", Boolean.toString(connectionPoolEnabled)); xmppSettings.put("ldap.connectionPoolEnabled", Boolean.toString(connectionPoolEnabled));
xmppSettings.put("ldap.sslEnabled", Boolean.toString(sslEnabled)); xmppSettings.put("ldap.sslEnabled", Boolean.toString(sslEnabled));
xmppSettings.put("ldap.startTlsEnabled", Boolean.toString(startTlsEnabled));
xmppSettings.put("ldap.debugEnabled", Boolean.toString(debugEnabled)); xmppSettings.put("ldap.debugEnabled", Boolean.toString(debugEnabled));
xmppSettings.put("ldap.autoFollowReferrals", Boolean.toString(referralsEnabled)); xmppSettings.put("ldap.autoFollowReferrals", Boolean.toString(referralsEnabled));
xmppSettings.put("ldap.autoFollowAliasReferrals", Boolean.toString(aliasReferralsEnabled)); xmppSettings.put("ldap.autoFollowAliasReferrals", Boolean.toString(aliasReferralsEnabled));
...@@ -137,6 +142,7 @@ ...@@ -137,6 +142,7 @@
adminPassword = manager.getAdminPassword(); adminPassword = manager.getAdminPassword();
connectionPoolEnabled = manager.isConnectionPoolEnabled(); connectionPoolEnabled = manager.isConnectionPoolEnabled();
sslEnabled = manager.isSslEnabled(); sslEnabled = manager.isSslEnabled();
startTlsEnabled = manager.isStartTlsEnabled();
debugEnabled = manager.isDebugEnabled(); debugEnabled = manager.isDebugEnabled();
referralsEnabled = manager.isFollowReferralsEnabled(); referralsEnabled = manager.isFollowReferralsEnabled();
aliasReferralsEnabled = manager.isFollowAliasReferralsEnabled(); aliasReferralsEnabled = manager.isFollowAliasReferralsEnabled();
...@@ -304,6 +310,20 @@ ...@@ -304,6 +310,20 @@
<input type="radio" name="ssl" value="false" <% if (!sslEnabled) { %>checked <% } %>> <input type="radio" name="ssl" value="false" <% if (!sslEnabled) { %>checked <% } %>>
</td> </td>
</tr> </tr>
<tr>
<td class="jive-advancedLabel" nowrap>
<fmt:message key="setup.ldap.server.starttls" />:
</td>
<td class="jive-advancedDesc jive-advancedBorderBottom jive-advancedBorderRight">
<fmt:message key="setup.ldap.server.starttls_help" />
</td>
<td class="jive-advancedBorderBottom jive-advancedBorderRight" align="center">
<input type="radio" name="starttls" value="true" <% if (startTlsEnabled) { %>checked <% } %>>
</td>
<td class="jive-advancedBorderBottom" align="center">
<input type="radio" name="starttls" value="false" <% if (!startTlsEnabled) { %>checked <% } %>>
</td>
</tr>
<tr> <tr>
<td class="jive-advancedLabel" nowrap> <td class="jive-advancedLabel" nowrap>
<fmt:message key="setup.ldap.server.debug" />: <fmt:message key="setup.ldap.server.debug" />:
......
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