nixpkgs-suyu/nixos/modules/services/security
Maximilian Bosch ecaf6aed02
nixos/privacyidea: add proper support for privacyidea-token-janitor
`privacyidea-token-janitor`[1] is a tool which helps to automate
maintenance of tokens. This is helpful to identify e.g. orphaned tokens,
i.e. tokens of users that were removed or tokens that were unused for a
longer period of time and apply actions to them (e.g. `disable` or
`delete`).

This patch adds two new things:

* A wrapper for `privacyidea-token-janitor` to make sure it's executable
  from CLI. To achieve this, it does a `sudo(8)` into the
  `privacyidea`-user and sets up the environment to make sure the
  configuration file can be found. With that, administrators can
  directly invoke it from the CLI without additional steps.

* An optional service is added which performs automatic cleanups of
  orphaned and/or unassigned tokens. Yes, the tool can do way more
  stuff, but I figured it's reasonable to have an automatic way to clean
  up tokens of users who were removed from the PI instance. Additional
  automation steps should probably be implemented in additional
  services (and are perhaps too custom to add them to this module).

[1] https://privacyidea.readthedocs.io/en/v3.7/workflows_and_tools/tools/index.html
2022-10-06 11:43:20 +02:00
..
vaultwarden Merge pull request #189744 from symphorien/vaultwarden-service 2022-09-12 19:26:39 +00:00
aesmd.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
certmgr.nix nixos/*: md-convert hidden plaintext options 2022-08-31 16:32:54 +02:00
cfssl.nix nixos/*: convert options with admonitions to MD 2022-08-31 16:36:16 +02:00
clamav.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
fail2ban.nix nixos/fail2ban: improve module documentation 2022-10-02 12:59:54 +02:00
fprintd.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
haka.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
haveged.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
hockeypuck.nix nixos/*: convert options with listings 2022-08-31 17:27:36 +02:00
hologram-agent.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
hologram-server.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
infnoise.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
kanidm.nix nixos/kanidm: Bind mount cacert path in unixd service 2022-09-06 15:01:37 +02:00
munge.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
nginx-sso.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
oauth2_proxy.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
oauth2_proxy_nginx.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
opensnitch.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
pass-secret-service.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
physlock.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
privacyidea.nix nixos/privacyidea: add proper support for privacyidea-token-janitor 2022-10-06 11:43:20 +02:00
shibboleth-sp.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
sks.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
sshguard.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
sslmate-agent.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
step-ca.nix nixos/*: convert options with admonitions to MD 2022-08-31 16:36:16 +02:00
tor.nix nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00
torify.nix nixos/*: convert options with admonitions to MD 2022-08-31 16:36:16 +02:00
torsocks.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
usbguard.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
vault.nix nixos/*: convert options with listings 2022-08-31 17:27:36 +02:00
yubikey-agent.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00