Okay, set an access filter
This commit is contained in:
parent
faf888ddaf
commit
58b406465c
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }@toplevel:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
@ -65,6 +65,13 @@ in {
|
||||||
default = 4389;
|
default = 4389;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
access-group = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = "Group to which users must belong for access.";
|
||||||
|
default = let ldapCfg = toplevel.config.fudo.paris-container.ldap;
|
||||||
|
in "cn=shell,${ldapCfg.group-ou},${ldapCfg.base}";
|
||||||
|
};
|
||||||
|
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description =
|
description =
|
||||||
|
@ -340,6 +347,8 @@ in {
|
||||||
ldap_group_object_class = "group";
|
ldap_group_object_class = "group";
|
||||||
ldap_group_name = "cn";
|
ldap_group_name = "cn";
|
||||||
|
|
||||||
|
ldap_access_filter = "memberOf=${cfg.ldap.access-group}";
|
||||||
|
|
||||||
ldap_default_bind_dn = cfg.ldap.bind-dn;
|
ldap_default_bind_dn = cfg.ldap.bind-dn;
|
||||||
ldap_default_authtok = "$LDAP_DEFAULT_AUTHTOKEN";
|
ldap_default_authtok = "$LDAP_DEFAULT_AUTHTOKEN";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue