Creating a SAML app in Yandex Identity Hub for integration with Selectel
Selectel
To authenticate your organization's users in Selectel 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 Selectel:
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:
selectel-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 configure Selectel integration with the SAML app you created in Identity Hub, complete the configuration both on the Selectel side and in Identity Hub.
Set up the SAML app in Selectel
Note
An account owner
To set up SAML authentication in Selectel, create and configure an identity federation
- Log in to your Selectel account and select Account in the top panel.
- In the left-hand panel, under Access management, select Federations.
- Click Add federation.
After that, configure a link between Selectel and Identity Hub:
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Apps and then, the SAML app. - In the Overview tab, under Identity provider (IdP) configuration, copy the Issuer / IdP EntityID and Login URL field values.
- On the Overview tab, under Application certificate, click Download certificate and save the file to your device.
- Go back to Selectel, then in the Create federation menu:
- In the Name field, enter a name for the federation.
- Optionally, in the Description field, specify the federation description.
- Paste the copied values to the IdP Issuer and IdP login page link fields.
- Under Session lifetime, specify how long an authentication session will last until the user needs to reauthenticate, or leave the default value (24 hours).
- Optionally, to sign authentication requests, check the Sign authentication requests box.
- Optionally, to force users to authenticate after their Selectel session expires, check the Forced IdP authentication box.
- Click Create federation.
- In the Certificate name field, enter a name for the certificate.
- Use any text editor to open the certificate file you saved earlier, copy its contents, and paste it into the Certificate field.
- Click Add and then click Complete adding federation.
- On the new federation page, copy the ID field value.
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
https://api.selectel.ru/v1/federations/saml/<federation_id>, wherefederation_idis the federation ID you copied at the end of the previous step. - In the ACS URL field, enter this address:
https://api.selectel.ru/v1/auth/federations/<federation_id>/saml/acs. - Click Save.
- In the **SP EntityID ** field, specify
Configure digital signature verification (optional)
If you checked the Sign authentication requests box when setting up your federation, configure digital signature verification:
- Download a Selectel certificate
. - In the top-right corner of your SAML app, click
Edit and in the window that opens, enable Only accept signed requests: - Click Adding a certificate.
- Choose how to add a certificate:
- To add a certificate as a file, click Attach file and specify the path to it.
- To paste the contents of a copied certificate, select the Text method and paste the contents.
- Click Add and then click Save.
Add users
For your organization's users to be able to authenticate in Selectel with Identity Hub's SAML app, you need to explicitly add these users and/or user groups to your SAML application. Also, explicitly add users to Selectel.
Add users to the SAML application
Note
Users and groups added to a SAML application can be managed by a user with the organization-manager.samlApplications.userAdmin role or higher.
- 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.
Add users to Selectel
Before adding a user to Selectel, copy their ID from Identity Hub:
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Users. Find the user your want to add to Selectel in the list. - Copy the Username column value.
Then add the user to your Selectel account:
- Go back to Selectel, then select Account in the top panel:
- Go to Users.
- In the top-right corner, click Add user.
- Under User data:
- In the Login method field, select Federation (<federation_name>).
- Under External ID, enter the ID you copied.
- In the Email field, enter the user email address to receive instructions for completing the authentication.
- Optionally, provide a user description.
- Under Access settings, configure the user permission. To do this:
- Select the access scope: Account or Projects. For the Projects access scope, select the projects in the Project field.
- Assign a role to the user. To assign the
memberrole or higher to the user, your account balance must be at least ₽100. - Optionally, click Add permission to add another permission.
- Optionally, in the Group field, assign a group to the user.
- Optionally, in the Notifications field, select notification categories to send to the user email address.
- Click Add user.
Make sure your application works correctly
To make sure both your SAML app and Selectel integration work correctly, authenticate to Selectel as one of the users you added to the application. To do this:
- Open the email notifying of granted access to a Selectel account. The email contains the federation ID and an SSO authentication link.
- Click the link in the email to open the authentication page.
- Enter the Federation ID.
- Click Log in.
- 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.
- After successful authentication in Identity Hub, you will be redirected to the Selectel login page. Enter your full name in the Full name field.
- Click Log in.
- Make sure you have successfully authenticated in Selectel.