Using the TIP plugin to access Amazon Web Services services
Trusted identity propagation (TIP) is a feature of Amazon IAM Identity Center that enables administrators of Amazon Web Services services to grant permissions based on user attributes such as group associations. With trusted identity propagation, identity context is added to an IAM role to identify the user requesting access to Amazon resources. This context is propagated to other Amazon Web Services services.
Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive access requests. This information includes metadata that identifies the requester (for example, an IAM Identity Center user), the Amazon Web Services service to which access is requested (for example, Amazon Redshift), and the scope of access (for example, read only access). The receiving Amazon Web Services service uses this context, and any permissions assigned to the user, to authorize access to its resources. For more information, see in the Trusted identity propagation overview in the Amazon IAM Identity Center User Guide.
Prerequisites for using the TIP plugin
The following resources are required in order for the plugin to work:
-
You must be using either the Amazon SDK for Java or the Amazon SDK for JavaScript.
-
Verify that the service you are using supports the trusted identity propagation.
See the Enables trusted identity propagation through IAM Identity Center column of the Amazon managed applications that integrate with IAM Identity Center table in the Amazon IAM Identity Center User Guide.
-
Enable IAM Identity Center and trusted identity propagation.
See TIP prerequisites and considerations in the Amazon IAM Identity Center User Guide.
-
You must have an Identity-Center-integrated application.
See Amazon managed applications or Customer managed applications in the Amazon IAM Identity Center User Guide.
-
You must set up a trusted token issuer (TTI) and connect your service to IAM Identity Center.
See Prerequisites for trusted token issuers and Tasks for setting up a trusted token issuer in the Amazon IAM Identity Center User Guide.
To use the TIP plugin in your code
-
Create an instance of the trusted identity propagation plugin.
-
Create a service client instance for interacting with your Amazon Web Services service and customize the service client by adding the trusted identity propagation plugin.
The TIP plugin takes the following input parameters:
-
webTokenProvider
: A function that the customer implements to obtain an OpenID token from their external identity provider. -
accessRoleArn
: The IAM role ARN to be assumed by the plugin with the user's identity context to get the identity-enhanced credentials. -
applicationArn
: The unique identifier string for the client or application. This value is an application ARN that has OAuth grants configured. -
applicationRoleArn
: (Optional) The IAM role ARN to be assumed withAssumeRoleWithWebIdentity
so that the OIDC and Amazon STS clients can be bootstrapped without a default credentials provider. If this is not provided, the value of theaccessRoleArn
parameter will be used. -
ssoOidcClient
: (Optional) An SSO OIDC client, such asSsoOidcClient
for Java or client-sso-oidc
for Javascript, with customer-defined configurations. If not provided, an OIDC client using default configurations is instantiated and used. -
stsClient
: (Optional) An Amazon STS client with customer-defined configurations, used to assumeaccessRoleArn
with the user's identity context. If not provided, an Amazon STS client using default configurations is instantiated and used.