Creating a SAML app in Yandex Identity Hub for integration with Zabbix
Note
This feature is at the Preview stage.
Zabbix
To authenticate your organization's users to Zabbix via SAML
SAML apps can be managed by users with the organization-manager.samlApplications.admin role or higher.
For the users of your organization to be able to access Zabbix:
Create an app
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Apps. - In the top-right corner, click
Create application and in the window that opens:-
Select the SAML (Security Assertion Markup Language) single sign-on method.
-
In the Name field, specify a name for your new app:
zabbix-app. -
Optionally, in the Description field, enter a description for the new app.
-
Optionally, add labels:
- Click Add label.
- Enter a label in
key: valueformat. - Press Enter.
-
Click Create application.
-
Set up the integration
To integrate Zabbix with the SAML app you created in Identity Hub, complete the setup both on the Zabbix side and in Identity Hub.
Set up the SAML application in Zabbix
Note
To set up the SAML application in Zabbix, the user needs the Super admin role.
Configure SAML authentication in Zabbix
-
To configure SAML authentication in Zabbix, in the left-hand panel, navigate to Users and then to Authentication.
-
In the main window, go to the SAML Settings tab. After the form opens, complete the steps below:
-
Activate the Enable SAML authentication option.
-
Activate the Enable JIT provisioning option.
Note
Enable JIT provisioning controls automatic creation of users in Zabbix when authenticating with SSO. If this option is disabled, only users who already have a Zabbix account will be able to authenticate.
-
Configure a link between Zabbix and Identity Hub:
-
Log in to Yandex Identity Hub
. -
In the left-hand panel, select
Apps and then, the SAML app. -
Under Identity provider (IdP) configuration, in the Overview tab, copy the following field values: Issuer / IdP EntityID, Login URL, and Logout URL.
-
Return to Zabbix and paste the copied addresses into these fields: IdP entity ID, SSO service URL, and SLO service URL.
Note
If you do not specify the address in SLO service URL, on logout of Zabbix, the user will be redirected to the Zabbix authentication form, not the Identity Hub authentication form.
-
-
In the Username attribute field, specify
login.Note
This attribute is used as username when authenticating in Zabbix. You can specify any attribute name you want, but it must match the name of the user attribute which has the
SubjectClaims.preferred_usernamevalue in your Identity Hub app. -
In the SP entity ID field, specify
zabbix.Warning
The SP entity ID value must be exactly the same in both Zabbix and your Identity Hub application.
-
In the Sign and Encrypt sections, leave all options disabled.
Tip
Yandex Identity Hub does not currently support request signature verification, so we recommend you leave the Sign and Encrypt section options disabled.
-
Enable the Case-sensitive login option if you want the login to be case-sensitive.
-
If the Enable JIT provisioning option is on, configure the automatic user creation settings in Zabbix. To do this, enable the Configure JIT provisioning option and follow these steps:
-
In the Group name attribute field, specify
groups: this attribute defines a user group in your Identity Hub app, which provides access to Zabbix. -
In the User name attribute field, enter
givenname. -
In the User last name attribute field, enter
surname. -
Under User group mapping, map your Identity Hub app's user group to the appropriate group and role in Zabbix. This will enable new users to automatically get their assigned group and role in Zabbix. To do this, click Add and follow these steps:
-
In the SAML group pattern field, specify a pattern to search for SAML app group names.
Note
The SAML group pattern field supports wildcard characters with
*. -
In the User groups field, specify the Zabbix groups to which new users will be automatically added on their first authentication.
-
In the User role field, specify the Zabbix role to assign to users when they first log in.
-
-
Optionally, under Media type mapping, configure mapping of your SAML app’s user attributes to receive notifications from Zabbix.
-
Leave the Enable SCIM provisioning option disabled.
Tip
Currently, Yandex Identity Hub does not support the SCIM protocol for automatic user management in other apps, so we recommend leaving the Enable SCIM provisioning option disabled.
-
-
-
In the main window, go to the Authentication tab. After the form opens, in the Deprovisioned users group field, select the
Disabledgroup.Warning
If the Enable JIT provisioning option is on, you must specify the Deprovisioned users group on the Authentication tab. This group is where deactivated users will be moved.
-
Save the settings by clicking Update.
Migrate the SAML app certificate and configure Zabbix
To migrate the SAML app certificate and configure Zabbix, follow these steps:
-
Download the identity provider (IdP) certificate:
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Apps and then, the SAML app. - On the Overview tab, under Application certificate, click Download certificate and save the file to your device.
- Log in to Yandex Identity Hub
-
Copy the resulting certificate file to the
/usr/share/zabbix/ui/conf/certsfolder on the Zabbix server. -
Configure access permissions.
chmod 644 /usr/share/zabbix/ui/conf/certs/<your_cert>.crt -
Open the
/usr/share/zabbix/ui/conf/zabbix.conf.phpZabbix configuration file and specify the path to the IdP certificate.$SSO['IDP_CERT'] = 'conf/certs/<your_cert>.crt';
Set up the SAML application in Yandex Identity Hub
Set up service provider endpoints
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Apps and then, the SAML app. - At the top right, click
Edit and in the window that opens:- In the **SP EntityID ** field, specify
zabbix. - In the ACS URL field, enter this address:
https://<your-domain>/zabbix/index_sso.php?acs. - Click Save.
- In the **SP EntityID ** field, specify
Configure user attributes
Warning
For integration with Zabbix, users must have the login attribute.
If users do not have the login attribute, add it:
-
Log in to Yandex Identity Hub
. -
In the left-hand panel, select
Apps and select the desired app. -
Navigate to the Attributes tab.
-
In the top-right corner, click
Add attribute and in the window that opens:- In the Attribute name field, enter
login. - In the Value field, select
SubjectClaims.preferred_username. - Click Add.
- In the Attribute name field, enter
If you have configured automatic user creation in Zabbix, add the user group attribute. Proceed as follows:
- In the top-right corner, click
Add group attribute and in the window that opens. - In the Attribute name field, specify
groups. - In the Transmitted groups field, select
Assigned groups only. - Click Add.
For more information about configuring attributes, see Configure user and group attributes.
Add users
For your organization's users to be able to authenticate in Zabbix with Identity Hub's SAML app, you need to explicitly add these users and/or user groups to the SAML app:
Note
Users and groups added to a SAML application can be managed by a user with the organization-manager.samlApplications.userAdmin role or higher.
-
If you have configured automatic user creation in Zabbix, create the relevant group:
Cloud Center UI- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Groups. - In the top-right corner of the page, click
Create group. - Enter the name:
zabbix-users. - Click Create group.
- Add users to the group:
- Navigate to the Members tab.
- Click Add member.
- In the window that opens, select the required users.
- Click Save.
- Log in to Yandex Identity Hub
-
Add users to the application:
Cloud Center UI- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Apps and select the required app. - Navigate to the Users and groups tab.
- Click
Add users. - In the window that opens, select the required user or user group.
- Click Add.
- Log in to Yandex Identity Hub
Make sure your application works correctly
To make sure both your SAML app and Zabbix integration work correctly, authenticate to Zabbix as one of the users you added to the app. Proceed as follows:
- In your browser, navigate to the address of your Zabbix instance, e.g.,
https://<your-domain>/zabbix/. - If you were logged in to Zabbix, log out.
- On the Zabbix authentication page, click Sign in with Single Sign-On (SAML).
- On the Yandex Cloud authentication page, enter your email address and user password. The user or group they belong to must be added to the application.
- Make sure you are logged in to Zabbix.