From d1dd1f195bac97449048ccf318bbc4f5a7254eb8 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Fri, 24 Apr 2020 00:29:49 -0400 Subject: [PATCH] fix: ldap allow disable cert check + icon --- client/components/admin/admin-analytics.vue | 8 ++++---- client/components/admin/admin-auth.vue | 8 ++++---- client/components/admin/admin-search.vue | 8 ++++---- client/components/admin/admin-storage.vue | 8 ++++---- .../modules/authentication/ldap/authentication.js | 1 + server/modules/authentication/ldap/definition.yml | 15 ++++++++++----- 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/client/components/admin/admin-analytics.vue b/client/components/admin/admin-analytics.vue index 5960db81..d7196744 100644 --- a/client/components/admin/admin-analytics.vue +++ b/client/components/admin/admin-analytics.vue @@ -63,7 +63,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -74,7 +74,7 @@ :label='cfg.value.title' v-model='cfg.value.value' color='primary' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint inset @@ -85,7 +85,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -96,7 +96,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' diff --git a/client/components/admin/admin-auth.vue b/client/components/admin/admin-auth.vue index 1a9768a3..27f1cd72 100644 --- a/client/components/admin/admin-auth.vue +++ b/client/components/admin/admin-auth.vue @@ -99,7 +99,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -110,7 +110,7 @@ :label='cfg.value.title' v-model='cfg.value.value' color='primary' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint inset @@ -121,7 +121,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -132,7 +132,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' diff --git a/client/components/admin/admin-search.vue b/client/components/admin/admin-search.vue index 1ead08ba..c5c0023a 100644 --- a/client/components/admin/admin-search.vue +++ b/client/components/admin/admin-search.vue @@ -55,7 +55,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -66,7 +66,7 @@ :label='cfg.value.title' v-model='cfg.value.value' color='primary' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint inset @@ -77,7 +77,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -88,7 +88,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' diff --git a/client/components/admin/admin-storage.vue b/client/components/admin/admin-storage.vue index 236f29ea..8ff12672 100644 --- a/client/components/admin/admin-storage.vue +++ b/client/components/admin/admin-storage.vue @@ -111,7 +111,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -122,7 +122,7 @@ :label='cfg.value.title' v-model='cfg.value.value' color='primary' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint inset @@ -133,7 +133,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' @@ -144,7 +144,7 @@ :key='cfg.key' :label='cfg.value.title' v-model='cfg.value.value' - prepend-icon='mdi-settings-box' + prepend-icon='mdi-cog-box' :hint='cfg.value.hint ? cfg.value.hint : ""' persistent-hint :class='cfg.value.hint ? "mb-2" : ""' diff --git a/server/modules/authentication/ldap/authentication.js b/server/modules/authentication/ldap/authentication.js index 5b79552a..5c57bec6 100644 --- a/server/modules/authentication/ldap/authentication.js +++ b/server/modules/authentication/ldap/authentication.js @@ -19,6 +19,7 @@ module.exports = { searchBase: conf.searchBase, searchFilter: conf.searchFilter, tlsOptions: (conf.tlsEnabled) ? { + rejectUnauthorized: conf.verifyTLSCertificate, ca: [ fs.readFileSync(conf.tlsCertPath) ] diff --git a/server/modules/authentication/ldap/definition.yml b/server/modules/authentication/ldap/definition.yml index bbc3c81a..658226b3 100644 --- a/server/modules/authentication/ldap/definition.yml +++ b/server/modules/authentication/ldap/definition.yml @@ -42,32 +42,37 @@ props: type: Boolean default: false order: 6 + verifyTLSCertificate: + title: Verify TLS Certificate + type: Boolean + default: true + order: 7 tlsCertPath: title: TLS Certificate Path type: String hint: Absolute path to the TLS certificate on the server. - order: 7 + order: 8 mappingUID: title: Unique ID Field Mapping type: String default: 'uid' hint: The field storing the user unique identifier. Usually "uid" or "sAMAccountName". - order: 8 + order: 20 mappingEmail: title: Email Field Mapping type: String default: 'mail' hint: The field storing the user email. Usually "mail". - order: 9 + order: 21 mappingDisplayName: title: Display Name Field Mapping type: String default: 'displayName' hint: The field storing the user display name. Usually "displayName" or "cn". - order: 10 + order: 22 mappingPicture: title: Avatar Picture Field Mapping type: String default: 'jpegPhoto' hint: The field storing the user avatar picture. Usually "jpegPhoto" or "thumbnailPhoto". - order: 11 + order: 23