From 12a8626ef7490d63bb88d2572b460a4a2c973cb3 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sun, 15 Oct 2017 20:01:16 +0200 Subject: [PATCH] Make per_subdomain_methods optional in configuration file --- config.template.yml | 4 +++- config.test.yml | 15 +++++++++++++++ server/src/lib/configuration/Configuration.d.ts | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/config.template.yml b/config.template.yml index 846f7a8c8..83f1fed72 100644 --- a/config.template.yml +++ b/config.template.yml @@ -55,8 +55,10 @@ ldap: # # Note: by default a domain uses "two_factor" method. # -# Note: 'overriden_methods' is a dictionary where keys must be subdomains and +# Note: 'per_subdomain_methods' is a dictionary where keys must be subdomains and # values must be one of the two possible methods. +# +# Note: 'per_subdomain_methods' is optional. authentication_methods: default_method: two_factor per_subdomain_methods: diff --git a/config.test.yml b/config.test.yml index d2a9b7a46..ca70f5275 100644 --- a/config.test.yml +++ b/config.test.yml @@ -47,6 +47,21 @@ ldap: user: cn=admin,dc=example,dc=com password: password +# Authentication methods +# +# Authentication methods can be defined per subdomain. +# There are currently two available methods: "basic_auth" and "two_factor" +# +# Note: by default a domain uses "two_factor" method. +# +# Note: 'per_subdomain_methods' is a dictionary where keys must be subdomains and +# values must be one of the two possible methods. +# +# Note: 'per_subdomain_methods' is optional. +authentication_methods: + default_method: two_factor + per_subdomain_methods: + basicauth.test.local: basic_auth # Access Control # diff --git a/server/src/lib/configuration/Configuration.d.ts b/server/src/lib/configuration/Configuration.d.ts index 802572b2f..3b6b0c2ae 100644 --- a/server/src/lib/configuration/Configuration.d.ts +++ b/server/src/lib/configuration/Configuration.d.ts @@ -116,7 +116,7 @@ declare type AuthenticationMethodPerSubdomain = { [subdomain: string]: Authentic export interface AuthenticationMethodsConfiguration { default_method: AuthenticationMethod; - per_subdomain_methods: AuthenticationMethodPerSubdomain; + per_subdomain_methods?: AuthenticationMethodPerSubdomain; } export interface UserConfiguration {