How trusted identity propagation works
The following steps describe how a user's identity reaches Lake Formation and how Lake Formation uses it.
-
The user signs in to your identity provider (IdP). The user then federates into AWS through IAM federation or through AWS IAM Identity Center. AWS Security Token Service (AWS STS) adds the user's identity to the IAM role session.
-
The user runs a query or a job in an analytics application or engine, such as or Amazon EMR. The application uses the carrier role's session to call Lake Formation.
-
The user's identity stays with the session when the application assumes other roles or calls other services. For example, when an Amazon EMR job moves from an entry role to a job runtime role, the identity moves with it. Scheduled work runs as the user who scheduled it, so a nightly job can read only the tables that the user is allowed to read.
-
Lake Formation checks the permissions granted to the user, to the user's groups, and to the carrier role, and then vends temporary credentials for the data that the user is allowed to access.
-
CloudTrail records the user's identity next to the carrier role in each event. For more information, see Auditing user access in CloudTrail logs.
How Lake Formation combines user and carrier role permissions
Lake Formation grants a request the union of the following permissions. The least restrictive permission applies.
-
Permissions granted to the user
-
Permissions granted to the user's groups
-
Permissions granted to all IdP users, including grants with a condition that the user's attributes match
-
Permissions granted to the carrier role, including LF-Tag-based grants and grants to the
IAM_ALLOWED_PRINCIPALSgroup
If the carrier role has a Lake Formation grant, every user who uses the role receives that grant. To control
access per user, don't grant data permissions to carrier roles, and revoke the
IAM_ALLOWED_PRINCIPALS group's permissions on the resources that you govern.
To use only the permissions granted to users and groups, you can opt out of combining carrier role permissions for your account. For more information, see Using only user and group permissions.
How Lake Formation matches users
Lake Formation matches a user: grant against the subject that the session carries.
-
With IAM federation, the subject is the user identifier that you map from your IdP, such as the user's email address.
-
With IAM Identity Center, the subject is the user name of the user in the Identity Store.
Lake Formation doesn't validate the subject when you grant permissions. If the subject in a grant doesn't match the subject in the session exactly, the grant has no effect.
How Lake Formation uses user attributes
When a user signs in through IAM federation, your IdP can include attributes for the user, such as department or cost center. Lake Formation can read these attributes in the following places:
-
Conditions on grants to all IdP users. For more information, see Granting permissions based on user attributes.
-
Filter expressions in row-level security policies. For more information, see Filtering rows based on user attributes.
User attributes aren't available for users who sign in through IAM Identity Center.
What changed from legacy trusted identity propagation
Enhanced trusted identity propagation removes the setup that legacy trusted identity propagation required, and adds support for IAM federation. The following table compares them.
| Feature | Enhanced trusted identity propagation | Legacy trusted identity propagation |
|---|---|---|
| Sign-in methods | IAM federation (AssumeRoleWithSAML and AssumeRoleWithWebIdentity) and IAM Identity Center |
IAM Identity Center only |
| Setup | IAM federation: no setup. IAM Identity Center: enable once in IAM Identity Center. | Connect Lake Formation with IAM Identity Center. |
| Principals in grants | User names and group names, such as user:mary_major@example.com |
Identity Store user and group IDs |
| User attributes in grants | IAM federation: supported. IAM Identity Center: not supported. | Not supported |
| CloudTrail logs | The user's subject, the IdP issuer, and the identity provider ARN, next to the carrier role | The Identity Store user ID and Identity Store ARN |
| Lake Formation console | Shows user names | Shows Identity Store IDs |