Configuring your identity provider for single sign-on (SSO)
Research and Engineering Studio integrates with any SAML 2.0 identity provider to authenticate user access to the RES portal. These steps provide directions to integrate with your chosen SAML 2.0 identity provider. If you intend to use IAM Identity Center, please see Setting up single sign-on (SSO) with IAM Identity Center.
Note
The user's email must match in the IDP SAML assertion and Active Directory. You will need to connect your identity provider with your Active Directory and periodically sync users.
Topics
Configure your identity provider
This section provides the steps to configure your identity provider with information from the RES Amazon Cognito user pool.
-
RES assumes that you have an AD (AWS Managed AD or a self-provisioned AD) with the user identities allowed to access the RES portal and projects. Connect your AD to your identity service provider and sync the user identities. Check your identity provider's documentation to learn how to connect your AD and sync user identities. For example, see Using Active Directory as an identity source in the AWS IAM Identity Center User Guide.
-
Configure a SAML 2.0 application for RES in your identity provider (IdP). This configuration requires the following parameters:
-
SAML Redirect URL — The URL that your IdP uses to send the SAML 2.0 response to the service provider.
Note
Depending on the IdP, the SAML Redirect URL might have a different name:
Application URL
Assertion Consumer Service (ACS) URL
ACS POST Binding URL
To get the URL
Sign in to RES as an admin or clusteradmin.
Navigate to Environment Management ⇒ General Settings ⇒ Identity Provider.
Choose SAML Redirect URL.
-
SAML Audience URI — The unique ID of the SAML audience entity on the service provider side.
Note
Depending on the IdP, the SAML Audience URI might have a different name:
ClientID
Application SAML Audience
SP entity ID
Provide the input in the following format.
urn:amazon:cognito:sp:
user-pool-id
To find your SAML Audience URI
Sign in to RES as an admin or clusteradmin.
Navigate to Environment Management ⇒ General Settings ⇒ Identity Provider.
Choose User Pool Id.
-
-
The SAML assertion posted to RES must have the following fields/claims set to the user's email address:
-
SAML Subject or NameID
-
SAML email
-
-
Your IdP adds fields/claims to the SAML assertion, based on the configuration. RES requires these fields. Most providers automatically fill these fields by default. Refer to the following field inputs and values if you have to configure them.
-
AudienceRestriction — Set to
urn:amazon:cognito:sp:
. Replaceuser-pool-id
user-pool-id
with the ID of your Amazon Cognito user pool.<saml:AudienceRestriction> <saml:Audience> urn:amazon:cognito:sp:
user-pool-id
</saml:AudienceRestriction> -
Response — Set
InResponseTo
tohttps://
. Replaceuser-pool-domain
/saml2/idpresponseuser-pool-domain
with the domain name of your Amazon Cognito user pool.<saml2p:Response Destination="http://
user-pool-domain
/saml2/idpresponse" ID="id123" InResponseTo="_dd0a3436-bc64-4679-a0c2-cb4454f04184" IssueInstant="Date-time stamp" Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema"> -
SubjectConfirmationData — Set
Recipient
to your user poolsaml2/idpresponse
endpoint andInResponseTo
to the original SAML request ID.<saml2:SubjectConfirmationData InResponseTo="_dd0a3436-bc64-4679-a0c2-cb4454f04184" NotOnOrAfter="Date-time stamp" Recipient="https://
user-pool-domain
/saml2/idpresponse"/> -
AuthnStatement — Configure as the following:
<saml2:AuthnStatement AuthnInstant="2016-10-30T13:13:28.152TZ" SessionIndex="32413b2e54db89c764fb96ya2k" SessionNotOnOrAfter="2016-10-30T13:13:28"> <saml2:SubjectLocality /> <saml2:AuthnContext> <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef> </saml2:AuthnContext> </saml2:AuthnStatement>
-
-
If your SAML application has a logout URL field, set it to:
.<domain-url>
/saml2/logoutTo get the domain URL
-
Sign in to RES as an admin or clusteradmin.
-
Navigate to Environment Management ⇒ General Settings ⇒ Identity Provider.
-
Choose Domain URL.
-
-
If your IdP accepts a signing certificate to establish trust with Amazon Cognito, download the Amazon Cognito signing certificate and upload it in your IdP.
To get the signing certificate
-
Open the Amazon Cognito console in the Getting Started with the AWS Management Console
-
Select your user pool. Your user pool should be
res-
.<environment name>
-user-pool -
Select the Sign-in experience tab.
-
In the Federated identity provider sign-in section, choose View signing certificate.
You can use this certificate to set up Active Directory IDP, add a
relying party trust
, and enable SAML support on this relying party.Note
This doesn't apply to Keycloak and IDC.
-
After the application setup is complete, download the SAML 2.0 application metadata XML or URL. You use it in the next section.
-
Configure RES to use your identity provider
To complete the single sign-on setup for RES
-
Sign in to RES as an admin or clusteradmin.
-
Navigate to Environment Management ⇒ General Settings ⇒ Identity Provider.
-
Under Single Sign-On, choose the edit icon next to the status indicator to open the Single Sign On Configuration page.
-
For Identity Provider, choose SAML.
-
For Provider Name, enter a unique name for your identity provider.
Note
The following names are not allowed:
Cognito
IdentityCenter
-
Under Metadata Document Source, choose the appropriate option and upload the metadata XML document or provide the URL from the identity provider.
-
For Provider Email Attribute, enter the text value
email
. -
Choose Submit.
-
-
Reload the Environment Settings page. Single sign-on is enabled if the configuration was correct.
Configuring your identity provider in a non-production environment
If you used the provided external resources to create a non-production RES environment and configured IAM Identity Center as your identity provider, you may want to configure a different identity provider such as Okta. The RES SSO enablement form asks for three configuration parameters:
-
Provider name — Cannot be modified
-
Metadata document or URL — Can be modified
-
Provider email attribute — Can be modified
To modify the metadata document and provider email attribute, do the following:
-
Go to the Amazon Cognito console.
-
From the navigation, choose User pools.
-
Select your user pool to view the User pool overview.
-
From the Sign-in experience tab, go to Federated identity provider sign-in and open your configured identity provider.
-
Generally, you will only be required to change the metadata and leave the attribute mapping unchanged. To update Attribute mapping, choose Edit. To update the Metadata document, choose Replace metadata.
-
If you edited the attribute mapping, you will need to update the
<environment name>.cluster-settings
table in DynamoDB.-
Open the DynamoDB console and choose Tables from the navigation.
-
Find and select the
<environment name>.cluster-settings
table, and from the Actions menu select Explore items. -
Under Scan or query items, go to Filters and enter the following parameters:
-
Attribute name —
key
-
Value —
identity-provider.cognito.sso_idp_provider_email_attribute
-
-
Choose Run.
-
-
Under Items returned, find the
identity-provider.cognito.sso_idp_provider_email_attribute
string and choose Edit to modify the string to match your changes in Amazon Cognito.
Debugging SAML IdP issues
SAML-tracer — You can use this extension for the Chrome
browser to track SAML requests and check the SAML assertion values. For more information, see
SAML-tracer
SAML developer tools — OneLogin provides tools that
you can use to decode the SAML encoded value and check the required fields in the
SAML assertion. For more information, see Base
64 Decode + Inflate
Amazon CloudWatch Logs — You can check your RES logs
in CloudWatch Logs for errors or warnings. Your logs are in a log group with the name format
.res-environment-name
/cluster-manager
Amazon Cognito documentation — For more information about SAML integration with Amazon Cognito, see Adding SAML identity providers to a user pool in the Amazon Cognito Developer Guide.