Okay, use LDAP bind-dn

This commit is contained in:
niten 2023-09-29 14:51:54 -07:00
parent b51af05f84
commit b81cd98065

View File

@ -114,16 +114,16 @@ in {
description = "Token with which to authenticate to the Authentik host."; description = "Token with which to authenticate to the Authentik host.";
}; };
# bind-dn = mkOption { bind-dn = mkOption {
# type = str; type = str;
# description = "DN as which to bind with the LDAP server."; description = "DN as which to bind with the LDAP server.";
# }; };
# bind-password-file = mkOption { bind-password-file = mkOption {
# type = str; type = str;
# description = description =
# "File containing password with which to bind with the LDAP server."; "File containing password with which to bind with the LDAP server.";
# }; };
base = mkOption { base = mkOption {
type = str; type = str;
@ -240,8 +240,8 @@ in {
(concatStringsSep "\n" [ (concatStringsSep "\n" [
"uris = ldap://ldap-proxy:3389" "uris = ldap://ldap-proxy:3389"
"ldap_version = 3" "ldap_version = 3"
# "dn = ${cfg.ldap.bind-dn}" "dn = ${cfg.ldap.bind-dn}"
# "dnpass = ${readFile cfg.ldap.bind-password-file}" "dnpass = ${readFile cfg.ldap.bind-password-file}"
"auth_bind = yes" "auth_bind = yes"
"auth_bind_userdn = uid=%u,${cfg.ldap.member-ou},${cfg.ldap.base}" "auth_bind_userdn = uid=%u,${cfg.ldap.member-ou},${cfg.ldap.base}"
"base = ${cfg.ldap.base}" "base = ${cfg.ldap.base}"