Icinga / docker-icingaweb2

GNU General Public License v2.0
16 stars 11 forks source link

Allow autologin.backend: external in docker container. #117

Closed nicolasberens closed 9 months ago

nicolasberens commented 10 months ago

When using : icingaweb.authentication.autologin.backend: external icingaweb expects the user name being in the REMOTE_USER variable.: https://icinga.com/docs/icinga-web/latest/doc/05-Authentication/#external-authentication

When using Docker, Authentication is usually done in a different container, which then acts as a reverse proxy to the icingaweb docker container. (E.g. using Traefik ForwardAuth)

Apache treats REMOTE_USER as an internal variable that can't be set from the outside (e.g. in the http request from the frontend proxy).

A workaround would be, to set REMOTE_USER to the value of another header, if that exists:

SetEnvIf X-REMOTE-USER "(.*)" REMOTE_USER=$0

This way you can use an external authentication source with the existing docker container.