You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/credential-provider-web-identity/README.md
+80Lines changed: 80 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,86 @@
7
7
8
8
This module includes functions which get credentials by calling STS assumeRoleWithWebIdentity API.
9
9
10
+
## fromWebToken
11
+
12
+
The function `fromWebToken` returns `CredentialProvider` that get credentials calling sts:assumeRoleWithWebIdentity
13
+
API via `roleAssumerWithWebIdentity`.
14
+
15
+
### Supported configuration
16
+
17
+
This configuration supports all the input parameters from
18
+
[sts:AssumeWithWebIdentity](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sts/modules/assumerolewithwebidentityrequest.html) API. The following options are supported:
19
+
20
+
-`roleArn` - The Amazon Resource Name (ARN) of the role that the caller is assuming.
21
+
-`webIdentityToken` - The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity provider.
22
+
-`roleSessionName` - An identifier for the assumed role session.
23
+
-`providerId` - The fully qualified host component of the domain name of the identity provider. Do not specify this
24
+
value for OpenID Connect ID tokens.
25
+
-`policyArns` - The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session
26
+
policies.
27
+
-`policy` - An IAM policy in JSON format that you want to use as an inline session policy.
28
+
-`durationSeconds` - The duration, in seconds, of the role session. Default to 3600.
29
+
-`roleAssumerWithWebIdentity` - A function that assumes a role with web identity
30
+
and returns a promise fulfilled with credentials for the assumed role. You may call
31
+
`sts:assumeRoleWithWebIdentity` API within this function.
32
+
33
+
### Examples
34
+
35
+
You can directly configure individual identity providers to access AWS resources using web identity federation. AWS
36
+
currently supports authenticating users using web identity federation through several identity providers:
0 commit comments