Configure federation on the Active Directory Federation Services side
The AD FS configuration in these instructions is described using Windows Server 2019 as an example, steps may differ for other versions.
You should configure Active Directory Federation Services (AD FS) according to Microsoft's recommendations for deploying AD FS clusters and proxy servers.
Build a relationship of trust
- On the AD FS server, open Server Manager.
- On the menu. Tools select AD FS Management.
- In the block Actions select Relying Party Trust → Add Relying Party Trust.
- In step Welcome select Claims aware.
- Click Start.
- In step Select Data Source select Enter data about the relying party manually.
- Click Next.
- In the field Display name enter a name for the trust relationship.
- Click Next.
- If at federation you checked the box Sign authentication requests, on the step Configure Certificate insert Selectel certificate for signing requests It can be downloaded on the federation page.
- Click Next.
- In step Configure URL check the box Enable support for the SAML 2.0 WebSSO protocol and specify the URL to which users will be redirected after authentication:
https://api.selectel.ru/v1/auth/federations/<federation_id>/saml/acs
. Specify<federation_id>
— ID of the federation on the Selectel side, you can look in the control panels: go to the section Access control →Federations → federation line → field ID. - Click Next.
- In step Configure Identifiers Specify URL:
https://api.selectel.ru/v1/federations/saml/<federation_id>
- Click Add →Next.
- Optional: at step Choose Access Control Policy Specify who will be able to authenticate with this federation. The default policy is Permit for everyonewhich allows access for all users.
- In step Ready to Add Trust check the data and press Close.
Customize Claims Mapping
After successful authentication in AD FS, Selectel will receive a SAML message. To correctly identify the user, you must configure the user data to match the elements of the SAML message.
-
In the management console AD FS en bloc Relying Party Trusts right-click on the trust relationship with the verifying party and select Edit Claim Issuance Policy.
-
Click Add Rule.
-
In step Choose Rule Type in the field Claim rule template select Send LDAP Attributes as Claims.
-
Click Next.
-
In step Configure Claim Rule in the field Claim rule name enter the name of the rule.
-
In the field Attribute store select Active Directory.
-
In the column LDAP Attribute specify what will be passed as the user ID (External ID). You can specify:
- User-Principal-Name — username;
- E-Mail-Addresses — email.
-
In the column Outgoing Claim Type select Name ID.
-
Click Finish → OK.