diff --git a/readme-vars.yml b/readme-vars.yml index 1a629a3..076e6cf 100755 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -154,7 +154,7 @@ app_setup_block: | # changelog changelogs: - - { date: "05.02.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf - Add includable confs for authentik" } + - { date: "09.02.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf - Add includable confs for authentik" } - { date: "21.01.23:", desc: "Unpin certbot version (allow certbot 2.x). !!BREAKING CHANGE!! We are temporarily removing the certbot porkbun plugin until a new version is released that is compatible with certbot 2.x." } - { date: "20.01.23:", desc: "Rebase to alpine 3.17 with php8.1." } - { date: "16.01.23:", desc: "Remove nchan module because it keeps causing crashes." } diff --git a/root/defaults/nginx/authentik-location.conf.sample b/root/defaults/nginx/authentik-location.conf.sample index ddeb42c..32c9b53 100644 --- a/root/defaults/nginx/authentik-location.conf.sample +++ b/root/defaults/nginx/authentik-location.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/02/05 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-location.conf.sample +## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-location.conf.sample # Make sure that your authentik container is in the same user defined bridge network and is named authentik-server ## Send a subrequest to Authentik to verify if the user is authenticated and has permission to access the resource. @@ -6,14 +6,14 @@ auth_request /outpost.goauthentik.io/auth/nginx; ## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal. error_page 401 = @goauthentik_proxy_signin; -## Save the upstream metadata response headers from Authentik to variables. +## Translate response headers from Authentik into variables auth_request_set $authentik_username $upstream_http_x_authentik_username; auth_request_set $authentik_groups $upstream_http_x_authentik_groups; auth_request_set $authentik_email $upstream_http_x_authentik_email; auth_request_set $authentik_name $upstream_http_x_authentik_name; auth_request_set $authentik_uid $upstream_http_x_authentik_uid; -## Inject the metadata response headers from the variables into the request made to the backend. +## Inject the response header variables into the request made to the actual upstream proxy_set_header X-authentik-username $authentik_username; proxy_set_header X-authentik-groups $authentik_groups; proxy_set_header X-authentik-email $authentik_email; diff --git a/root/defaults/nginx/authentik-server.conf.sample b/root/defaults/nginx/authentik-server.conf.sample index 27698c3..9f482c3 100644 --- a/root/defaults/nginx/authentik-server.conf.sample +++ b/root/defaults/nginx/authentik-server.conf.sample @@ -1,8 +1,9 @@ -## Version 2023/02/05 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-server.conf.sample +## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-server.conf.sample # Make sure that your authentik container is in the same user defined bridge network and is named authentik-server # location for authentik subfolder requests location ^~ /outpost.goauthentik.io { + auth_request off; # requests to this subfolder must be accessible without authentication include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_authentik authentik-server; diff --git a/root/defaults/nginx/proxy.conf.sample b/root/defaults/nginx/proxy.conf.sample index 2eb857e..967d170 100644 --- a/root/defaults/nginx/proxy.conf.sample +++ b/root/defaults/nginx/proxy.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/02/05 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/proxy.conf.sample +## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/proxy.conf.sample # Timeout if the real server is dead proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;