SAML Configuration
Configure SAML 2.0 authentication through AWS Cognito for enterprise single sign-on.
Overview
ASCEND supports SAML 2.0 federation via AWS Cognito, enabling integration with enterprise identity providers.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Your SAML │───▶│ AWS Cognito │───▶│ ASCEND │
│ IdP │ │ User Pool │ │ Platform │
└─────────────┘ └─────────────┘ └─────────────┘
Supported Identity Providers
| Provider | Status |
|---|---|
| Okta | Supported |
| Azure AD | Supported |
| OneLogin | Supported |
| PingFederate | Supported |
| ADFS | Supported |
| Google Workspace | Supported |
| Custom SAML IdP | Supported |
Cognito SAML Settings
When configuring your IdP, use these settings:
| Setting | Value |
|---|---|
| ACS URL | https://{domain}.auth.{region}.amazoncognito.com/saml2/idpresponse |
| Entity ID | urn:amazon:cognito:sp:{user-pool-id} |
| Name ID Format | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress |
Configuration Steps
1. Get Your Cognito Details
curl https://pilot.owkai.app/api/cognito/pool-config/by-slug/your-org \
-b cookies.txt
Note the user_pool_id and region from the response.
2. Configure Your IdP
Create a SAML application in your IdP with:
- ACS URL:
https://your-domain.auth.us-east-2.amazoncognito.com/saml2/idpresponse - Entity ID:
urn:amazon:cognito:sp:us-east-2_AbCdEfGhI - Name ID: Email address
3. Download IdP Metadata
Download the SAML metadata XML from your IdP.
4. Configure Cognito
In AWS Cognito Console:
- Navigate to Federation → Identity providers
- Click Add provider → SAML
- Upload metadata document or enter:
- Provider name
- Metadata document URL
- Configure attribute mapping
Attribute Mapping
Required Attributes
| SAML Attribute | Cognito Attribute | Required |
|---|---|---|
email | email | Yes |
firstName / givenName | given_name | Yes |
lastName / surname | family_name | Yes |
SAML Claim Names
| IdP | Email Claim |
|---|---|
| Okta | user.email |
| Azure AD | http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress |
| OneLogin | Email |
| ADFS | http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress |
Provider-Specific Guides
Okta
-
Create Application
- Admin Console → Applications → Create App Integration
- Select SAML 2.0
-
Configure SAML Settings
Single sign on URL: https://your-domain.auth.us-east-2.amazoncognito.com/saml2/idpresponse
Audience URI: urn:amazon:cognito:sp:us-east-2_AbCdEfGhI
Name ID format: EmailAddress
Application username: Email -
Attribute Statements
Name Value emailuser.emailfirstNameuser.firstNamelastNameuser.lastName -
Download Metadata
- Click View Setup Instructions
- Download IdP metadata
Azure AD
-
Register Enterprise Application
- Azure Portal → Enterprise Applications → New application
- Create your own application
-
Configure SAML
- Single sign-on → SAML
- Basic SAML Configuration:
Identifier (Entity ID): urn:amazon:cognito:sp:us-east-2_AbCdEfGhI
Reply URL (ACS URL): https://your-domain.auth.us-east-2.amazoncognito.com/saml2/idpresponse -
User Attributes & Claims
Claim Source Attribute emailaddressuser.mailgivennameuser.givennamesurnameuser.surname -
Download Metadata
- Download Federation Metadata XML
Google Workspace
-
Create SAML App
- Admin Console → Apps → Web and mobile apps
- Add app → Add custom SAML app
-
Configure
ACS URL: https://your-domain.auth.us-east-2.amazoncognito.com/saml2/idpresponse
Entity ID: urn:amazon:cognito:sp:us-east-2_AbCdEfGhI
Name ID format: EMAIL
Name ID: Basic Information > Primary email -
Attribute Mapping
Google Directory App Attribute Primary email emailFirst name firstNameLast name lastName
SP-Initiated SSO Flow
1. User navigates to ASCEND login
2. User selects "Login with SSO"
3. ASCEND redirects to Cognito Hosted UI
4. Cognito redirects to IdP login
5. User authenticates with IdP
6. IdP sends SAML assertion to Cognito ACS URL
7. Cognito validates assertion and issues tokens
8. ASCEND creates session from tokens
IdP-Initiated SSO
For IdP-initiated SSO, configure:
- RelayState:
https://pilot.owkai.app - Enable IdP-initiated SSO in your IdP
Testing
Test SAML Login
-
Navigate to Cognito Hosted UI:
https://your-domain.auth.us-east-2.amazoncognito.com/login?
client_id=your-client-id&
response_type=code&
scope=openid+email+profile&
redirect_uri=https://pilot.owkai.app/auth/callback -
Click on your SAML provider
-
Authenticate with your IdP
-
Verify redirect to ASCEND
Debug SAML Response
Use browser developer tools or a SAML tracer extension to inspect:
- SAML Response
- Assertions
- Attribute values
Troubleshooting
Invalid SAML Response
- Verify ACS URL is exactly correct
- Check Entity ID matches
- Ensure certificate is valid
User Not Found
- Verify email attribute is mapped
- Check email format matches
Clock Skew
- SAML assertions have time constraints
- Ensure IdP and Cognito times are synchronized
Security Best Practices
- Sign assertions - Enable assertion signing
- Encrypt assertions - Enable assertion encryption for sensitive data
- Short validity - Use short assertion validity periods
- Secure transport - Use HTTPS only
- Audit logs - Monitor SAML authentication events
Next Steps
- SSO Configuration - Complete SSO setup
- OIDC Configuration - OIDC alternative
- Authentication - API authentication