SAML¶
When configuring SAML single sign-on, first upload the enterprise identity provider (IdP) metadata to Guance, then enter the Entity ID and Assertion Consumer Service (ACS) URL generated by Guance back into the IdP.
Prerequisites¶
Create or open the application used for single sign-on in the enterprise identity provider console, and select SAML 2.0 as the protocol. Prepare the following information before configuration.
| Preparation Item | Description |
|---|---|
| Administrative permissions | SSO management permissions for the target workspace and IdP application management permissions. |
| IdP metadata document | The SAML metadata XML file downloaded from the IdP application. If the IdP requires the Entity ID and ACS URL to be filled in first, see How to obtain metadata first. |
| User attributes and test account | Confirm the attribute names that the IdP uses when returning the username and email in SAML assertions, and prepare an employee test account with an enterprise email address. |
Configuration Steps¶
Step 1: Access the configuration page¶
In the target workspace, go to Management > Member Management > SSO Management > User SSO, select SAML, and click Add Identity Provider.
Step 2: Fill in basic information¶
- Identity Provider: A platform that provides identity management services and is used to manage user identities and authentication information. Define a name here (❗️This custom display name will appear as the IdP alias on the login selection screen. We recommend a recognizable name, such as the company's Azure AD);
- Metadata Document: Upload the XML file downloaded from the IdP application. Guance reads the IdP's login URL and signing certificate from the file.
- Remarks: A custom description used to record notes about the identity provider;
Step 3: Configure field mapping¶
Enter the attribute names returned by the IdP in SAML assertions into the corresponding fields. For example, if the IdP places alice@example.com in the Email attribute, enter Email in the Email field.
| Field | Required | Value |
|---|---|---|
| Username | Required | The username attribute name returned by the IdP. |
| Required | The enterprise email attribute name returned by the IdP. | |
| Mobile number | Optional | The mobile number attribute name returned by the IdP, used to supplement the number when the account does not yet have a mobile number. |
Mobile number write rules¶
During SAML login, the system handles the mobile number based on the account's mobile number and the IdP's response.
| Account Mobile Number | IdP Response | Handling |
|---|---|---|
| Set | Mobile number returned or not returned | Retain the existing number on the account; do not overwrite or clear it. |
| Not set | A valid number is obtained through mobile number mapping | Write the number returned by the IdP to the account. |
| Not set | No mobile number returned | Do not write a mobile number; login is not affected. |
Employees can also set or change their mobile numbers in Account Settings. Voice Call (IVR) Notification uses the mobile number saved in the account. If the account has no number, the employee must add a mobile number before receiving voice notifications.
Step 4: Set login control¶
- In Access Restriction, enter the enterprise email addresses or email domains allowed to log in through this IdP for the first time, such as
alice@example.comorexample.com. Separate multiple values with commas. - In Role Authorization, select the default role for first joining the workspace. After role mapping is enabled on the IdP, roles are assigned according to role mapping rules.
- In Session Persistence, set the inactive session duration and maximum login session duration.
Session persistence¶
| Configuration Item | Console Value Range | Default Value | Description |
|---|---|---|---|
| Inactive login session persistence | 30–10,080 minutes | 10,080 minutes | The login session expires after this duration of continuous inactivity. |
| Maximum login session persistence | 1–30 days | 30 days | The login session expires after this duration from login. |
The system writes these two durations when creating an SSO account. For example, after changing the inactivity duration from 30 minutes to 60 minutes, accounts created afterward use 60 minutes, while accounts created before the change still use 30 minutes.
Step 5: Save and obtain the service provider configuration¶
Click Save. In the SAML list, find the identity provider you just created, click Edit, and view Service Provider Details.
| Field | Description |
|---|---|
| Login URL | The single sign-on entry point for this workspace, which can be configured in the enterprise portal. |
| Metadata | Click to download the Guance service provider (SP) metadata XML for import into the IdP. |
| Entity ID | The identifier of Guance as a service provider. Copy the full value shown here to the Entity ID or Audience field in the IdP. |
| ACS URL | The address to which the IdP sends SAML assertions. Copy the full value shown here to the Reply URL or ACS URL field in the IdP. |
Step 6: Configure the service provider in the IdP¶
Return to the IdP application settings. If the IdP supports import, upload the XML downloaded in the previous step as Service Provider (SP) Metadata. For manual configuration, enter the values copied in the previous step according to the following table.
| Field on the IdP Side | Value |
|---|---|
| Identifier, Audience URI, or SP Entity ID | Entity ID |
| Reply URL, ACS URL, or Single Sign-On URL | ACS URL |
Configure the IdP to return SAML responses to the ACS URL via HTTP POST and sign SAML assertions. Ensure that the assertion attributes include the test user's enterprise email and correspond to the Email attribute name entered in step 3.
Save or publish the IdP configuration and assign application access to the test account. Return to Guance and confirm that the identity provider is enabled.
Integration examples¶
Alibaba Cloud IDaaS · Authing · Microsoft Entra ID · AWS IAM Identity Center · Okta · Keycloak
Login verification¶
- Open the login page of the site in an incognito browser window, click Single Sign-On, and enter the test employee's full enterprise email.
- Click Get Login URL, select the identity provider you just configured, and complete login on the enterprise authentication page.
- After returning to Guance, go to the target workspace and verify the role assigned to the employee. If the enterprise portal also provides a login entry point, use the same account to verify login initiated from the enterprise portal.
Notes¶
- When Role Mapping is enabled, an employee must match at least one rule to enter the workspace through this IdP. After role mapping is disabled, employees who already have roles retain their original roles, and employees who have not been assigned roles receive the default role of this IdP. For details, see Role Mapping.
- After an identity provider is deleted, employees can no longer use that IdP to enter the corresponding workspace.
- By default, a workspace can be configured with up to 10 SAML IdPs, counted separately from OIDC. After employees complete enterprise authentication, they can enter workspaces they are authorized to access.
- Account identification is based on the enterprise email and the IdP. Regular accounts and SSO accounts are managed separately. When an employee meets the access conditions and does not yet have a corresponding SSO account, the system creates an SSO account.