Skip to content

Commit

Permalink
Merge pull request #1341 from zabbix/trunk_http_auth
Browse files Browse the repository at this point in the history
Added ZBX_ALLOW_HTTP_AUTH parameter and php-curl package
  • Loading branch information
dotneft authored Apr 27, 2024
2 parents 72f60d4 + b35ca70 commit b8d04f7
Show file tree
Hide file tree
Showing 63 changed files with 131 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Dockerfiles/web-apache-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ Example of YAML Mapping to Sequences
....
```

## `ZBX_ALLOW_HTTP_AUTH`

The variable allows to disable user HTTP authentication.

### Other variables

Additionally the image allows to specify many other environment variables listed below:
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-mysql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN set -eux && \
php83-apache2 \
php83-bcmath \
php83-ctype \
php83-curl \
php83-gd \
php83-gettext \
php83-json \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-mysql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mysql \
mod_ssl \
php \
php-curl \
php-fpm \
php-bcmath \
php-gd \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-mysql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mysql \
mod_ssl \
php \
php-curl \
php-fpm \
php-bcmath \
php-gd \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-mysql/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
locales \
libldap-common \
php8.3-bcmath \
php8.3-curl \
php8.3-gd \
php8.3-ldap \
php8.3-mbstring \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/web-apache-pgsql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ Example of YAML Mapping to Sequences
....
```

## `ZBX_ALLOW_HTTP_AUTH`

The variable allows to disable user HTTP authentication.

### Other variables

Additionally the image allows to specify many other environment variables listed below:
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-pgsql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN set -eux && \
php83-apache2 \
php83-bcmath \
php83-ctype \
php83-curl \
php83-gd \
php83-gettext \
php83-json \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-pgsql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
httpd \
mod_ssl \
php \
php-curl \
php-fpm \
php-bcmath \
php-gd \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-pgsql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
httpd \
mod_ssl \
php \
php-curl \
php-fpm \
php-bcmath \
php-gd \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
locales \
libldap-common \
php8.3-bcmath \
php8.3-curl \
php8.3-gd \
php8.3-ldap \
php8.3-mbstring \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/web-nginx-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ Example of YAML Mapping to Sequences
....
```

## `ZBX_ALLOW_HTTP_AUTH`

The variable allows to disable user HTTP authentication.

### Other variables

Additionally the image allows to specify many other environment variables listed below:
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-mysql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN set -eux && \
nginx \
php83-bcmath \
php83-ctype \
php83-curl \
php83-fpm \
php83-gd \
php83-gettext \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-mysql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mysql \
nginx \
php-bcmath \
php-curl \
php-fpm \
php-gd \
php-ldap \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-mysql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mysql \
nginx \
php-bcmath \
php-curl \
php-fpm \
php-gd \
php-ldap \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-mysql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
mysql \
nginx \
php-bcmath \
php-curl \
php-fpm \
php-gd \
php-json \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfiles/web-nginx-mysql/rhel/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ <h2 id="-zbx_sso_settings-"><code>ZBX_SSO_SETTINGS</code></h2>
ZBX_SSO_SETTINGS: "{'baseurl': 'https://zabbix-docker.mydomain.com', 'use_proxy_headers': true, 'strict': false}"
....
....</span>
<h3 id="-zbx_allow_http_auth-"><code>ZBX_ALLOW_HTTP_AUTH</code></h3>
<p>The variable allows to disable user HTTP authentication.</p>
</code></pre><h3 id="other-variables">Other variables</h3>
<p>Additionally the image allows to specify many other environment variables listed below:</p>
<pre><code><span class="hljs-attr">ZBX_VAULTDBPATH=</span> <span class="hljs-comment"># Available since 5.2.0</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \
locales \
libldap-common \
php8.3-bcmath \
php8.3-curl \
php8.3-fpm \
php8.3-gd \
php8.3-ldap \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/web-nginx-pgsql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ Example of YAML Mapping to Sequences
....
```

## `ZBX_ALLOW_HTTP_AUTH`

The variable allows to disable user HTTP authentication.

### Other variables

Additionally the image allows to specify many other environment variables listed below:
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-pgsql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN set -eux && \
nginx \
php83-bcmath \
php83-ctype \
php83-curl \
php83-fpm \
php83-gd \
php83-gettext \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@

$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();

$ALLOW_HTTP_AUTH = getenv('ZBX_ALLOW_HTTP_AUTH') == 'true' ? true: false;
3 changes: 3 additions & 0 deletions Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ prepare_zbx_web_config() {
export ZBX_SSO_SP_CERT=${ZBX_SSO_SP_CERT}
export ZBX_SSO_IDP_CERT=${ZBX_SSO_IDP_CERT}

: ${ZBX_ALLOW_HTTP_AUTH:="true"}
export ZBX_ALLOW_HTTP_AUTH=${ZBX_ALLOW_HTTP_AUTH}

if [ -n "${ZBX_SESSION_NAME}" ]; then
cp "$ZABBIX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZABBIX_WWW_ROOT/include/defines.inc.php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/web-nginx-pgsql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
glibc-locale-source \
nginx \
php-bcmath \
php-curl \
php-fpm \
php-gd \
php-json \
Expand Down
Loading

0 comments on commit b8d04f7

Please sign in to comment.