SSO using SAML
Stackguardian facilitates a secure and streamlined access management process for Business and Enterprise clients by offering Single Sign-On (SSO) functionality. This enables IT administrators to centrally manage team access and ensures that sensitive information is kept secure. With SSO, users can access the app with ease through a single authentication source.
This guide provides instructions for setting up SAML SSO with StackGuardian using Azure as the Identity Provider (IdP).
Step 1: Create a new application integration​
- Sign in to the Azure portal.
- Navigation to "Microsoft Entra ID" service.
- Navigate to "Enterprise Applications" and then select “All Applications”.
- Add a new application to use with StackGaurdian Platform, select “New application”.
- In the Microsoft Entra Gallery, Click on “Create your own application”.
- Now Enter the name of your application and under the purpose, use "Integrate any other application you don't find in the gallery (Non-gallery)".
- Create and wait until the application is added, this might take a few seconds.
Create a new application
Step 2: Create SAML Integration​
- Navigate to the application’s integration page, under Getting Started click on “Set up single sign on”.
- Under the Select a single sign-on method page, select SAML.
Create SAML Integration
Step 3: SAML Settings​
- Go to the Basic SAML Configuration section.
- Click on the Edit button to edit the SAML Configuration.
- Next, find the field labelled "Identifier (EntityID)" and enter the following value:
urn:amazon:cognito:sp:eu-central-1_xut85XJiL
- In the Configuration modal, look for the field labelled "Reply URL" known as Assertion Consumer Service (ACS) URL and enter the following value:
https://stackguardian-sso-prod.auth.eu-central-1.amazoncognito.com
- Save the changes made.
For the secondary region (backup):​
- Repeat the first two steps mentioned above.
- Next, find the field labeled "Identifier (EntityID)" and enter the following value for the secondary region.
urn:amazon:cognito:sp:eu-west-1_KZtybWlR7
- In the Configuration modal, look for the field labeled "Reply URL," and enter the following value for the secondary region.
https://stackguardian-prod-sso-alt.auth.eu-west-1.amazoncognito.com
- Save the changes made for the secondary region.
By configuring the SAML settings with the provided information for 2 regions, we will setup redundancy, one in the primary region (eu-central-1) and the other in the secondary region (eu-west-1). This setup ensures that if the primary region experiences any issues or downtime, the secondary region will serve as a backup, maintaining service continuity.
SAML settings
Step 4: Configure Attributes & Claims​
- Click on the "Edit" button for User Attributes & Claims.
- Click on "Add a Group Claim".
- On the popover, select "All groups" and "Group ID" under source attribute and save the Group Claim.
Claim Attributes | Values |
---|---|
groups | user.groups [All] |
emailAddress | user.mail |
givenname | user.givenname |
name | user.userprincipalname |
surname | user.surname |
The other values are pre-configured by default. You can refer to the values above for each claim attribute.
Configure a GROUP ID filter to limit sent groups to those that match your organization’s naming convention (i.e. 'stackguardian'), ensuring only relevant groups are sent. This helps when the group claim exceeds 2048 characters, avoiding issues by sending a smaller subset of groups.
Attributes & Claims Config
Step 5: Assign users to StackGuardian​
- Go to Microsoft Entra ID and select "Enterprise Applications".
- Select "All applications" and find your application in the list.
- Under the Getting Started section of the app's overview page, click "Assign users and groups".
- Click "Add user/group", select the users from the Users list in the dialog box, select a role if needed from the dropdown, and click "Assign”
Assign users
Step 6: Share App Federation Metadata Url with StackGuardian​
- Go to Microsoft Entra ID and select "Enterprise Applications".
- Select "All applications" and find your application in the list.
- Under the Getting Started section of the app's overview page, click "Set up single sign on".
- Under "SAML Certificates", copy and share "App Federation Metadata Url along with your "StackGuardian org name" and "your AD users' domain name" with StackGuardian representative.
Once everything is successfully setup on StackGuardian, you will be notified to test the connectivity.
Inviting SSO Users or Groups​
To invite SSO users or groups, use the following API endpoint. The process involves sending a payload with the user or group information. Below is the format of the payload:
API endpoint: https://api.app.stackguardian.io/api/v1/orgs/{org}/invite_user/
{
"userId": "<sso-group-name>/user.email@stackguardian.io",
"resendInvite": false,
"role": "ADMIN"
}
- Replace <sso-group-name> with the appropriate SSO group name from the dropdown options visible to the user.
- Replace user.email@stackguardian.io with the actual email address of the user.
You can refer to the API documentation here for more details on how to use the endpoint.