1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/nixos/modules/services
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
..
amqp nixos manuals: bring back package references 2016-02-03 14:47:14 +01:00
audio Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
backup Merge pull request #14405 from jerith666/crashplan-46-r2 2016-04-02 22:06:40 +00:00
cluster Fix fleet certfile argument, fixes #11794 2015-12-22 01:24:47 +01:00
computing nixos: Provide a defaultText for type = package 2016-02-17 21:12:24 +01:00
continuous-integration/jenkins Configure a default trust store for openssl 2016-02-03 12:42:01 +01:00
databases postgresql: Bump default version to 9.5 2016-02-12 13:20:11 +01:00
desktops nixos: gnome-keyring: fix module description 2015-07-01 02:22:27 +02:00
games jobs -> systemd.services 2016-01-07 06:39:06 +00:00
hardware sane module: add more documentation 2016-02-25 19:36:46 +00:00
logging awstats: init at 7.4, including a simple service 2016-03-11 10:37:06 +01:00
mail dspam service: run after postgresql to prevent segfaults 2016-03-27 19:23:01 +03:00
misc nixos/taskserver: Add a nixos-taskdctl command 2016-04-05 18:53:31 +02:00
monitoring graphite: fix carbonCache graphiteWeb graphiteApi 2016-03-12 02:02:04 +01:00
network-filesystems services: Add Tahoe-LAFS service. 2016-03-31 14:01:09 -07:00
networking mfi: init at 2.1.11 2016-04-01 02:45:11 -07:00
printing cups service: fix gutenprint update when there's no printers 2016-03-15 21:46:33 +03:00
scheduling jobs -> systemd.services 2016-01-07 06:39:06 +00:00
search elasticsearch2: init at 2.2.0 2016-02-13 15:03:09 +00:00
security clamav: Use freshclam.conf defined by clamav-updater module if enabled 2016-03-04 02:26:44 +01:00
system dbus nixos module: add units for systemd user session 2016-04-02 23:11:57 +08:00
torrent nixos.transmission: whitelist lz4 in AppArmor rules 2016-03-07 21:01:55 +01:00
ttys Merge pull request #10996 from oxij/nixos-label 2016-01-09 20:52:08 +03:00
web-apps pump.io service: init 2015-12-06 13:35:21 +00:00
web-servers uwsgi service: use python.buildEnv, fix PATH 2016-03-27 19:23:01 +03:00
x11 xserver service: add glamoregl for intel drivers 2016-03-29 18:52:04 +03:00