mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
hosts/plover/services/idm: add kanidm-unixd and update SSH server config
This commit is contained in:
parent
7522ed5fe4
commit
e07e0273eb
@ -21,6 +21,8 @@ in
|
|||||||
|
|
||||||
services.kanidm = {
|
services.kanidm = {
|
||||||
enableServer = true;
|
enableServer = true;
|
||||||
|
enablePam = true;
|
||||||
|
|
||||||
serverSettings = {
|
serverSettings = {
|
||||||
domain = authDomain;
|
domain = authDomain;
|
||||||
origin = "https://${authDomain}";
|
origin = "https://${authDomain}";
|
||||||
@ -37,6 +39,30 @@ in
|
|||||||
schedule = "0 0 * * *";
|
schedule = "0 0 * * *";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
clientSettings = {
|
||||||
|
uri = "https://${authDomain}";
|
||||||
|
verify_hostnames = true;
|
||||||
|
verify_ca = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
unixSettings = {
|
||||||
|
use_etc_skel = false;
|
||||||
|
pam_allowed_login_groups = [ "kanidm" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Additional SSH server hardening.
|
||||||
|
services.openssh.settings = {
|
||||||
|
PermitEmptyPasswords = "no";
|
||||||
|
GSSAPIAuthentication = "no";
|
||||||
|
KerberosAuthentication = "no";
|
||||||
|
|
||||||
|
# Integrating kanidm-unixd.
|
||||||
|
UsePAM = true;
|
||||||
|
PubkeyAuthentication = true;
|
||||||
|
AuthorizedKeysCommand = "${lib.getExe' config.services.kanidm.package "kanidm_ssh_authorizedkeys"} %u";
|
||||||
|
AuthorizedKeysCommandUser = "nobody";
|
||||||
};
|
};
|
||||||
|
|
||||||
# The kanidm Nix module already sets the certificates directory to be
|
# The kanidm Nix module already sets the certificates directory to be
|
||||||
|
Loading…
Reference in New Issue
Block a user