From ec09d0f0acc0da3677e5483eba6598b3a2c1ac41 Mon Sep 17 00:00:00 2001 From: Nicolas Berens Date: Mon, 22 Jan 2024 10:31:06 +0100 Subject: [PATCH] allow setting remote_user using an intermediate header --- Dockerfile | 1 + README.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index d278760..ebaa8f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,7 @@ COPY php.ini /etc/php/7.4/cli/conf.d/99-docker.ini RUN ["ln", "-vs", "/usr/share/icingaweb2/bin/icingacli", "/usr/local/bin/"] RUN ["icingacli", "setup", "config", "webserver", "apache", "--path=/", "--file=/etc/apache2/conf-enabled/icingaweb2.conf"] +RUN echo 'SetEnvIf X-REMOTE-USER "(.*)" REMOTE_USER=$0' > /etc/apache2/conf-enabled/allow-remote-user.conf USER www-data ENV ICINGAWEB_OFFICIAL_DOCKER_IMAGE 1 diff --git a/README.md b/README.md index dd5c4b3..312a14b 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,10 @@ option = value Consult the [Icinga Web 2 configuration documentation] on which .ini files there are. +### External authentication + +When using `icingaweb.authentication.autologin.backend: external`, the Username needs to be passed in the `X-Remote-User` header. + ## Build it yourself ```bash