Part A: SAML Authentication (Login)
-
Go to AWS IAM Identity Center.
-
Go to
Applications > Add application > Add a custom SAML 2.0 application. -
Get AWS Metadata: On the details page, copy the "IdP SAML metadata URL" or download the metadata in xml format to host it on the server.
-
Configure SP Data (your application):
-
Entity ID (Audience):
identificador-unico-para-saml(Must be unique and match theyml). -
ACS URL:
https://dev.anjanadata.org/gateway/saml2/sso/devaws(The keydevawsmatches the one used in theyml).
-
-
Assign users: Go to the "Assigned users and groups" tab and grant access to those who need it.
Part B: API Configuration (User Provisioning)
-
Go to the IAM service (not IAM Identity Center).
-
Create a new IAM User for your application (e.g.
anjana-provisioning-user). -
Generate access keys (
accessKeyandsecretKey) for this user. -
Assign this user the necessary read-only permissions (Policies):
-
AWSSSOReadOnlyAccess -
A new set of Permissions that will contain the following:
-
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"identitystore:DescribeUser",
"identitystore:IsMemberInGroups",
"kms:Decrypt",
"identitystore:DescribeGroupMembership",
"identitystore:ListGroupMemberships",
"identitystore:GetGroupMembershipId",
"identitystore:DescribeGroup",
"identitystore:GetGroupId",
"identitystore:GetUserId",
"sso:ListApplicationAssignments"
],
"Resource": "*"
}
]
}
-
Go to IAM Identity Center > Settings and copy the "Identity Store ID" (
identityStoreId). -
Go to the SAML application you created in Part A and copy its "Application ARN" (
applicationArn).
Final Data for the yml
-
accessKey: The access key of the IAM user you created. -
secretKey: The secret of the IAM user. -
region: The region where your IAM Identity Center is located (e.g.us-east-1). -
identityStoreId: The ID you copied from the settings. -
applicationArn: The ARN you copied from the SAML application.
Example application-default.yml file
This example details the SAML-specific properties for AWS IAM. The properties common to all providers are found in SAML 2.0 (Deprecated)
security:
provisioning:
providers:
aws-iam-ic:
# The key 'devaws' must be IDENTICAL to the key used in 'provisioning'
devaws:
# Access key of the admin user used to retrieve users
access-key: <accessKey>
# Password for the access key of the admin user used to retrieve users
secret-key: <secretKey>
# AWS IAM region where the Identity Center is located
region: eu-west-1
# ARN of the SAML application
application-arn: <appARN>
# Identity Store ID
identity-store-id: <identityStoreID>