diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-08-01 12:56:10 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-08-01 17:13:58 +0200 |
commit | 184d15cc068def96972c88a4d4a80336fe13bc88 (patch) | |
tree | b7630cf4cb5fe6949b61ad357db9f1ae942bc188 /nixos/modules/services/security | |
parent | b6fbd87328f8eabd82d65cc8f75dfb74341b0ace (diff) | |
download | nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.tar nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.tar.gz nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.tar.bz2 nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.tar.lz nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.tar.xz nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.tar.zst nixlib-184d15cc068def96972c88a4d4a80336fe13bc88.zip |
kanidm: 1.1.0-alpha.12 -> 1.1.0-beta.13
https://github.com/kanidm/kanidm/releases/tag/v1.1.0-beta.13 The kanidmd process now creates a unix socket, over which admin tasks can be done, without having to shut kanidm down first. The kanidm_unixd process now wants access to /etc/shadow and /etc/group, so it can rule out collisions with the host system.
Diffstat (limited to 'nixos/modules/services/security')
-rw-r--r-- | nixos/modules/services/security/kanidm.nix | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/nixos/modules/services/security/kanidm.nix b/nixos/modules/services/security/kanidm.nix index cea2a56bdcd1..6fb9f71a489e 100644 --- a/nixos/modules/services/security/kanidm.nix +++ b/nixos/modules/services/security/kanidm.nix @@ -122,8 +122,8 @@ in }; log_level = lib.mkOption { description = lib.mdDoc "Log level of the server."; - default = "default"; - type = lib.types.enum [ "default" "verbose" "perfbasic" "perffull" ]; + default = "info"; + type = lib.types.enum [ "info" "debug" "trace" ]; }; role = lib.mkOption { description = lib.mdDoc "The role of this server. This affects the replication relationship and thereby available features."; @@ -236,17 +236,23 @@ in { StateDirectory = "kanidm"; StateDirectoryMode = "0700"; + RuntimeDirectory = "kanidmd"; ExecStart = "${pkgs.kanidm}/bin/kanidmd server -c ${serverConfigFile}"; User = "kanidm"; Group = "kanidm"; + BindPaths = [ + # To create the socket + "/run/kanidmd:/run/kanidmd" + ]; + AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ]; # This would otherwise override the CAP_NET_BIND_SERVICE capability. PrivateUsers = lib.mkForce false; # Port needs to be exposed to the host network PrivateNetwork = lib.mkForce false; - RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ]; + RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" ]; TemporaryFileSystem = "/:ro"; } ]; @@ -273,6 +279,8 @@ in "-/etc/static/kanidm" "-/etc/ssl" "-/etc/static/ssl" + "-/etc/passwd" + "-/etc/group" ]; BindPaths = [ # To create the socket @@ -327,6 +335,9 @@ in # These paths are hardcoded environment.etc = lib.mkMerge [ + (lib.mkIf cfg.enableServer { + "kanidm/server.toml".source = serverConfigFile; + }) (lib.mkIf options.services.kanidm.clientSettings.isDefined { "kanidm/config".source = clientConfigFile; }) |