Everything changed - major rewrite
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
# Authentication: Caddy forward_auth → Authelia; the app reads the
|
||||
# X-Remote-User header set by Caddy (from Authelia's Remote-User).
|
||||
# All authenticated users get app access; /admin/* is restricted to
|
||||
# group:admins by Authelia's access_control rules (see authelia.nix).
|
||||
# group:admins by Authelia's access_control rules (defined in this file).
|
||||
#
|
||||
# Secrets consumed from sops:
|
||||
# eurovote/secret_key
|
||||
@@ -48,6 +48,16 @@ in
|
||||
logoutRedirectUrl = "https://auth.${domain}/logout";
|
||||
};
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Authelia access control — /admin/* requires two_factor + admins group;
|
||||
# all other paths require one_factor.
|
||||
# -----------------------------------------------------------------------
|
||||
homey.authelia.accessControlRules = [
|
||||
{ priority = 65; domain = [ "eurovision-vote.${domain}" ]; resources = [ "^/admin.*$" ]; subject = [ "group:admins" ]; policy = "two_factor"; }
|
||||
{ priority = 66; domain = [ "eurovision-vote.${domain}" ]; resources = [ "^/admin.*$" ]; policy = "deny"; }
|
||||
{ priority = 67; domain = [ "eurovision-vote.${domain}" ]; policy = "one_factor"; }
|
||||
];
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Caddy virtual host — forward_auth; X-Remote-User passed to Django's
|
||||
# RemoteUserMiddleware for automatic SSO login
|
||||
|
||||
Reference in New Issue
Block a user