Hi all,
I'm having trouble implementing SAML authentication to Zabbix 6.4. and maybe someone got any good idea how I can further troubleshoot this issue.
Unfortunately the offical SAML documentation seems to be a little outdated and offers just basic information especially for the official Zabbix docker image we're using.
Actually we got it almost to work but face a HTTP 500 error when accessing the "index_sso.php".

So for me it looks like:
The current configuration is as follows:
SAML Configuration Zabbix

ADFS Claim - Username attribute

IDP & SP certs mounted to “/etc/zabbix/web/certs/”

ADFS Claim - Metadata.xml
For configuring the ADFS claim we used the following Metadata XML we created by ourself as Zabbix does not provide a own file. (Servername.domain.intern & Company as placeholder here)
User Management
A corresponding Zabbix user with the same username as provided via "Name ID" used as "Username attribute" in the SAML config is existing.
Someone got any further ideas what to check on Zabbix side to resolve this PHP Error?
Best regards
Philipp
I'm having trouble implementing SAML authentication to Zabbix 6.4. and maybe someone got any good idea how I can further troubleshoot this issue.
Unfortunately the offical SAML documentation seems to be a little outdated and offers just basic information especially for the official Zabbix docker image we're using.
Actually we got it almost to work but face a HTTP 500 error when accessing the "index_sso.php".
Code:
zabbix-web-nginx-mysql_1 | 2023/06/01 14:54:10 [error] 22#22: *9 FastCGI sent in stderr: "[COLOR=#e74c3c][B]PHP message: PHP Warning: Undefined variable $user_attributes in /usr/share/zabbix/index_sso.php on line 194PHP message: PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/zabbix/index_sso.php:194[/B][/COLOR]
zabbix-web-nginx-mysql_1 | Stack trace:
zabbix-web-nginx-mysql_1 | #0 {main}
zabbix-web-nginx-mysql_1 | thrown in /usr/share/zabbix/index_sso.php on line 194" while reading response header from upstream, client: 10.254.102.139, server: Servername, request: "POST /index_sso.php?acs HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "Servername.domain.intern", referrer: "[URL]https://adfs.company.com/[/URL]"
zabbix-web-nginx-mysql_1 | 10.254.102.139 - - [01/Jun/2023:14:54:10 +0200] "POST /index_sso.php?acs HTTP/1.1" 500 5 "[URL]https://adfs.company.com/[/URL]" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" "-"
So for me it looks like:
- SAML Login get offered - OK
- ADFS connection is working - OK
- ADFS authentication works and returns session to Zabbix - OK
- Now Zabbix has a problem with a missing parameter "$user_attributes" - Problem
The current configuration is as follows:
SAML Configuration Zabbix
ADFS Claim - Username attribute
IDP & SP certs mounted to “/etc/zabbix/web/certs/”
ADFS Claim - Metadata.xml
For configuring the ADFS claim we used the following Metadata XML we created by ourself as Zabbix does not provide a own file. (Servername.domain.intern & Company as placeholder here)
Code:
<?xml version="1.0" encoding="utf-8"?>
<EntityDescriptor entityID="zabbix" xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
<SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://Servername.domain.intern/index_sso.php?acs" index="0" />
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://Servername.domain.intern/index_sso.php?sls" />
<NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
</SPSSODescriptor>
<Organization>
<OrganizationName xml:lang="en">Company</OrganizationName>
<OrganizationDisplayName xml:lang="en">Zabbix</OrganizationDisplayName>
<OrganizationURL xml:lang="en">https://Servername.domain.intern/</OrganizationURL>
</Organization>
<ContactPerson contactType="administrative">
<GivenName>User</GivenName>
<EmailAddress>[email protected]</EmailAddress>
</ContactPerson>
</EntityDescriptor>
A corresponding Zabbix user with the same username as provided via "Name ID" used as "Username attribute" in the SAML config is existing.
Someone got any further ideas what to check on Zabbix side to resolve this PHP Error?
Best regards
Philipp
I'll update once configured.
Comment