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¶
- 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. - 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. - 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.
- 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
- 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
2. Add a SAML Identity Provider in Guance¶
- In the target workspace, go to Management > Member Management > SSO Management > User SSO, select SAML, and click Add Identity Provider.
- In Identity Provider, enter
Authing; in Metadata Document, upload the Authing XML downloaded in the previous step. - In Mapping Configuration, set both Email and Username to
Email, corresponding tomappingsin the next step. Fill in Mobile Number as needed. - 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. - 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¶
- Return to the SAML2 Identity Provider in the Authing application, and replace Default ACS URL with the Assertion URL copied in the previous step.
-
Configure the following fields in the JSON under Settings, and retain the application's other existing configurations. Replace the example value of
audiencewith the Entity ID, and replace the example values ofrecipientanddestinationwith 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
mappingsis the Authing user field, and the right side is the assertion attribute name. If your organization stores email in the username field, changeemailon the left tousername, and still enterEmailon the right. -
For the application created in this example, leave
samlRequestSigningCertempty to match the unsigned authentication requests sent by default by Guance. Save the Authing configuration, and in the SAML list in Guance, confirm thatAuthingis enabled.
4. Verify Login¶
- 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. - Select
Authingand click Authenticate/Log In, then complete authentication on the Authing login page using the authorized test account. - 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
