This is a translation of the original English documentation page. Help us make it better.

11 SAML beállítás az Okta segítségével

Ez a szakasz leírja, hogyan konfigurálható az Okta a SAML 2.0 engedélyezéséhez hitelesítés a Zabbix számára.

Okta configuration

1. Go to https://okta.com and register or sign in to your account.

2. In the Okta web interface navigate to Applications → Applications and press "Add Application" button ().

3. Press "Create New App" button (). In a popup window select Platform: Web, Sign on method: SAML 2.0 and press "Create" button.

4. Fill in the fields in the General settings tab (the first tab that appears) according to your preferences and press "Next".

5. In the Configure SAML tab enter the values provided below, then press "Next".

  • In the GENERAL section:
    • Single sign on URL: https://<your-zabbix-url>/ui/index_sso.php?acs
      The checkbox Use this for Recipient URL and Destination URL should be marked)
    • Audience URI (SP Entity ID): zabbix
      Note, that this value will be used within the SAML assertion as a unique service provider identifier (if not matching, the operation will be rejected). It is possible to specify a URL or any string of data in this field.
    • Default RelayState:
      Leave this field blank; if a custom redirect is required, it can be added in Zabbix in the Administration → Users settings.
    • Fill in other fields according to your preferences.

If planning to use encrypted connection, generate private and public encryption certificates, then upload public certificate to Okta. Certificate upload form appears when Assertion Encryption is set to Encrypted (click Show Advanced Settings to find this parameter).

  • In the ATTRIBUTE STATEMENTS (OPTIONAL) section add an attribute statement with:
    • Name: usrEmail
    • Name format: Unspecified
    • Value: user.email

6. At the next tab, select "I'm a software vendor. I'd like to integrate my app with Okta" and press "Finish".

7. Now, navigate to Assignments tab and press the "Assign" button, then select Assign to People from the drop-down.

8. In a popup that appears, assign created app to people that will use SAML 2.0 to authenticate with Zabbix, then press "Save and go back".

9. Navigate to the Sign On tab and press the "View Setup Instructions" button. Setup instructions will be displayed in a new tab; keep this tab open while configuring Zabbix.

Zabbix konfiguráció

1. A Zabbix alkalmazásban lépjen a SAML beállításokhoz az Adminisztráció → részben Hitelesítés rész, és másolja ki az információkat az Okta beállításból utasításokat a megfelelő mezőkbe:

  • Identity Provider Single Sign-On URL → SSO szolgáltatás URL-je
  • Identity Provider Issuer → IdP entitásazonosító
  • Felhasználónév attribútum → Attribútum neve (usrEmail)
  • SP entitásazonosító → Közönség URI

2. Töltse le az Okta beállítási útmutatójában található tanúsítványt oldalt az ui/conf/certs mappába idp.crt néven, és állítsa be a 644-es engedélyt futó:

chmod 644 idp.crt

Vegye figyelembe, hogy ha egy régebbi verzióról frissített a Zabbix 5.0-ra, akkor manuálisan is hozzá kell adnia ezeket a sorokat a zabbix.conf.php fájlhoz (az //ui/conf/ // könyvtárban található):

// SAML hitelesítéshez használatos.
       $SSO['SP_KEY'] = 'conf/certs/sp.key'; // A privát kulcs elérési útja.
       $SSO['SP_CERT'] = 'conf/certs/sp.crt'; // A nyilvános kulcs elérési útja.
       $SSO['IDP_CERT'] = 'conf/certs/idp.crt'; // IdP nyilvános kulcs elérési útja.
       $SSO['BEÁLLÍTÁSOK'] = []; // További beállítások

Lásd az általános SAML Hitelesítés további részletekért.

3. Ha az Assertion Encryption beállítása Titkosított az Oktában, a Az Encrypt paraméter "Assertions" jelölőnégyzetét be kell jelölni Zabbix is.

4. A beállítások mentéséhez nyomja meg a „Frissítés” gombot.

A SAML-lel való bejelentkezéshez a Zabbixban lévő felhasználónévnek egyeznie kell az Okta e-mailt. Ezek a beállítások az Adminisztráció → menüpontban módosíthatók Felhasználók rész a Zabbix webes felületén.

SCIM provisioning

1. To turn on SCIM provisioning, go to "General" -> "App Settings" of the application in Okta.

Mark the Enable SCIM provisioning checkbox. As a result, a new Provisioning tab appears.

2. Go to the "Provisioning" tab to set up a SCIM connection:

  • In SCIM connector base URL specify the path to the Zabbix frontend and append api_scim.php to it, i.e.:
    https://<your-zabbix-url>/zabbix/api_scim.php
  • Unique identifier field for users: email
  • Authentication mode: HTTP header
  • In Authorization enter a valid API token with Super admin rights

If you are using Apache, you may need to change the default Apache configuration in /etc/apache2/apache2.conf by adding the following line:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

Otherwise Apache does not send the Authorization header in request.

3. Click on Test Connector Configuration to test the connection. If all is correct a success message will be displayed.

4. In "Provisioning" -> "To App", make sure to mark the following checkboxes:

  • Create Users
  • Update User Attributes
  • Deactivate Users

This will make sure that these request types will be sent to Zabbix.

5. Make sure that all attributes defined in SAML are defined in SCIM. You can access the profile editor for your app in "Provisioning" -> "To App", by clicking on Go to Profile Editor.

Click on Add Attribute. Fill the values for Display name, Variable name, External name with the SAML attribute name, for example, user_name.

External namespace should be the same as user schema: urn:ietf:params:scim:schemas:core:2.0:User

6. Go to "Provisioning" -> "To App" -> "Attribute Mappings" of your application. Click on Show Unmapped Attributes at the bottom. Newly added attributes appear.

7. Map each added attribute.

8. Add users in the "Assignments" tab. The users previously need to be added in Directory -> People. All these assignments will be sent as requests to Zabbix.

9. Add groups in the "Push Groups" tab. The user group mapping pattern in Zabbix SAML settings must match a group specified here. If there is no match, the user cannot be created in Zabbix.

Information about group members is sent every time when some change is made.