goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
13.51k stars 903 forks source link

Reputation scores displaying incorrect ip #10466

Closed 4d62 closed 4 months ago

4d62 commented 4 months ago

Describe the bug In reputation scores, the IP of the reverse proxy is shown instead of the user's ip. To Reproduce Steps to reproduce the behavior:

  1. Login several times with a same user
  2. Check reputation scores tab ig

Expected behavior The user's public IP should be shown

Screenshots https://img.sdko.org/u/WUC3h9.png

Logs no logs

Version and Deployment (please complete the following information):

Additional context Firefox latest stable & nightly on Windows 11. using caddy reverse proxy. Doesn't really matter as other places get the correct ip

rissson commented 4 months ago

This is probably due to a misconfigured reverse proxy or authentik instance. Check that AUTHENTIK_LISTEN__TRUSTED_PROXY_CIDRS is configured correctly and that the reverse proxy sends the correct headers to the authentik server.

(I assume this is with the authentik server, but the same applies with HTTP-based outposts as well)

4d62 commented 4 months ago

Check that AUTHENTIK_LISTEN__TRUSTED_PROXY_CIDRS is configured correctly

The cidr 172.16.0.0/12 covers my reverse proxy IP by default according to the docs so i doubt it's that.

the reverse proxy sends the correct headers to the authentik server.

When i first setup caddy, i tried to match my config to the nginx guide. I can send my config if you want

4d62 commented 4 months ago

IMG_0254

tried setting it back up again and i get this. even when i reverted the change 😠

4d62 commented 4 months ago

so i double broke something now that's for sure

rissson commented 4 months ago

The IP that authentik gets are also shown in the logs, so if those don't match, it's definitely an issue with the reverse proxy config.

4d62 commented 4 months ago

yea i'll try to figure it out. i'll chose it as completed for now