Provisioning with AWS IAM Identity Center
This module allows Anjana Data to synchronize users from AWS IAM Identity Center (formerly AWS SSO).
There are two synchronization modes depending on whether application-arn is configured or not:
-
Application-filtered mode (with
application-arn): Anjana queries the SAML application's assignments viaListApplicationAssignmentsand resolves only the assigned users and groups. Recommended when only a subset of the organization should have access. -
Full Identity Store mode (without
application-arn): Anjana callsListUsersdirectly on the Identity Store and synchronizes all users in the directory.
Part 1: Configuration in AWS (IAM User)
To securely access the AWS API, we will create a technical user (IAM User) with restricted read permissions.
Step 1: Create IAM User
-
Go to the IAM (Identity and Access Management) console, not Identity Center.
-
Go to Users > Create user.
-
Assign a name (e.g.
anjana-provisioning-user). -
Do not check the box for access to the management console (we only need programmatic access).
-
Complete the creation.
-
Once created, go to the Security credentials tab > Access keys > Create access key.
-
Select "Local code" or "Third-party application".
-
Important: Copy and save the Access Key and the Secret Key.
Step 2: Assign Permissions (Policy)
The required permissions vary depending on the mode you are going to use:
Application-filtered mode (with application-arn):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AnjanaProvisioningRead",
"Effect": "Allow",
"Action": [
"sso:ListApplicationAssignments",
"identitystore:DescribeUser",
"identitystore:DescribeGroup",
"identitystore:ListGroupMemberships",
"identitystore:GetGroupId",
"identitystore:GetUserId"
],
"Resource": "*"
}
]
}
Full Identity Store mode (without application-arn):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AnjanaProvisioningRead",
"Effect": "Allow",
"Action": [
"identitystore:ListUsers"
],
"Resource": "*"
}
]
}
-
Assign a name to the policy (e.g.
AnjanaProvisioningPolicy) and save the changes.
Part 2: Obtaining IDs in IAM Identity Center
We need to locate the Identity Store ID and, if you are going to use filtered mode, also the application's ARN.
-
Go to the IAM Identity Center console.
-
Identity Store ID:
-
In the side menu, go to Settings.
-
Look for the "Identity store" section.
-
Copy the Identity Store ID (e.g.
d-9067xxxxxx).
-
-
Application ARN (only for application-filtered mode):
-
Go to Applications.
-
Select the SAML application you created for Anjana Data.
-
In the details header, copy the application ARN (e.g.
arn:aws:sso::123456789012:application/ssoins-xxxx/apl-yyyy).
-
Part 3: Configuration in application.yml
Application-filtered mode (with application-arn)
Only the users and groups assigned to the specified application are synchronized.
security:
provisioning:
providers:
aws-iam-ic:
aws-prod:
region: "eu-west-1"
access-key: "AKIAXXXXXXXXXXXXXXXX"
secret-key: "SUPER_SECRET_KEY_XXXXXXXXXXXXXXXX"
identity-store-id: "d-9067xxxxxx"
# Application ARN (Part 2)
application-arn: "arn:aws:sso::123456789012:application/ssoins-xxxx/apl-yyyy"
Full Identity Store mode (without application-arn)
All users in the Identity Store are synchronized.
security:
provisioning:
providers:
aws-iam-ic:
aws-prod:
region: "eu-west-1"
access-key: "AKIAXXXXXXXXXXXXXXXX"
secret-key: "SUPER_SECRET_KEY_XXXXXXXXXXXXXXXX"
identity-store-id: "d-9067xxxxxx"
# application-arn not configured -> synchronization of the entire Identity Store
Property Summary
|
Property |
Description |
Source |
Required |
|---|---|---|---|
|
|
Access key ID of the technical user |
IAM (Users) |
Yes |
|
|
Secret of the technical user's access key |
IAM (Users) |
Yes |
|
|
AWS region code (e.g. |
AWS Console (top right corner) |
Yes |
|
|
User directory identifier |
IAM Identity Center > Settings |
Yes |
|
|
App ARN. If present, it only synchronizes its assigned users. If absent, it synchronizes the entire Identity Store. |
IAM Identity Center > Applications |
No (optional) |
Custom field mapping (field-mapping)
Anjana includes a default mapping that covers common cases. You can override any field by indicating the provider key from which the value should be read. The keys are listed in priority order: the first non-empty value is used.
Default mapping
|
Anjana field |
Default keys (priority order) |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Available fields
|
Key |
Description |
|---|---|
|
|
Unique identifier of the user in the Identity Store. |
|
|
Unique username (login). |
|
|
Display name. |
|
|
Nickname or informal name. |
|
|
Job title or position. |
|
|
User type. |
|
|
Preferred language. |
|
|
Locale. |
|
|
Time zone. |
|
|
First name (from the name.givenName field). |
|
|
Last name (from the name.familyName field). |
|
|
Middle name. |
|
|
Formatted full name. |
|
|
User's first email address. |
|
|
User's first phone number. |
|
|
Street (first postal address). |
|
|
City or locality. |
|
|
Region or province. |
|
|
Postal code. |
|
|
Country. |
Configuration example
security:
provisioning:
providers:
aws-iam-ic:
aws-prod:
region: "eu-west-1"
access-key: "..."
secret-key: "..."
identity-store-id: "d-9067xxxxxx"
field-mapping:
# Use displayName as the name if givenName is empty
first-name: ["givenName", "displayName"]
# Read title and, if empty, use userType
title: ["title", "userType"]