SAML; Dashboard

This commit is contained in:
garrettmills
2020-05-03 20:16:54 -05:00
parent e3ecfb0d37
commit c389e151b5
1778 changed files with 148410 additions and 82 deletions

View File

@@ -2,6 +2,9 @@ const Unit = require('libflitter/Unit')
const LDAP = require('ldapjs')
const Validator = require('email-validator')
// TODO support logging ALL ldap requests when in DEBUG, not just routed ones
// TODO need to support LDAP server auto-discovery/detection features
class LDAPServerUnit extends Unit {
static get name() {
return 'ldap_server'
@@ -17,9 +20,7 @@ class LDAPServerUnit extends Unit {
* @returns {object}
*/
standard_format() {
return {
skipSpace: true,
}
return this.configs.get('ldap:server.format')
}
/**
@@ -30,6 +31,10 @@ class LDAPServerUnit extends Unit {
return this.build_dn(this.config.schema.authentication_base)
}
group_dn() {
return this.build_dn(this.config.schema.group_base)
}
/**
* Get the anonymous DN.
* @returns {ldap/DN}
@@ -67,7 +72,6 @@ class LDAPServerUnit extends Unit {
*/
async go(app) {
this.config = this.configs.get('ldap:server')
this.app.di().container.register_singleton('ldap_dn_format', this.standard_format())
const server_config = {}
// If Flitter is configured to use an SSL certificate,