@aws-sdk/credential-provider-web-identity 3.36.0 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.41.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.40.1...v3.41.0) (2021-11-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **credential-provider-web-identity:** exclude node.js code from browser bundle ([#3005](https://github.com/aws/aws-sdk-js-v3/issues/3005)) ([7ba033a](https://github.com/aws/aws-sdk-js-v3/commit/7ba033a37058c6697edb004180dc046a2298e9aa))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-web-identity
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-web-identity
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-web-identity
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
|
|
7
42
|
|
|
8
43
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { CredentialProvider } from "@aws-sdk/types";
|
|
2
2
|
import { FromWebTokenInit } from "./fromWebToken";
|
|
3
3
|
export interface FromTokenFileInit extends Partial<Pick<FromWebTokenInit, Exclude<keyof FromWebTokenInit, "webIdentityToken">>> {
|
|
4
|
-
|
|
5
|
-
* File location of where the `OIDC` token is stored.
|
|
6
|
-
*/
|
|
4
|
+
|
|
7
5
|
webIdentityTokenFile?: string;
|
|
8
6
|
}
|
|
9
|
-
|
|
10
|
-
* Represents OIDC credentials from a file on disk.
|
|
11
|
-
*/
|
|
7
|
+
|
|
12
8
|
export declare const fromTokenFile: (init?: FromTokenFileInit) => CredentialProvider;
|
|
@@ -1,125 +1,29 @@
|
|
|
1
1
|
import { CredentialProvider, Credentials } from "@aws-sdk/types";
|
|
2
2
|
export interface AssumeRoleWithWebIdentityParams {
|
|
3
|
-
|
|
4
|
-
* <p>The Amazon Resource Name (ARN) of the role that the caller is assuming.</p>
|
|
5
|
-
*/
|
|
3
|
+
|
|
6
4
|
RoleArn: string;
|
|
7
|
-
|
|
8
|
-
* <p>An identifier for the assumed role session. Typically, you pass the name or identifier
|
|
9
|
-
* that is associated with the user who is using your application. That way, the temporary
|
|
10
|
-
* security credentials that your application will use are associated with that user. This
|
|
11
|
-
* session name is included as part of the ARN and assumed role ID in the
|
|
12
|
-
* <code>AssumedRoleUser</code> response element.</p>
|
|
13
|
-
* <p>The regex used to validate this parameter is a string of characters
|
|
14
|
-
* consisting of upper- and lower-case alphanumeric characters with no spaces. You can
|
|
15
|
-
* also include underscores or any of the following characters: =,.@-</p>
|
|
16
|
-
*/
|
|
5
|
+
|
|
17
6
|
RoleSessionName: string;
|
|
18
|
-
|
|
19
|
-
* <p>The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity
|
|
20
|
-
* provider. Your application must get this token by authenticating the user who is using your
|
|
21
|
-
* application with a web identity provider before the application makes an
|
|
22
|
-
* <code>AssumeRoleWithWebIdentity</code> call. </p>
|
|
23
|
-
*/
|
|
7
|
+
|
|
24
8
|
WebIdentityToken: string;
|
|
25
|
-
|
|
26
|
-
* <p>The fully qualified host component of the domain name of the identity provider.</p>
|
|
27
|
-
* <p>Specify this value only for OAuth 2.0 access tokens. Currently
|
|
28
|
-
* <code>www.amazon.com</code> and <code>graph.facebook.com</code> are the only supported
|
|
29
|
-
* identity providers for OAuth 2.0 access tokens. Do not include URL schemes and port
|
|
30
|
-
* numbers.</p>
|
|
31
|
-
* <p>Do not specify this value for OpenID Connect ID tokens.</p>
|
|
32
|
-
*/
|
|
9
|
+
|
|
33
10
|
ProviderId?: string;
|
|
34
|
-
|
|
35
|
-
* <p>The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as
|
|
36
|
-
* managed session policies. The policies must exist in the same account as the role.</p>
|
|
37
|
-
* <p>This parameter is optional. You can provide up to 10 managed policy ARNs. However, the
|
|
38
|
-
* plain text that you use for both inline and managed session policies can't exceed 2,048
|
|
39
|
-
* characters. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and AWS
|
|
40
|
-
* Service Namespaces</a> in the AWS General Reference.</p>
|
|
41
|
-
* <note>
|
|
42
|
-
* <p>An AWS conversion compresses the passed session policies and session tags into a
|
|
43
|
-
* packed binary format that has a separate limit. Your request can fail for this limit
|
|
44
|
-
* even if your plain text meets the other requirements. The <code>PackedPolicySize</code>
|
|
45
|
-
* response element indicates by percentage how close the policies and tags for your
|
|
46
|
-
* request are to the upper size limit.
|
|
47
|
-
* </p>
|
|
48
|
-
* </note>
|
|
49
|
-
*
|
|
50
|
-
* <p>Passing policies to this operation returns new
|
|
51
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
52
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
53
|
-
* credentials in subsequent AWS API calls to access resources in the account that owns
|
|
54
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
55
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
56
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
57
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
58
|
-
*/
|
|
11
|
+
|
|
59
12
|
PolicyArns?: {
|
|
60
13
|
arn?: string;
|
|
61
14
|
}[];
|
|
62
|
-
|
|
63
|
-
* <p>An IAM policy in JSON format that you want to use as an inline session policy.</p>
|
|
64
|
-
* <p>This parameter is optional. Passing policies to this operation returns new
|
|
65
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
66
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
67
|
-
* credentials in subsequent AWS API calls to access resources in the account that owns
|
|
68
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
69
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
70
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
71
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
72
|
-
* <p>The plain text that you use for both inline and managed session policies can't exceed
|
|
73
|
-
* 2,048 characters. The JSON policy characters can be any ASCII character from the space
|
|
74
|
-
* character to the end of the valid character list (\u0020 through \u00FF). It can also
|
|
75
|
-
* include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D)
|
|
76
|
-
* characters.</p>
|
|
77
|
-
* <note>
|
|
78
|
-
* <p>An AWS conversion compresses the passed session policies and session tags into a
|
|
79
|
-
* packed binary format that has a separate limit. Your request can fail for this limit
|
|
80
|
-
* even if your plain text meets the other requirements. The <code>PackedPolicySize</code>
|
|
81
|
-
* response element indicates by percentage how close the policies and tags for your
|
|
82
|
-
* request are to the upper size limit.
|
|
83
|
-
* </p>
|
|
84
|
-
* </note>
|
|
85
|
-
*/
|
|
15
|
+
|
|
86
16
|
Policy?: string;
|
|
87
|
-
|
|
88
|
-
* <p>The duration, in seconds, of the role session. The value can range from 900 seconds (15
|
|
89
|
-
* minutes) up to the maximum session duration setting for the role. This setting can have a
|
|
90
|
-
* value from 1 hour to 12 hours. If you specify a value higher than this setting, the
|
|
91
|
-
* operation fails. For example, if you specify a session duration of 12 hours, but your
|
|
92
|
-
* administrator set the maximum session duration to 6 hours, your operation fails. To learn
|
|
93
|
-
* how to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the
|
|
94
|
-
* Maximum Session Duration Setting for a Role</a> in the
|
|
95
|
-
* <i>IAM User Guide</i>.</p>
|
|
96
|
-
* <p>By default, the value is set to <code>3600</code> seconds. </p>
|
|
97
|
-
* <note>
|
|
98
|
-
* <p>The <code>DurationSeconds</code> parameter is separate from the duration of a console
|
|
99
|
-
* session that you might request using the returned credentials. The request to the
|
|
100
|
-
* federation endpoint for a console sign-in token takes a <code>SessionDuration</code>
|
|
101
|
-
* parameter that specifies the maximum length of the console session. For more
|
|
102
|
-
* information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html">Creating a URL
|
|
103
|
-
* that Enables Federated Users to Access the AWS Management Console</a> in the
|
|
104
|
-
* <i>IAM User Guide</i>.</p>
|
|
105
|
-
* </note>
|
|
106
|
-
*/
|
|
17
|
+
|
|
107
18
|
DurationSeconds?: number;
|
|
108
19
|
}
|
|
109
20
|
declare type LowerCaseKey<T> = {
|
|
110
21
|
[K in keyof T as `${Uncapitalize<string & K>}`]: T[K];
|
|
111
22
|
};
|
|
112
23
|
export interface FromWebTokenInit extends Pick<LowerCaseKey<AssumeRoleWithWebIdentityParams>, Exclude<keyof LowerCaseKey<AssumeRoleWithWebIdentityParams>, "roleSessionName">> {
|
|
113
|
-
|
|
114
|
-
* The IAM session name used to distinguish sessions.
|
|
115
|
-
*/
|
|
24
|
+
|
|
116
25
|
roleSessionName?: string;
|
|
117
|
-
|
|
118
|
-
* A function that assumes a role with web identity and returns a promise fulfilled with
|
|
119
|
-
* credentials for the assumed role.
|
|
120
|
-
*
|
|
121
|
-
* @param params input parameter of sts:AssumeRoleWithWebIdentity API.
|
|
122
|
-
*/
|
|
26
|
+
|
|
123
27
|
roleAssumerWithWebIdentity?: (params: AssumeRoleWithWebIdentityParams) => Promise<Credentials>;
|
|
124
28
|
}
|
|
125
29
|
export declare const fromWebToken: (init: FromWebTokenInit) => CredentialProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.41.0",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
|
+
"browser": {
|
|
16
|
+
"./dist-es/fromTokenFile": false,
|
|
17
|
+
"./dist-cjs/fromTokenFile": false
|
|
18
|
+
},
|
|
19
|
+
"react-native": {
|
|
20
|
+
"./dist-es/fromTokenFile": false,
|
|
21
|
+
"./dist-cjs/fromTokenFile": false
|
|
22
|
+
},
|
|
15
23
|
"keywords": [
|
|
16
24
|
"aws",
|
|
17
25
|
"credentials"
|
|
@@ -22,8 +30,8 @@
|
|
|
22
30
|
},
|
|
23
31
|
"license": "Apache-2.0",
|
|
24
32
|
"dependencies": {
|
|
25
|
-
"@aws-sdk/property-provider": "3.
|
|
26
|
-
"@aws-sdk/types": "3.
|
|
33
|
+
"@aws-sdk/property-provider": "3.40.0",
|
|
34
|
+
"@aws-sdk/types": "3.40.0",
|
|
27
35
|
"tslib": "^2.3.0"
|
|
28
36
|
},
|
|
29
37
|
"devDependencies": {
|