nixpkgs-suyu/nixos/modules/services/misc
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
..
apache-kafka.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
autofs.nix autofs service: clear lockfile before start 2016-03-14 01:02:40 +03:00
bepasty.nix services.bepasty: buildEnv for creating PYTHONPATH 2016-02-28 01:35:56 +01:00
calibre-server.nix calibre-server service: add type to libraryDir option 2015-10-31 14:21:56 -07:00
canto-daemon.nix canto-daemon: Fix typo and remove TimeoutStopSec 2015-02-08 14:16:17 +00:00
cfdyndns.nix cfdyndns: init at 0.0.1 2016-02-15 12:54:04 -08:00
cgminer.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
confd.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
cpuminer-cryptonight.nix
defaultUnicornConfig.rb fixup! gitlab: 8.0.5 -> 8.5.0, service improvements 2016-02-26 08:31:20 +01:00
devmon.nix devmon: Non-root user, set PATH, require udisks2 2015-11-18 11:30:08 +00:00
dictd.nix jobs -> systemd.services 2016-01-07 06:39:06 +00:00
disnix.nix disnix: propagate ejabberd username to the activation module 2016-01-16 18:08:07 +00:00
docker-registry.nix nixos/docker-registry: rename 'host' to 'listenAddress' 2015-12-24 00:06:40 +01:00
etcd.nix etcd: 2.1.2 -> 2.3.0 2016-03-26 22:47:15 -04:00
felix.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
folding-at-home.nix jobs -> systemd.services 2016-01-07 06:39:06 +00:00
gammu-smsd.nix gammu-smsd service: init 2016-02-15 00:26:41 +03:00
gitit.nix nixos: gitit, wrong type restriction redacted 2016-02-12 07:00:37 +01:00
gitlab.nix gitlab service: Remove emailFrom option 2016-03-17 04:16:25 +01:00
gitlab.xml gitlab: Add documentation 2016-02-26 08:56:39 +01:00
gitolite.nix nixos: Replace pkgs.openssh with config.programs.ssh.package 2015-06-26 17:09:58 -07:00
gpsd.nix types.uniq types.int -> types.int 2015-06-15 18:11:32 +02:00
ihaskell.nix Revert "Add the tool "nixos-typecheck" that can check an option declaration to:" 2016-03-01 20:52:06 +01:00
mantisbt.nix mantisbt: fix typo in documentation 2016-03-12 07:48:36 -06:00
mathics.nix nixos/mathics: New service and test 2016-01-02 14:34:55 -08:00
matrix-synapse-log_config.yaml matrix-synapse: init at 0.12.0 2016-01-15 15:17:14 +01:00
matrix-synapse.nix nixos: Provide a defaultText for type = package 2016-02-17 21:12:24 +01:00
mbpfan.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
mediatomb.nix Allow setting mediatomb interface 2015-06-13 15:16:28 +00:00
mesos-master.nix Some more type cleanup 2015-06-15 18:18:46 +02:00
mesos-slave.nix Some more type cleanup 2015-06-15 18:18:46 +02:00
mwlib.nix mwlib uses pdftk to create books 2015-06-08 08:35:12 +00:00
nix-daemon.nix nix.useChroot: allow 'relaxed' as a value 2016-03-25 12:50:39 +00:00
nix-gc.nix nix-gc.nix: Revert 'prefer "nix-store" over "nix-collect-garbage" because the latter supports "--max-freed"' 2015-09-04 11:51:01 +02:00
nix-ssh-serve.nix
nixos-manual.nix Revert "Add the tool "nixos-typecheck" that can check an option declaration to:" 2016-03-01 20:52:06 +01:00
octoprint.nix octoprint service: add extraConfig 2016-03-12 18:52:16 +03:00
parsoid.nix nixos/parsoid: use nodejs 0.10 2015-10-22 14:34:02 +03:00
phd.nix
plex.nix nixos: Provide a defaultText for type = package 2016-02-17 21:12:24 +01:00
redmine.nix nixos/redmine: improve assert message 2015-12-08 22:52:02 +01:00
ripple-data-api.nix fix argument in mkEnableOption 2015-06-21 18:21:21 +03:00
ripple-rest.nix fix argument in mkEnableOption 2015-06-21 18:21:21 +03:00
rippled.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
rogue.nix nixos/rogue: Set WorkingDirectory to /tmp 2015-07-22 16:08:17 +03:00
siproxd.nix
spice-vdagentd.nix spice-vdagentd service : initial at 0.16.0 2016-03-05 07:56:47 +10:00
subsonic.nix nixos manuals: bring back package references 2016-02-03 14:47:14 +01:00
sundtek.nix sundtek: 2015-12-12 -> 2016-01-26 + service change 2016-01-30 20:08:52 +01:00
svnserve.nix jobs -> systemd.services 2016-01-07 06:39:06 +00:00
synergy.nix nixos/synergy: Restart services on failure. 2015-10-13 04:42:39 +02:00
taskserver.nix nixos/taskserver: Add a nixos-taskdctl command 2016-04-05 18:53:31 +02:00
uhub.nix
zookeeper.nix Some more type cleanup 2015-06-15 18:18:46 +02:00