Open maxime1992 opened 1 month ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
Did you read the notes at the top of the proxy config regarding the different versions and what needs to be set?
Yes, have I missed something obvious?
For the configuration.yml
file I've got the following:
server:
address: "tcp://:9091/authelia"
read_buffer_size: 4096
write_buffer_size: 4096
So it seems to be matching the note for 4.38.x?
The swag blog/docs are outdated for authelia, use the official docs as seen here: https://www.reddit.com/r/selfhosted/comments/1e69kow/banging_my_head_against_swagauthelia/
Authelia has updated their documentation for SWAG integration. This is what I used to get it working again.
https://www.authelia.com/integration/proxies/swag/
Specifically this change was required. The generated authelia-server.conf includes the proxy_pass http://$upstream_authelia:9091; directive in two location blocks, we recommend adjusting these locations so they include the part of the location match after the /authelia part for example in the location = /authelia/api/verify set the directive to proxy_pass http://$upstream_authelia:9091/api/verify; and the location = /authelia/api/authz/auth-request set the directive to proxy_pass http://$upstream_authelia:9091/api/authz/auth-request. Per below.
location = /authelia/api/verify { internal;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authelia authelia;
proxy_pass http://$upstream_authelia:9091/api/verify;
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
}
location = /authelia/api/authz/auth-request { internal;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authelia authelia;
proxy_pass http://$upstream_authelia:9091/api/authz/auth-request;
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
}
Is there an existing issue for this?
Current Behavior
I use SWAG and I have noticed that there's an update on the
authelia-location.conf.sample
file. So I try to just copy it over instead of mine, and as a result all my services behind authelia end up with a 500.The only problematic file seems to be
authelia-location.conf
.The file that used to work:
The new one based on the sample file:
The logs I get:
Expected Behavior
To work.
Steps To Reproduce
Unsure if it'll repro or not but you can give it a shot with the file diff I have provided above.
Environment