rename oidcEndpoint option
This commit is contained in:
parent
54ce26efce
commit
5052d16d64
2 changed files with 10 additions and 9 deletions
|
|
@ -19,9 +19,10 @@ let
|
||||||
example = "mydomain.com";
|
example = "mydomain.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
oidcEndpoint = lib.mkOption {
|
authEndpoint = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
description = "OIDC endpoint for SSO.";
|
description = "Auth endpoint for SSO.";
|
||||||
|
default = null;
|
||||||
example = "https://authelia.example.com";
|
example = "https://authelia.example.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -142,8 +143,8 @@ in
|
||||||
# proxy_set_header Cookie $new_cookie;
|
# proxy_set_header Cookie $new_cookie;
|
||||||
|
|
||||||
auth_request_set $redirect $scheme://$http_host$request_uri;
|
auth_request_set $redirect $scheme://$http_host$request_uri;
|
||||||
error_page 401 =302 ${c.oidcEndpoint}?rd=$redirect;
|
error_page 401 =302 ${c.authEndpoint}?rd=$redirect;
|
||||||
error_page 403 = ${c.oidcEndpoint}/error/403;
|
error_page 403 = ${c.authEndpoint}/error/403;
|
||||||
|
|
||||||
proxy_pass ${c.upstream};
|
proxy_pass ${c.upstream};
|
||||||
'';
|
'';
|
||||||
|
|
@ -151,7 +152,7 @@ in
|
||||||
# Virtual endpoint created by nginx to forward auth requests.
|
# Virtual endpoint created by nginx to forward auth requests.
|
||||||
locations."/authelia".extraConfig = ''
|
locations."/authelia".extraConfig = ''
|
||||||
internal;
|
internal;
|
||||||
proxy_pass ${c.oidcEndpoint}/api/verify;
|
proxy_pass ${c.authEndpoint}/api/verify;
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Original-URI $request_uri;
|
proxy_set_header X-Original-URI $request_uri;
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ let
|
||||||
default = "/var/lib/${name}";
|
default = "/var/lib/${name}";
|
||||||
};
|
};
|
||||||
|
|
||||||
oidcEndpoint = lib.mkOption {
|
authEndpoint = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Endpoint to the SSO provider. Leave null to not have SSO configured.";
|
description = "Endpoint to the SSO provider. Leave null to not have SSO configured.";
|
||||||
|
|
@ -297,8 +297,8 @@ config.xml" templatedSettings) "${config.services.radarr.dataDir}/config.xml" (
|
||||||
let
|
let
|
||||||
c = cfg.${name};
|
c = cfg.${name};
|
||||||
in
|
in
|
||||||
lib.mkIf (c.oidcEndpoint != null) {
|
lib.mkIf (c.authEndpoint != null) {
|
||||||
inherit (c) subdomain domain oidcEndpoint;
|
inherit (c) subdomain domain authEndpoint;
|
||||||
upstream = "http://127.0.0.1:${toString c.port}";
|
upstream = "http://127.0.0.1:${toString c.port}";
|
||||||
autheliaRules = [
|
autheliaRules = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue