nixpkgs/nixos/modules
aszlig 227229653a
nixos/taskserver: Add a nixos-taskdctl command
It's a helper for NixOS systems to make it easier to handle CA
certificate signing, similar to what taskd provides but comes preseeded
with the values from the system configuration.

The tool is very limited at the moment and only allows to *add*
organisations, users and groups. Deletion and suspension however is much
simpler to implement, because we don't need to handle certificate
signing.

Another limitation is that we don't take into account whether
certificates and keys are already set in the system configuration and if
they're set it will fail spectacularly.

For passing the commands to the taskd command, we're using a small C
program which does setuid() and setgid() to the Taskserver user and
group, because runuser(1) needs PAM (quite pointless if you're already
root) and su(1) doesn't allow for setting the group and setgid()s to the
default group of the user, so it even doesn't work in conjunction with
sg(1).

In summary, we now have a shiny nixos-taskdctl command, which lets us do
things like:

nixos-taskdctl add-org NixOS
nixos-taskdctl add-user NixOS alice
nixos-taskdctl export-user NixOS alice

The last command writes a series of shell commands to stdout, which then
can be imported on the client by piping it into a shell as well as doing
it for example via SSH:

ssh root@server nixos-taskdctl export-user NixOS alice | sh

Of course, in terms of security we need to improve this even further so
that we generate the private key on the client and just send a CSR to
the server so that we don't need to push any secrets over the wire.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-04-05 18:53:31 +02:00
..
config pulseaudio nixos module: run as systemd user service instead 2016-04-02 23:18:22 +08:00
hardware opengl.extraPackages32: pkgsi686Linux in example 2016-03-26 00:50:56 +11:00
i18n/inputMethod fcitx: show available engines in module description 2016-02-28 07:12:55 -06:00
installer nixos-generate-config.pl: correct path for broadcom-43xx 2016-03-31 23:47:20 +01:00
misc nixos/ids: Rename uid and add gid for "taskd" 2016-04-05 18:53:31 +02:00
profiles Fix the boot-ec2-config test 2016-03-30 22:22:40 +02:00
programs ssh: Fix support for ssh-dss host keys 2016-04-01 15:54:52 +02:00
security fix installer tests #13559 2016-03-12 20:19:40 +00:00
services nixos/taskserver: Add a nixos-taskdctl command 2016-04-05 18:53:31 +02:00
system Revert "initrd: Use modprobe from busybox" 2016-04-01 17:39:09 +02:00
tasks Remove setting non-existent sysctl options 2016-03-15 17:44:30 +01:00
testing test-instrumentation.nix: Only clear $PAGER in the backdoor shell 2016-02-23 11:56:09 +01:00
virtualisation Add 16.03 AMIs 2016-04-05 11:25:12 +02:00
module-list.nix Add taskserver to module-list 2016-04-05 18:53:31 +02:00
rename.nix services.xserver.startGnuPGAgent: remove obsolete NixOS option 2016-03-18 11:06:31 +01:00