Commit graph

22 commits

Author SHA1 Message Date
WilliButz
d060292aa6
add patch to fix failing "tenant_files" migration
The new migration in tenant_files.py references a MEDIA_ROOT directory
based on its own path, which in our case is in the read-only /nix/store.

We need it to refer to the actual authentik state directory instead,
which defaults to /var/lib/authentik/media in module.nix
2024-02-21 22:12:02 +01:00
WilliButz
d85dacb6c2
components: drop celery, package manage.py instead 2024-02-21 22:12:02 +01:00
Marcel
347066b2ca
Made postgres optional 2024-01-31 10:26:11 +01:00
WilliButz
3904e3d29b
module: remove restartTriggers from ldap outpost service
Fixes #15

Before this change it was non-trivial to deploy the ldap outpost without
also activating the main authentik service on the same host. Adding
functionality to provide a separate configuration file for the outpost
service remains an open task.
2024-01-28 21:15:41 +01:00
shokinn
4dd485a366 Add dependency to network-online.target for authentik-ldap.service 2024-01-28 00:42:02 +01:00
shokinn
3bf78b1126 Add dependency to network-online.target for authentik.service 2024-01-24 18:42:16 +01:00
Alexander Sieg
8e23ad0cef
enable media uploads
The media upload feature is build around being deployed in a container
and only enables uploads when `/media` is a mountpoint. This isn't the
case on nixos and as such media uploads are disable.

In order to enable this, we need to patch authentik so that the
`can_save_media` capability is enabled.
2024-01-15 17:10:22 +01:00
WilliButz
1d2fe8bd1e
Merge pull request #9 from Ma27/restart-ldap-outpost
authentik-ldap: restart on failure
2024-01-03 20:06:33 +01:00
Maximilian Bosch
7c6103be81
authentik-ldap: restart on failure
I'm occasionally seeing the following error:

    Jan 01 22:02:10 auth ldap[151813]: fatal error: concurrent map writes
    Jan 01 22:02:10 auth ldap[151813]: fatal error: concurrent map writes
    Jan 01 22:02:10 auth ldap[151813]: goroutine 4841 [running]:
    Jan 01 22:02:10 auth ldap[151813]: goauthentik.io/api/v3.(*Configuration).AddDefaultHeader(...)
    Jan 01 22:02:10 auth ldap[151813]:         goauthentik.io/api/v3@v3.2023101.1/configuration.go:120
    Jan 01 22:02:10 auth ldap[151813]: goauthentik.io/internal/outpost/ldap/search/direct.(*DirectSearcher).Search(0xc0002ba4f8, 0xc000510dd0)
    Jan 01 22:02:10 auth ldap[151813]:         goauthentik.io/internal/outpost/ldap/search/direct/direct.go:112 +0x65a
    [...]
    Jan 01 22:02:10 auth systemd[1]: authentik-ldap.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
    Jan 01 22:02:10 auth systemd[1]: authentik-ldap.service: Failed with result 'exit-code'.

Obviously, I need to find out what's up there. However, services
shouldn't just die on a crash, but restart in that case. If that happens
too often, StartLimitBurst/StartLimitIntervalSec ensure that the
(re)start attempt is aborted eventually.

This is especially problematic because Nextcloud tries to contact the
LDAP server on every single request for a sync which means that the
entire service is down when such a crash happens.
2024-01-03 12:52:42 +01:00
shokinn
47e0cb8e14 link static workdir deps to /run/authentik 2023-12-29 15:01:03 +01:00
WilliButz
07c6476fbf
module: make authentikComponents a simple attrset 2023-12-10 15:16:53 +01:00
WilliButz
8b05ebf200
module: drop unused recursiveUpdate 2023-12-10 15:16:53 +01:00
WilliButz
332d717766
module: update postgres config (ensurePermissions -> ensureDBOwnership)
see https://github.com/NixOS/nixpkgs/pull/266270
2023-12-10 15:16:41 +01:00
WilliButz
f7fa85cc1f
module: add nginx support with cert auto-discovery 2023-10-04 17:55:39 +02:00
WilliButz
251d78a7f2
module: provide option to specify EnvironmentFile for secrets
The systemd service module references the module's environmentFile in a
list to allow for merging with EnvironmentFiles injected elsewhere.
2023-10-04 14:47:29 +02:00
WilliButz
fcc7b2f997
module: authentik-ldap drop environment variables
This should be configured with a proper authentik hostname and a
matching certificate that can be validated with the system CA bundle.
2023-06-29 22:51:57 +02:00
WilliButz
62f7cce184
module: add basic ldap outpost service 2023-06-29 13:24:17 +02:00
WilliButz
360f4c7321
module: refactor as preparation for ldap-outpost 2023-06-28 17:12:36 +02:00
WilliButz
6830ada44a
refactor flake
* switched from flake-utils to flake-parts
* dropped the overlay and instead populate configurable options for all
required authentik components in the module
* `nixosModule.default` is now a top-level output following the flake spec,
instead of the previously incorrect system-specific definition
2023-06-28 16:39:23 +02:00
WilliButz
e079fe0719
module: restart services if global config file changes 2023-06-07 15:11:54 +02:00
WilliButz
3c661c5095
module: use postgres peer auth instead of password auth 2023-06-07 15:11:54 +02:00
WilliButz
4a424259e4
init flake with package, module and test 2023-06-02 16:17:47 +02:00