Skip to content

Authing Single Sign-On Example (SAML)

This example describes how to use an Authing account to log in to a Guance SaaS workspace. Prepare application management permissions for the Authing user pool, SSO management permissions for the target workspace, and a test user with the email field populated. This example uses alice@example.com.

1. Create an Application in Authing and Export Metadata

  1. Log in to the Authing Console and go to the target user pool. In User Management > User List, create or open the test user, and verify that Email is alice@example.com.
  2. Go to Applications > Self-built Applications, and click Create Application. For the application name, you can enter Guance SAML; for the authentication address, enter the Guance login page URL for your site. If an application already exists, open its configuration page.
  3. Under Enable Identity Provider, turn on SAML2 Identity Provider, and enable SAML2 Provider. In the legacy console, the entry is located under More Identity Protocols.
  4. Enter the temporary ACS URL for your site in Default ACS URL, save, and then download the SAML2 Metadata XML. Configure the actual ACS URL in step 3. Authing SAML2 identity provider documentation
  5. In Authentication Configuration, select SAML2 as the default protocol. In Access Authorization > Application Access Control, confirm that the test user has access to the application. If access is restricted, click Add and authorize the user by email. Authing application access authorization

Configure SAML2 and obtain metadata in the Authing application

2. Add a SAML Identity Provider in Guance

  1. In the target workspace, go to Management > Member Management > SSO Management > User SSO, select SAML, and click Add Identity Provider.
  2. In Identity Provider, enter Authing; in Metadata Document, upload the Authing XML downloaded in the previous step.
  3. In Mapping Configuration, set both Email and Username to Email, corresponding to mappings in the next step. Fill in Mobile Number as needed.
  4. In Access Restrictions, enter alice@example.com, select Role Authorization, confirm Session Persistence, and save. For testing, you can select Read-only Member and use the default session duration.
  5. Click Edit for this IdP, and copy the Entity ID and Assertion URL from Service Provider Details.

3. Update Authing's ACS, Audience, and Attribute Mapping

  1. Return to the SAML2 Identity Provider in the Authing application, and replace Default ACS URL with the Assertion URL copied in the previous step.
  2. Configure the following fields in the JSON under Settings, and retain the application's other existing configurations. Replace the example value of audience with the Entity ID, and replace the example values of recipient and destination with the Assertion URL.

    {
      "audience": "https://auth.example.com/saml/metadata.xml",
      "recipient": "https://auth.example.com/saml/assertion/sso_example",
      "destination": "https://auth.example.com/saml/assertion/sso_example",
      "mappings": {
        "email": "Email"
      }
    }
    

    The left side of mappings is the Authing user field, and the right side is the assertion attribute name. If your organization stores email in the username field, change email on the left to username, and still enter Email on the right.

  3. For the application created in this example, leave samlRequestSigningCert empty to match the unsigned authentication requests sent by default by Guance. Save the Authing configuration, and in the SAML list in Guance, confirm that Authing is enabled.

4. Verify Login

  1. Open the Guance login page for your site in an incognito window, select Single Sign-On, enter alice@example.com, and click Get Login URL.
  2. Select Authing and click Authenticate/Log In, then complete authentication on the Authing login page using the authorized test account.
  3. After returning to Guance, go to the target workspace and verify the role. If a message indicates that the email was not found after authentication, check that the source field in Authing has a value, and confirm that Email is mapped to Email. Login troubleshooting

Feedback

Is this page helpful?