I'm attempting to run Authelia with Traefik and having some issues with the final redirection after authentication. Everything seems fine up to this point but after authentication, I am just redirected to the default redirect page I setup in my config.
Here's some configs with
The service I am trying to front with Authelia has the following Traefik labels
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:calibre.xxx.xxx"
- "traefik.port=8083"
- "traefik.docker.network=webproxy"
- "traefik.frontend.auth.forward.address=https://auth.xxx.xxx/api/verify?rd=https://auth.xxx.xxx"
- "traefik.frontend.auth.forward.tls.insecureSkipVerify=true"
- "traefik.frontend.headers.customRequestHeaders=X-ORIGINAL-URL:https://calibre.xxx"
I can verify in the authelia debug logs that the x-original-url is set correctly in the initial request, however, the x-target-url does not seem to be constructed
authelia_1 | info: date='Thu Jun 27 2019 23:03:18 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='59f5afde-2b04-4192-802e-d9322a681d99' sessionId='xxx' ip='128.237.166.122' message='Initiate TOTP validation for user "xxx".'
authelia_1 | debug: date='Thu Jun 27 2019 23:03:18 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='59f5afde-2b04-4192-802e-d9322a681d99' sessionId='xxx' ip='128.237.166.122' message='TOTP validation succeeded.'
authelia_1 | debug: date='Thu Jun 27 2019 23:03:18 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='59f5afde-2b04-4192-802e-d9322a681d99' sessionId='xxx' ip='128.237.166.122' message='Header x-target-url is set to undefined'
authelia_1 | debug: date='Thu Jun 27 2019 23:03:19 GMT+0000 (UTC)' method='GET', path='/api/state' requestId='44d0c3d5-d2d6-41e0-8c02-f55f1fe1b9d9' sessionId='xxx' ip='128.237.166.122' message='Headers = {"host":"auth.xxx.xxx","user-agent":"Mozilla/5.0 (X11; CrOS x86_64 11895.118.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.159 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9","cookie":"authelia_session=xxx,"dnt":"1","if-none-match":"W/\"5a-uR/o4FVzv5iHz7BiVzs4QBpXvzs\"","referer":"https://auth.xxx.xxx/?rd=https://calibre.xxx.xxx","x-forwarded-for":"128.237.166.122","x-forwarded-host":"auth.xxx.xxx","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"be50077e3401","x-real-ip":"128.237.166.122"}'
I'd be more than happy to provide more information or context if it can help debug this issue.
Hello, please try this "traefik.frontend.auth.forward.address=https://auth.xxx.xxx/api/verify?rd=https://auth.xxx.xxx/#/"
That didn't seem to have any effect, the Authelia logs look the same.
I got the same issue with version: 3.15.0
When I enable "default_redirection_url" in config.yml it does redirect to config URL.
However, it gets stuck on the "you're logged in" page, when disabled by commenting out "default_redirection_url" in config.yml.
In addition I did try "traefik.frontend.auth.forward.address=https://auth.xxx.xxx/api/verify?rd=https://auth.xxx.xxx/#/"
and it is still the same.
Here is authelia's output as I go through the login process:
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia:9091","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; pga4_session=a1c6ebf0-5903-4178-ac79-47fd5ebec1cc!0L1HzzH1iG2pSzqdJvnha5nZx10=; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","purpose":"prefetch","upgrade-insecure-requests":"1","x-forwarded-for":"172.18.0.175","x-forwarded-host":"pg.example.com","x-forwarded-method":"GET","x-forwarded-proto":"https","x-forwarded-uri":"/","x-target-url":"https://pg.example.com"}'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-proto is set to https'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-host is set to pg.example.com'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-uri is set to /'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='domain=pg.example.com, path=/, user=unknown, groups=unknown, ip=172.18.0.175'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-proto is set to https'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-host is set to pg.example.com'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-uri is set to /'
error: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Error: User 'unknown' is not sufficiently authorized to access pg.example.com/.'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Redirecting to https://authelia.example.com?rd=https://pg.example.com/'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/state' requestId='931a02ca-a611-493e-9459-3789247a7a52' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","if-none-match":"W/\"1a-WDeCm39gGM0/ubzz9lBRjjvLOdo\"","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia:9091","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; pga4_session=a1c6ebf0-5903-4178-ac79-47fd5ebec1cc!0L1HzzH1iG2pSzqdJvnha5nZx10=; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","purpose":"prefetch","upgrade-insecure-requests":"1","x-forwarded-for":"172.18.0.175","x-forwarded-host":"pg.example.com","x-forwarded-method":"GET","x-forwarded-proto":"https","x-forwarded-uri":"/","x-target-url":"https://pg.example.com"}'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-proto is set to https'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-host is set to pg.example.com'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-uri is set to /'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='domain=pg.example.com, path=/, user=unknown, groups=unknown, ip=172.18.0.175'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-proto is set to https'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-host is set to pg.example.com'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-forwarded-uri is set to /'
error: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Error: User 'unknown' is not sufficiently authorized to access pg.example.com/.'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/verify' requestId='05b2677c-0404-4fbc-a2ad-5fd0aa9a46f0' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Redirecting to https://authelia.example.com?rd=https://pg.example.com/'
debug: date='Wed Jul 03 2019 03:04:12 GMT+0000 (UTC)' method='GET', path='/api/state' requestId='931a02ca-a611-493e-9459-3789247a7a52' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","if-none-match":"W/\"1a-WDeCm39gGM0/ubzz9lBRjjvLOdo\"","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
debug: date='Wed Jul 03 2019 03:08:19 GMT+0000 (UTC)' method='POST', path='/api/firstfactor' requestId='28edd1d1-4670-4674-9c56-a250a7744251' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","content-length":"81","accept":"application/json","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","content-type":"application/json","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","origin":"https://authelia.example.com","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
info: date='Wed Jul 03 2019 03:08:19 GMT+0000 (UTC)' method='POST', path='/api/firstfactor' requestId='28edd1d1-4670-4674-9c56-a250a7744251' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Starting authentication of user "[email protected]"'
info: date='Wed Jul 03 2019 03:08:19 GMT+0000 (UTC)' method='POST', path='/api/firstfactor' requestId='28edd1d1-4670-4674-9c56-a250a7744251' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='No regulation applied.'
debug: LDAP: Bind user 'cn=admin,dc=example,dc=com'
debug: Computed users filter is [email protected]
debug: LDAP: searching for user dn of [email protected]
debug: LDAP: retrieved user dn is [email protected],ou=users,dc=example,dc=com
debug: LDAP: Bind user '[email protected],ou=users,dc=example,dc=com'
debug: LDAP: Unbind user '[email protected],ou=users,dc=example,dc=com'
debug: Computed users filter is [email protected]
debug: LDAP: searching for user dn of [email protected]
debug: Computed users filter is [email protected]
debug: LDAP: searching for user dn of [email protected]
debug: LDAP: retrieved user dn is [email protected],ou=users,dc=example,dc=com
debug: Computed groups filter is (&([email protected],ou=users,dc=example,dc=com)(objectclass=groupOfNames))
debug: LDAP: retrieved user dn is [email protected],ou=users,dc=example,dc=com
debug: LDAP: groups of user [email protected] are []
debug: LDAP: emails of user '[email protected]' are [email protected]
debug: LDAP: Unbind user 'cn=admin,dc=example,dc=com'
info: date='Wed Jul 03 2019 03:08:20 GMT+0000 (UTC)' method='POST', path='/api/firstfactor' requestId='28edd1d1-4670-4674-9c56-a250a7744251' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='LDAP binding successful. Retrieved information about user are {"groups":[],"emails":["[email protected]"]}'
debug: date='Wed Jul 03 2019 03:08:20 GMT+0000 (UTC)' method='POST', path='/api/firstfactor' requestId='28edd1d1-4670-4674-9c56-a250a7744251' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Mark successful authentication to regulator.'
debug: date='Wed Jul 03 2019 03:08:20 GMT+0000 (UTC)' method='POST', path='/api/firstfactor' requestId='28edd1d1-4670-4674-9c56-a250a7744251' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-target-url is set to undefined'
debug: date='Wed Jul 03 2019 03:08:20 GMT+0000 (UTC)' method='GET', path='/api/state' requestId='52d66925-2fc0-4a64-b1e5-7be739e2c367' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","if-none-match":"W/\"1a-WDeCm39gGM0/ubzz9lBRjjvLOdo\"","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
debug: date='Wed Jul 03 2019 03:08:20 GMT+0000 (UTC)' method='GET', path='/api/secondfactor/preferences' requestId='fc602dcc-a5e5-40f3-ba96-ba8ce0008be1' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","if-none-match":"W/\"11-ss0QAgxFyn0iGdTlTlrYIrKQDNE\"","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
debug: date='Wed Jul 03 2019 03:08:20 GMT+0000 (UTC)' method='GET', path='/api/secondfactor/available' requestId='6668ffce-b7f5-4892-b4cd-92bdd54ec1ca' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","if-none-match":"W/\"19-hF1wEGOarpzOIv0O2tPWQvo44U4\"","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
debug: date='Wed Jul 03 2019 03:08:36 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='67a5fd0b-7152-4ff5-9f32-3eba4df04e63' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","content-length":"18","accept":"application/json","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","content-type":"application/json","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","origin":"https://authelia.example.com","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
debug: date='Wed Jul 03 2019 03:08:36 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='67a5fd0b-7152-4ff5-9f32-3eba4df04e63' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Initiate TOTP validation for user "[email protected]".'
debug: date='Wed Jul 03 2019 03:08:36 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='67a5fd0b-7152-4ff5-9f32-3eba4df04e63' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='TOTP validation succeeded.'
debug: date='Wed Jul 03 2019 03:08:36 GMT+0000 (UTC)' method='POST', path='/api/totp' requestId='67a5fd0b-7152-4ff5-9f32-3eba4df04e63' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Header x-target-url is set to undefined'
debug: date='Wed Jul 03 2019 03:08:36 GMT+0000 (UTC)' method='GET', path='/api/state' requestId='793f010f-ffd0-4aa2-ae55-ca8928d1aed3' sessionId='ua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi' ip='172.18.0.175' message='Headers = {"host":"authelia.example.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"_ga=GA1.2.478244914.1560844746; authelia_session=s%3Aua7HGH8F8I5Shyh-OHTFzZ9gFwd2fjNi.3orBZaIFz8sr5y1i%2FcmJd8MU9xztE7mjahc3lbeMK%2B8","if-none-match":"W/\"3d-elhZjDVpcfHaKlG7WrHYzfVHAY8\"","referer":"https://authelia.example.com/?rd=https://pg.example.com/","x-forwarded-for":"172.18.0.175","x-forwarded-host":"authelia.example.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"65c7f21d9a40","x-real-ip":"172.18.0.175"}'
I had the same issue, replacing /#/ with /%23/ solved it.
The line I use for forward authentication with Authelia is:
- "traefik.frontend.auth.forward.address=http://authelia:9091/api/verify?rd=https://auth.domain.tld/%23/"
This lets traefik use Authelia through a direct connection, not through a request to itself. The # character is URL encoded to ensure it gets sent corretly.
That seemed to fix it for me as well, thanks!
In v4, the characters /%23/ are not needed anymore :).
Most helpful comment
I had the same issue, replacing
/#/with/%23/solved it.