If your enterprise uses Active Directory (AD) Domain Services to manage user account information, you can use EDS (Elastic Desktop Service) as the service provider (SP) and Active Directory Federation Services (AD FS) as the identity provider (IdP). The two exchange metadata files over the Security Assertion Markup Language (SAML) protocol to implement single sign-on (SSO). This tutorial describes how to set up this integration.
Background information
Single sign-on (SSO) is a secure communication technology that allows you to efficiently access multiple trusted application systems with a single sign-on. SSO implements logon based on identity federation.
The following terms are frequently used in SSO scenarios:
-
Identity provider (IdP): an entity that contains the metadata of an external identity provider. An IdP provides identity management services, collects and stores user identity information such as usernames and passwords, and verifies user identities on user logons.
Common IdPs:
-
On-premises IdPs: use on-premises architecture, such as Microsoft Active Directory Federation Service (AD FS) and Shibboleth.
-
Cloud IdP: Azure AD, Google Workspace, Okta, and OneLogin.
-
-
Service provider (SP): an application that uses the identity management feature of an IdP to provide users with specific services based on trust relationships with IdPs. In specific identity systems that do not comply with the Security Assertion Markup Language (SAML) protocol, such as OpenID Connect (OIDC), SP is the relying party of an IdP.
-
SAML 2.0: a standard protocol for user identity authentication for enterprises. It is one of the technical implementations for communication between SPs and IdPs. SAML is a de facto standard that is used by enterprises to implement SSO.
Single sign-on (SSO) is a secure communication technology that allows you to efficiently access multiple trusted application systems with a single sign-on. SSO implements logon based on identity federation.
The following terms are frequently used in SSO scenarios:
Identity provider (IdP): an entity that contains the metadata of an external identity provider. An IdP provides identity management services, collects and stores user identity information such as usernames and passwords, and verifies user identities on user logons.
Common IdPs:
On-premises IdPs: use on-premises architecture, such as Microsoft Active Directory Federation Service (AD FS) and Shibboleth.
Cloud IdP: Azure AD, Google Workspace, Okta, and OneLogin.
Service provider (SP): an application that uses the identity management feature of an IdP to provide users with specific services based on trust relationships with IdPs. In specific identity systems that do not comply with the Security Assertion Markup Language (SAML) protocol, such as OpenID Connect (OIDC), SP is the relying party of an IdP.
SAML 2.0: a standard protocol for user identity authentication for enterprises. It is one of the technical implementations for communication between SPs and IdPs. SAML is a de facto standard that is used by enterprises to implement SSO.
In an AD scenario, if you do not want to create an AD-type office network in the EDS console to connect to AD, which lets EDS retrieve your AD information, you can instead implement SSO by creating convenience accounts in the EDS console that use the same usernames as your AD users.
Check which scenario applies to you before you start. If you have already connected your enterprise AD and created an AD-type office network, you can configure SSO for AD users directly. For more information, see Configure SSO for AD users in Elastic Desktop Service by using AD FS.
Prerequisites
The configuration in this tutorial spans your AD environment, your AD FS server, the EDS console, and the client. Make sure that the following requirements are met before you start:
AD Domain Services — Your enterprise uses AD Domain Services to manage user account information.
AD FS server — AD FS is deployed in your environment. You can log on to the server on which AD FS is deployed, open Server Manager, and download the IdP metadata file that AD FS provides.
Office network — The office network for which you want to enable SSO already exists in the EDS console.
Client — Install the Windows client on the device that you use to verify SSO.
The username of a convenience account must be the same as the username of the corresponding AD user. Usernames are not case-sensitive. This requirement applies to both account creation methods described in Step 1.
Step 1: Create convenience accounts that use the same usernames as your AD users
Create convenience accounts in the EDS console by using one of the following methods:
Method | When to use | What you prepare |
Manual entry | You have only a few users. | Nothing. You enter the information of each user manually, one account at a time. |
Batch import | You have a large number of users. |
Prepare the CSV file for batch import
If you use batch import, perform the following steps to prepare a CSV file that meets the format requirements for convenience accounts. If you use manual entry, skip this section.
On the AD domain server, create a CSV file that contains the AD user information.
Check whether the existing AD user information meets the requirements.
AD usernames must meet the username format requirements for convenience accounts. If a username does not meet the requirements, modify it first. Otherwise, you cannot create the corresponding convenience account. For more information, see Username requirements for convenience accounts.
In PowerShell, run the
Get-ADUsercommand to export a CSV file that contains the AD user information.Adjust the command parameters to export the CSV file that you need. For example, to export the information of all AD users to a CSV file and save the file to a specific path, run the following command:
Get-ADUser -filter * |export-csv <file_path> -Encoding utf8C:\Usersdirectory, run the following command:Get-ADUser -filter * |export-csv C:\Users\test.csv -Encoding utf8When you adjust the user information, take note of the following items:
The required format for the import file is as follows:
For user-activated convenience accounts: The first column is the username (required), the second is the email address (required), and the third is the phone number (optional).
For administrator-activated convenience accounts: The first column is the username (required), the second is the email address (optional), the third is the phone number (optional), and the fourth is the password (required).
For user-activated convenience accounts: The first column is the username (required), the second is the email address (required), and the third is the phone number (optional).
For administrator-activated convenience accounts: The first column is the username (required), the second is the email address (optional), the third is the phone number (optional), and the fourth is the password (required).
In the exported CSV file, you can use the SamAccountName column as the username column of the convenience account and the UserPrincipalName column as the email address column. If the actual email address of a user differs from the UserPrincipalName value, enter the email address manually.
The required format for the import file is as follows:
Create the convenience accounts
Create the accounts in the EDS console. If you use batch import, import the CSV file that you prepared.
Log on to the EDS enterprise console.
In the left-side navigation pane, choose User Center > User Management.
On the User Management page, click the User tab, and then click Create User. You can create convenience accounts by using one of the following methods:
Manual entry
Click the Manual Entry tab, configure the parameters, and then click Manual Entry.
Parameter
Required
Description
User Type
Yes
The type of the convenience account. Valid values: User-activated and Administrator-activated.
Username
Yes
The username used to log on to the Alibaba Cloud Workspace terminal. The username must be 3 to 25 characters long and start with a lowercase letter or a digit. It can contain lowercase letters, digits, hyphens (-), and underscores (_). The username cannot consist only of digits or be a reserved account name of the operating system. For more information, see Convenience user naming conventions.
Display Name
No
A display name for identification purposes. This name is not visible to the end user.
Contact Info (Email Address)
Yes
The email address is used to receive notifications, such as cloud computer assignment details, logon information, initial passwords, and password reset alerts. Make sure that you enter a valid email address.
Parent Organization
No
Defines the user's position within your business's organizational structure, which is hierarchical. A user can belong to only one organization.
You can assign the user to an organization during creation or add the user to an organization later as needed.
User Group
No
A collection of users. A user can belong to multiple user groups, and a user group can contain users from different organizations. User groups have no hierarchy.
You can use user groups to bulk-assign permissions for shared cloud computers, cloud browsers, and cloud applications. You can also apply different logon policies and file approval permissions to different user groups for fine-grained access control.
Password
Yes
This parameter is required for Administrator-activated users. The password must be at least 10 characters long and contain characters from at least three of the following types: uppercase letters, lowercase letters, digits, and special characters (excluding spaces).
Password Validity
No
By default, passwords never expire. You can also set a validity period from 7 to 365 days. When a password expires, the user must reset it to log on again.
Account Lock Time
No
This option is available only for Administrator-activated users. You can set a time to lock the account. After an account is locked, the end user cannot use this convenience account to log on to an Alibaba Cloud Workspace terminal.
Grant Local Admin Permission
No
Remarks
No
Enter supplementary information about the account as needed.
Batch entry
Click the Batch Entry tab, configure the parameters, and then click Disable.
Parameter
Required
Description
User Type
Yes
The type of the convenience account. Valid values: User-activated and Administrator-activated.
Password Validity
No
By default, passwords never expire. You can also set a validity period from 7 to 365 days. When a password expires, the user must reset it to log on again.
Account Lock Time
No
This option is available only for Administrator-activated users. You can set a time to lock the account. After an account is locked, the end user cannot use this convenience account to log on to an Alibaba Cloud Workspace terminal.
Grant Local Admin Permission
No
By default, new convenience accounts have Grant Admin Permission permission.
NoteA user with local admin permission can install software or modify system settings on a cloud computer.
Changes to local admin permissions take effect after you restart the cloud computer.
Upload File
Yes
Click Download, open the downloaded template, enter the user information in the specified format, and then save the file.
For user-activated scenarios, when you enter user information, the first column
Usernameis the username, the second columnEmailis the user's email address, and both are required fields.If the user is administrator-activated, the first column
Usernameis the username, and the fourth columnPasswordis the password. Both are required fields.If you want to assign a new convenience account to an organizational structure, you can enter the ID of the target organizational structure in the last column of the template,
OrgId. To find theOrgId, hover your mouse pointer over the organizational structure and view the ID in the tooltip.
Click Upload Local File, select the template file that contains the user information, and follow the on-screen instructions. The system automatically imports the user information from the file.
After the import is complete, a Created. message appears in the Create User panel. You can click View Account to view the import status of each user's data. If the import fails, check whether the user information in the file is in the correct format.
NoteThe system does not send a notification when a convenience account is created. Notifications are sent only after a cloud computer or a shared cloud computer is assigned to the user.
Log on to the EDS enterprise console.
In the left-side navigation pane, choose User Center > User Management.
On the User Management page, click the User tab, and then click Create User. You can create convenience accounts by using one of the following methods:
Manual entry
Click the Manual Entry tab, configure the parameters, and then click Create User.
Parameter | Required | Description |
User Type | Yes | The type of the convenience account. Valid values: User-activated and Administrator-activated. |
Username | Yes | The username used to log on to the Alibaba Cloud Workspace terminal. The username must be 3 to 25 characters long and start with a lowercase letter or a digit. It can contain lowercase letters, digits, hyphens (-), and underscores (_). The username cannot be a reserved account name of the operating system. For more information, see Convenience user naming conventions. |
Display Name | No | A display name for identification purposes. This name is not visible to the end user. |
Contact Info (Email Address) | Yes | The email address is used to receive notifications, such as cloud computer assignment details, logon information, initial passwords, and password reset alerts. Make sure that you enter a valid email address. |
Parent Organization | No | Defines the user's position within your business's organizational structure, which is hierarchical. A user can belong to only one organization. You can assign the user to an organization during creation or add the user to an organization later as needed. |
User Group | No | A collection of users. A user can belong to multiple user groups, and a user group can contain users from different organizations. User groups have no hierarchy. You can use user groups to bulk-assign permissions for shared cloud computers, cloud browsers, and cloud applications. You can also apply different logon policies and file approval permissions to different user groups for fine-grained access control. |
Password | Yes | This parameter is required for Administrator-activated users. The password must be at least 10 characters long and contain characters from at least three of the following types: uppercase letters, lowercase letters, digits, and special characters (excluding spaces). |
Password Validity | No | By default, passwords never expire. You can also set a validity period from 7 to 365 days. When a password expires, the user must reset it to log on again. |
Account Lock Time | No | This option is available only for Administrator-activated users. You can set a time to lock the account. After an account is locked, the end user cannot use this convenience account to log on to an Alibaba Cloud Workspace terminal. |
Grant Local Admin Permission | No | |
Remarks | No | Enter supplementary information about the account as needed. |
Batch entry
Click the Batch Entry tab, configure the parameters, and then click Disable.
Parameter | Required | Description |
User Type | Yes | The type of the convenience account. Valid values: User-activated and Administrator-activated. |
Password Validity | No | By default, passwords never expire. You can also set a validity period from 7 to 365 days. When a password expires, the user must reset it to log on again. |
Account Lock Time | No | This option is available only for Administrator-activated users. You can set a time to lock the account. After an account is locked, the end user cannot use this convenience account to log on to an Alibaba Cloud Workspace terminal. |
Grant Local Admin Permission | No | By default, new convenience accounts have Grant Admin Permission permission. Note
|
Upload File | Yes |
|
The system does not send a notification when a convenience account is created. Notifications are sent only after a cloud computer or a shared cloud computer is assigned to the user.
Step 2: Configure AD FS as a trusted SAML IdP in the EDS console
Obtain the IdP metadata file from AD FS and download it to your local machine.
The URL of the IdP metadata file is
https://<ADFS server>/FederationMetadata/2007-06/FederationMetadata.xml, where<ADFS server>is the domain name or IP address of the AD FS server.In the EDS console, upload the IdP metadata file provided by AD FS.
Log on to the EDS enterprise console.
In the left-side navigation pane, choose Networks & Storage > Office Network.
In the top navigation bar, select a region.
On the office network page, find the office network for which you want to enable SSO, and then click its office network ID.
In the More Information section at the bottom of the office network details page, click Expand in the upper-right corner, and then turn on the SSO switch.
Next to IdP Metadata, click Upload and upload the IdP metadata file that you obtained from AD FS.
Log on to the EDS enterprise console.
In the left-side navigation pane, choose Networks & Storage > Office Network.
In the top navigation bar, select a region.
Step 3: Obtain the SP metadata file and configure EDS as a trusted SAML SP in AD FS
This step spans two systems: you obtain the SP metadata file in the EDS console, and then you register the file in AD FS as a Relying Party Trust.
Obtain the SP metadata file from the Elastic Desktop Service console.
Log on to the EDS enterprise console.
In the left-side navigation pane, choose Networks & Storage > Office Network.
In the top navigation bar, select a region.
On the office network page, find the office network for which you want to enable SSO and click the office network ID.
In the More Information section at the bottom of the page, find Application Metadata and click Download Application Metadata File.
The metadata file is automatically downloaded to your computer.
Log on to the EDS enterprise console.
In the left-side navigation pane, choose Networks & Storage > Office Network.
In the top navigation bar, select a region.
On the office network page, find the office network for which you want to enable SSO and click the office network ID.
In the More Information section at the bottom of the page, find Application Metadata and click Download Application Metadata File.
The metadata file is automatically downloaded to your computer.
Upload the SP metadata file provided by EDS to AD FS.
Log on to the server on which AD FS is deployed and open Server Manager.
In the upper-right corner, choose Tools > AD FS Management.
In the AD FS dialog box, choose Trust Relationships > Relying Party Trusts in the left-side navigation pane.
In the Actions pane on the right, click Add Relying Party Trust.
Follow the wizard to complete the remaining steps.
When you select the data source, select Import data about the relying party from a file and import the SP metadata file that you obtained from EDS. Retain the default settings in the other steps.
In AD FS, edit the claim rules of the Relying Party Trust to configure the SAML assertion attributes for the EDS SP.
In the Relying Party Trusts list, right-click the Relying Party Trust that you added in the previous step and select Edit Claim Rules.
In the dialog box that appears, click Add Rule.
Follow the wizard to configure the rule.
Use the following settings:
When you select the rule type, set the claim rule template to Transform an Incoming Claim.
When you configure the claim rule, set the incoming claim type to UPN and the outgoing claim type to Name ID.
Obtain the SP metadata file from the Elastic Desktop Service console.
Step 4: Verify that SSO takes effect
Log on from the client with an AD user to confirm that the AD FS and convenience account configurations work end to end.
The following steps use Windows client version 7.2.2 as an example.
-
Open the client and select Enterprise Edition & Commercial Edition at the top. At the bottom, accept the privacy policy, enter your organization ID or office network ID, and click the icon.
On the AD FS logon page, enter the credentials of an AD user.
After you log on, go to the cloud resource list in the client, find the card of the target cloud desktop, and then click Start and Connect on the card.
The cloud desktop starts and connects. SSO takes effect when you reach the cloud desktop after you authenticate on the AD FS logon page with your AD credentials.
Open the client and select Enterprise Edition & Commercial Edition at the top. At the bottom, accept the privacy policy, enter your organization ID or office network ID, and click the icon.