add assertion to avoid issue with authelia and ldap
This commit is contained in:
parent
c7b8529502
commit
cf944bee37
2 changed files with 7 additions and 1 deletions
|
|
@ -115,7 +115,7 @@
|
|||
subdomain = "auth";
|
||||
ssl = config.shb.certs.certs.selfsigned.n;
|
||||
ldapPort = config.shb.ldap.ldapPort;
|
||||
ldapHostname = "ldap://127.0.0.1";
|
||||
ldapHostname = "127.0.0.1";
|
||||
dcdomain = config.shb.ldap.dcdomain;
|
||||
|
||||
secrets = {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ let
|
|||
fqdnWithPort = if isNull cfg.port then fqdn else "${fqdn}:${toString cfg.port}";
|
||||
|
||||
autheliaCfg = config.services.authelia.instances.${fqdn};
|
||||
|
||||
inherit (lib) hasPrefix;
|
||||
in
|
||||
{
|
||||
options.shb.authelia = {
|
||||
|
|
@ -309,6 +311,10 @@ in
|
|||
assertion = builtins.length cfg.oidcClients > 0;
|
||||
message = "Must have at least one oidc client otherwise Authelia refuses to start.";
|
||||
}
|
||||
{
|
||||
assertion = !(hasPrefix "ldap://" cfg.ldapHostname);
|
||||
message = "LDAP hostname should be the bare host name and not start with ldap://";
|
||||
}
|
||||
];
|
||||
|
||||
# Overriding the user name so we don't allow any weird characters anywhere. For example, postgres users do not accept the '.'.
|
||||
|
|
|
|||
Loading…
Reference in a new issue