|
6 | 6 | ## AWS Credential Provider for Node.js - AWS Single Sign-On (SSO)
|
7 | 7 |
|
8 | 8 | This module provides a function, `fromSSO`, that creates
|
9 |
| -`CredentialProvider` functions that read from [AWS SDKs and Tools |
10 |
| -shared configuration and credentials |
11 |
| -files](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). |
12 |
| -Profiles in the `credentials` file are given precedence over |
13 |
| -profiles in the `config` file. This provider loads the |
| 9 | +`CredentialProvider` functions that read from the |
14 | 10 | _resolved_ access token from local disk then requests temporary AWS
|
15 | 11 | credentials. For guidance on the AWS Single Sign-On service, please
|
16 | 12 | refer to [AWS's Single Sign-On documentation](https://aws.amazon.com/single-sign-on/).
|
17 | 13 |
|
| 14 | +You can create the `CredentialProvider` functions using the inline SSO |
| 15 | +parameters(`ssoStartUrl`, `ssoAccountId`, `ssoRegion`, `ssoRoleName`) or load |
| 16 | +them from [AWS SDKs and Tools shared configuration and credentials files](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). |
| 17 | +Profiles in the `credentials` file are given precedence over |
| 18 | +profiles in the `config` file. |
| 19 | + |
| 20 | +This credential provider is intended for use with the AWS SDK for Node.js. |
| 21 | + |
| 22 | +This credential provider **ONLY** supports profiles using the SSO credential. If |
| 23 | +you have a profile that assumes a role which derived from the SSO credential, |
| 24 | +you should use the `@aws-sdk/credential-provider-ini`, or |
| 25 | +`@aws-sdk/credential-provider-node` package. |
| 26 | + |
18 | 27 | ## Supported configuration
|
19 | 28 |
|
20 | 29 | You may customize how credentials are resolved by providing an options hash to
|
21 | 30 | the `fromSSO` factory function. The following options are supported:
|
22 | 31 |
|
| 32 | +- `ssoStartUrl`: The URL to the AWS SSO service. Required if any of the `sso*` |
| 33 | + options(except for `ssoClient`) is provided. |
| 34 | +- `ssoAccountId`: The ID of the AWS account to use for temporary credentials. |
| 35 | + Required if any of the `sso*` options(except for `ssoClient`) is provided. |
| 36 | +- `ssoRegion`: The AWS region to use for temporary credentials. Required if any |
| 37 | + of the `sso*` options(except for `ssoClient`) is provided. |
| 38 | +- `ssoRoleName`: The name of the AWS role to assume. Required if any of the |
| 39 | + `sso*` options(except for `ssoClient`) is provided. |
23 | 40 | - `profile` - The configuration profile to use. If not specified, the provider
|
24 | 41 | will use the value in the `AWS_PROFILE` environment variable or `default` by
|
25 | 42 | default.
|
|
0 commit comments