[Config Support]: Proxy Auth #18898
-
Describe the problem you are havingI'm having an issue getting the role part of proxy auth working. User is working correctly, though any user who authenticates is given whatever my default role is set to. Using the whoami container passing through the same authentication app in authentik I see the correct headers as seen below. This test user gets admin access in frigate even though they're in the viewer group which is mapped in my frigate config. Am I missing something? Is there a page in frigate, like api/stats that will show the headers being passed? The whoami container shows uppercase headers (X-Authentik-Groups) I've tried both in the config as well as adding this exact capitalization to the proxy_trusted_headers.conf, nothing seems to work for me. Hostname: 4c12aabfbbc8 Version0.16.0-fd96cd5 Frigate config fileauth:
enabled: false
trusted_proxies:
- 172.19.0.0/16
proxy:
separator: '|'
header_map:
user: X-Authentik-Username
role: X-Authentik-Groups
default_role: admin Relevant Frigate log outputn/a Relevant go2rtc log outputn/a Frigate statsNo response Operating systemUNRAID Install methodDocker CLI docker-compose file or Docker CLI commanddocker run
-d
--name='frigate'
--net='proxy'
--privileged=true
-e TZ="America/Chicago"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="DarkKnight"
-e HOST_CONTAINERNAME="frigate"
-e 'FRIGATE_RTSP_PASSWORD'='xxx'
-e 'PLUS_API_KEY'='xxx'
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui='http://[IP]:[PORT:8971]'
-l net.unraid.docker.icon='https://raw.githubusercontent.com/yayitazale/unraid-templates/main/frigate.png'
-l 'traefik.http.routers.frigate-rtr.middlewares'='authentik@file'
-l 'traefik.http.routers.frigate-rtr.rule'='Host(`frigate.xxx`)'
-l 'traefik.http.services.frigate.loadbalancer.server.port'='8971'
-l 'traefik.enable'='true'
-l 'traefik.http.services.frigate.loadbalancer.server.scheme'='https'
-p '8971:8971/tcp'
-p '8554:8554/tcp'
-p '5000:5000/tcp'
-p '8555:8555/tcp'
-p '8555:8555/udp'
-v '/mnt/zfscache/appdata/frigate':'/config':'rw'
-v '/mnt/user/Frigate/':'/media/frigate':'rw'
-v '/etc/localtime':'/etc/localtime':'rw'
--device='/dev/bus/usb'
--device='/dev/dri/renderD128'
--shm-size=8G
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=5000000000
--restart unless-stopped
--pids-limit 10000 'ghcr.io/blakeblackshear/frigate:fd96cd5'
e641d416bf22cb49d9f4b42e13109485fb3be99a6b28dfa07937497ade60ade4 Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
So the current logic in this code that was introduced after 0.16 beta 1 was actually designed with the opposite case in mind, that the default role would be "viewer". It assigns "admin" to Line 275 in 5593495 So this means that all users, regardless of their actual roles in I think changing the logic to something like this should work:
I'll push up this fix and you can test in the next dev build or the next beta. |
Beta Was this translation helpful? Give feedback.
Right, your account will continue to have admin privileges because you provided
admin
in the header role. Even if you didn't provideadmin
, your default role isadmin
, so as long as you didn't provideviewer
in X-Authentik-Groups, your user would be anadmin
.The changes for this are in #18897