mirror of
https://github.com/sismics/docs.git
synced 2024-11-24 06:37:56 +01:00
Add support for ldaps
This commit is contained in:
parent
c8a67177d8
commit
21c3d7d5f7
@ -53,6 +53,7 @@ public enum ConfigType {
|
||||
LDAP_ENABLED,
|
||||
LDAP_HOST,
|
||||
LDAP_PORT,
|
||||
LDAP_USESSL,
|
||||
LDAP_ADMIN_DN,
|
||||
LDAP_ADMIN_PASSWORD,
|
||||
LDAP_BASE_DN,
|
||||
|
@ -66,6 +66,7 @@ public class LdapAuthenticationHandler implements AuthenticationHandler {
|
||||
LdapConnectionConfig config = new LdapConnectionConfig();
|
||||
config.setLdapHost(ConfigUtil.getConfigStringValue(ConfigType.LDAP_HOST));
|
||||
config.setLdapPort(ConfigUtil.getConfigIntegerValue(ConfigType.LDAP_PORT));
|
||||
config.setUseSsl(ConfigUtil.getConfigBooleanValue(ConfigType.LDAP_USESSL));
|
||||
config.setName(ConfigUtil.getConfigStringValue(ConfigType.LDAP_ADMIN_DN));
|
||||
config.setCredentials(ConfigUtil.getConfigStringValue(ConfigType.LDAP_ADMIN_PASSWORD));
|
||||
|
||||
|
@ -754,6 +754,7 @@ public class AppResource extends BaseResource {
|
||||
response.add("enabled", true)
|
||||
.add("host", ConfigUtil.getConfigStringValue(ConfigType.LDAP_HOST))
|
||||
.add("port", ConfigUtil.getConfigIntegerValue(ConfigType.LDAP_PORT))
|
||||
.add("usessl", ConfigUtil.getConfigBooleanValue(ConfigType.LDAP_USESSL))
|
||||
.add("admin_dn", ConfigUtil.getConfigStringValue(ConfigType.LDAP_ADMIN_DN))
|
||||
.add("admin_password", ConfigUtil.getConfigStringValue(ConfigType.LDAP_ADMIN_PASSWORD))
|
||||
.add("base_dn", ConfigUtil.getConfigStringValue(ConfigType.LDAP_BASE_DN))
|
||||
@ -777,6 +778,7 @@ public class AppResource extends BaseResource {
|
||||
* @apiParam {Boolean} enabled LDAP authentication enabled
|
||||
* @apiParam {String} host LDAP server host
|
||||
* @apiParam {Integer} port LDAP server port
|
||||
* @apiParam {Boolean} use SSL (ldaps)
|
||||
* @apiParam {String} admin_dn Admin DN
|
||||
* @apiParam {String} admin_password Admin password
|
||||
* @apiParam {String} base_dn Base DN
|
||||
@ -791,6 +793,7 @@ public class AppResource extends BaseResource {
|
||||
* @param enabled LDAP authentication enabled
|
||||
* @param host LDAP server host
|
||||
* @param portStr LDAP server port
|
||||
* @param usessl LDAP use SSL (ldaps)
|
||||
* @param adminDn Admin DN
|
||||
* @param adminPassword Admin password
|
||||
* @param baseDn Base DN
|
||||
@ -804,6 +807,7 @@ public class AppResource extends BaseResource {
|
||||
public Response configLdap(@FormParam("enabled") Boolean enabled,
|
||||
@FormParam("host") String host,
|
||||
@FormParam("port") String portStr,
|
||||
@FormParam("usessl") Boolean usessl,
|
||||
@FormParam("admin_dn") String adminDn,
|
||||
@FormParam("admin_password") String adminPassword,
|
||||
@FormParam("base_dn") String baseDn,
|
||||
@ -833,6 +837,7 @@ public class AppResource extends BaseResource {
|
||||
configDao.update(ConfigType.LDAP_ENABLED, Boolean.TRUE.toString());
|
||||
configDao.update(ConfigType.LDAP_HOST, host);
|
||||
configDao.update(ConfigType.LDAP_PORT, portStr);
|
||||
configDao.update(ConfigType.LDAP_USESSL, usessl.toString());
|
||||
configDao.update(ConfigType.LDAP_ADMIN_DN, adminDn);
|
||||
configDao.update(ConfigType.LDAP_ADMIN_PASSWORD, adminPassword);
|
||||
configDao.update(ConfigType.LDAP_BASE_DN, baseDn);
|
||||
|
2027
docs-web/src/main/webapp/package-lock.json
generated
2027
docs-web/src/main/webapp/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -203,15 +203,17 @@
|
||||
<li><a href ng-click="changeLanguage('el')" ng-class="{ 'bg-info': currentLang == 'el' }">Ελληνικά</a></li>
|
||||
<li><a href ng-click="changeLanguage('ru')" ng-class="{ 'bg-info': currentLang == 'ru' }">Pусский</a></li>
|
||||
<li><a href ng-click="changeLanguage('pl')" ng-class="{ 'bg-info': currentLang == 'pl' }">Polski</a></li>
|
||||
<li><a href ng-click="changeLanguage('zh_CN')" ng-class="{ 'bg-info': currentLang == 'zh_CN' }">简体中文</a></li>
|
||||
<li><a href ng-click="changeLanguage('zh_CN')" ng-class="{ 'bg-info': currentLang == 'zh_CN' }">简体中文</a></li>
|
||||
<li><a href ng-click="changeLanguage('zh_TW')" ng-class="{ 'bg-info': currentLang == 'zh_TW' }">繁體中文</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li translate="document.default.footer_sismics"></li>
|
||||
<li><a href="apidoc/">{{ 'document.default.api_documentation' | translate }}</a></li>
|
||||
<li>v{{ app.current_version }}</li>
|
||||
<li><a href="https://stadtfabrikanten.org/impressum">Impressum</a></li>
|
||||
<li><a href="https://stadtfabrikanten.org/datenschutz">Datenschutz</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -278,8 +278,23 @@
|
||||
"menu_vocabularies": "Vokabulareinträge",
|
||||
"menu_configuration": "Einstellungen",
|
||||
"menu_inbox": "Posteingang durchsuchen",
|
||||
"menu_ldap": "LDAP Authentifizierung",
|
||||
"menu_metadata": "Benutzerdefinierte Metadaten",
|
||||
"menu_monitoring": "Überwachung",
|
||||
"ldap": {
|
||||
"title": "LDAP Authentifizierung",
|
||||
"enabled": "LDAP Authentifizierung aktivieren",
|
||||
"host": "LDAP Hostname",
|
||||
"port": "LDAP Port (standardmäßig 389)",
|
||||
"usessl": "Aktiviere SSL (ldaps)",
|
||||
"admin_dn": "Admin DN",
|
||||
"admin_password": "Admin Passwort",
|
||||
"base_dn": "Basis-Such-DN",
|
||||
"filter": "Suchfilter (muss USERNAME enthalten, zum Beispiel \"(uid=USERNAME)\")",
|
||||
"default_email": "Standard-E-Mail für LDAP-Benutzer",
|
||||
"default_storage": "Standard Quota für LDAP-Benutzer",
|
||||
"saved": "LDAP-Konfiguration erfolgreich gespeichert"
|
||||
},
|
||||
"user": {
|
||||
"title": "Benutzerverwaltung",
|
||||
"add_user": "Benutzer hinzufügen",
|
||||
|
@ -286,6 +286,7 @@
|
||||
"enabled": "Enable LDAP authentication",
|
||||
"host": "LDAP hostname",
|
||||
"port": "LDAP port (389 by default)",
|
||||
"usessl": "Aktiviere SSL (ldaps)",
|
||||
"admin_dn": "Admin DN",
|
||||
"admin_password": "Admin password",
|
||||
"base_dn": "Base search DN",
|
||||
|
@ -21,6 +21,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="ldap.enabled" class="form-group" ng-class="{ 'has-error': !form.usessl.$valid && form.$dirty }">
|
||||
<label class="col-sm-2 control-label" for="ldapUseSsl">{{ 'settings.ldap.usessl' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="usessl" type="checkbox" id="ldapUseSsl" ng-model="ldap.usessl" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="ldap.enabled" class="form-group" ng-class="{ 'has-error': !form.adminDn.$valid && form.$dirty }">
|
||||
<label class="col-sm-2 control-label" for="ldapAdminDn">{{ 'settings.ldap.admin_dn' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
@ -85,4 +92,4 @@
|
||||
<div class="alert col-sm-9 alert-success"
|
||||
ng-show="saveResult">
|
||||
{{ saveResult }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -89,15 +89,17 @@
|
||||
<li><a href ng-click="changeLanguage('el')" ng-class="{ 'bg-info': currentLang == 'el' }">Ελληνικά</a></li>
|
||||
<li><a href ng-click="changeLanguage('ru')" ng-class="{ 'bg-info': currentLang == 'ru' }">Pусский</a></li>
|
||||
<li><a href ng-click="changeLanguage('pl')" ng-class="{ 'bg-info': currentLang == 'pl' }">Polski</a></li>
|
||||
<li><a href ng-click="changeLanguage('zh_CN')" ng-class="{ 'bg-info': currentLang == 'zh_CN' }">简体中文</a></li>
|
||||
<li><a href ng-click="changeLanguage('zh_CN')" ng-class="{ 'bg-info': currentLang == 'zh_CN' }">简体中文</a></li>
|
||||
<li><a href ng-click="changeLanguage('zh_TW')" ng-class="{ 'bg-info': currentLang == 'zh_TW' }">繁體中文</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li translate="document.default.footer_sismics"></li>
|
||||
<li><a href="apidoc/">{{ 'document.default.api_documentation' | translate }}</a></li>
|
||||
<li>v{{ app.current_version }}</li>
|
||||
<li><a href="https://stadtfabrikanten.org/impressum">Impressum</a></li>
|
||||
<li><a href="https://stadtfabrikanten.org/datenschutz">Datenschutz</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user