mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-08-25 04:35:06 +09:00
Compare commits
345 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8df5847569 | |||
| d22a0f8af5 | |||
| f7b8181755 | |||
| c367a6acb0 | |||
| 7ceaf96edc | |||
| a7a2c1125c | |||
| 6e3375df07 | |||
| 98abed7841 | |||
| bf3adbbb94 | |||
| db43b8b90a | |||
| fc999da49a | |||
| 4f2ba7fe9c | |||
| a9717e6ab0 | |||
| 5638c55000 | |||
| 9260701d07 | |||
| 2a2d67de88 | |||
| 1f91feff98 | |||
| 5a45798cc2 | |||
| 03ca40259f | |||
| fdaa1bdaab | |||
| 76cd0519f8 | |||
| d8821142e5 | |||
| 455579b45d | |||
| aa67178d69 | |||
| 4b8f2761e5 | |||
| f63ad03df6 | |||
| 00e1ea3dc5 | |||
| 71fa3f4cf0 | |||
| eb0f73c987 | |||
| ab20c8bb65 | |||
| 65d5a3ae87 | |||
| acc79c2e07 | |||
| b1e95de918 | |||
| 86903cfb2e | |||
| 26e9ba52a0 | |||
| b5c9882977 | |||
| 5ffcf010cf | |||
| dffada93d8 | |||
| b61bf5b567 | |||
| 31f53c456e | |||
| 4df9a01ef6 | |||
| dad3c3ee8b | |||
| a12214142d | |||
| 7669a6d405 | |||
| 2763a9e234 | |||
| 731c99bf59 | |||
| 82399fd121 | |||
| 827e0dd2c7 | |||
| 92cde8da32 | |||
| 1b36ca57f6 | |||
| 50ecfdead0 | |||
| 66fa6511a5 | |||
| 96008b1ef1 | |||
| 40fe06d904 | |||
| 228103980f | |||
| ffde586b91 | |||
| 92ca50a768 | |||
| ac60232d49 | |||
| c2ee69e5ef | |||
| 756668eaa3 | |||
| d936e04b3a | |||
| bf7978d83a | |||
| a032176f30 | |||
| 9c1f8ca0da | |||
| 26dce75391 | |||
| fd26731f53 | |||
| e5756ca1e0 | |||
| 34fc1d2aec | |||
| 1e12ebe97f | |||
| dde546460d | |||
| eb454ac214 | |||
| c41df0cb9a | |||
| 3e2185aea7 | |||
| b700559a4e | |||
| 240d5c0842 | |||
| 07805a4645 | |||
| 802e33dfc8 | |||
| eec2841a24 | |||
| 20eb4eea7a | |||
| fd1fab4c46 | |||
| 3e5ba48531 | |||
| 7353058e3d | |||
| 21d1a5dae5 | |||
| 5435336b28 | |||
| 6ee38f3e09 | |||
| d2df8fb83e | |||
| 6693fa69d2 | |||
| 5ac87a6bfa | |||
| 700d8245cb | |||
| 683ebee979 | |||
| 9676be21f8 | |||
| a6afc9d2bb | |||
| 97d28c427e | |||
| 3e8ea3f06f | |||
| 6e03995d2b | |||
| c8c213ac38 | |||
| ad637adc0d | |||
| 9b543ae650 | |||
| fca1f956f0 | |||
| 448705b338 | |||
| 1b144e932e | |||
| 91d8d22b3e | |||
| 04950cd7bd | |||
| 7097ca2b49 | |||
| d8a900d19b | |||
| 7d628b0df3 | |||
| fc11d7f742 | |||
| 2873226d5a | |||
| f64865f02d | |||
| 84e14cfa24 | |||
| 0c446a4f26 | |||
| 6c80fb6597 | |||
| 59974ea689 | |||
| d02ec080f0 | |||
| 5f6824cc21 | |||
| 5ef9a45125 | |||
| 1c3bb301a5 | |||
| 73bfb11c3e | |||
| ce10ea457f | |||
| 6e6743c58a | |||
| 7695a63157 | |||
| 177dade8f5 | |||
| a87e741eba | |||
| 215dbfc2e0 | |||
| 569add8750 | |||
| 45e9b2361a | |||
| 9aa437c71f | |||
| 1b22251287 | |||
| 30f1979f73 | |||
| c8eae42842 | |||
| d1738addf8 | |||
| 3c81eaa0ac | |||
| c1f99d9919 | |||
| c8d2acc8cd | |||
| 10d0957229 | |||
| 1db6a8d36b | |||
| 26ee0db93b | |||
| 368291f3c1 | |||
| af208eb863 | |||
| 4f7685c9d1 | |||
| 7de3ac08ca | |||
| 9515e12615 | |||
| e1f27963af | |||
| 44e3fb90db | |||
| 0a6b7158f2 | |||
| ecfe99e00b | |||
| 7203c21033 | |||
| 827af033de | |||
| cd8279cd8c | |||
| d0a05da0c8 | |||
| 9fb1716ceb | |||
| ae5e76d11f | |||
| 4f0bc4ee1c | |||
| 84104e7415 | |||
| 81dc407534 | |||
| 2e3dfc44a9 | |||
| d89333df1f | |||
| 38d8c64eb3 | |||
| a7097b0e08 | |||
| e75f7e3d06 | |||
| b54432e49c | |||
| f913942884 | |||
| 993411ece6 | |||
| e8cc5bc2e0 | |||
| 9466cfb60a | |||
| 6357374424 | |||
| 0a2792614c | |||
| d2c16a05bc | |||
| fcf6a5e397 | |||
| 1dfb9b5b42 | |||
| 50338e4c8b | |||
| ea9c29ec48 | |||
| 1e33ae6ecf | |||
| f0523e4a99 | |||
| e179430bce | |||
| a2e38048be | |||
| c50a0a9b27 | |||
| d141330353 | |||
| b6378a5559 | |||
| 5ebb541f8e | |||
| 0a8a3fde10 | |||
| 6b29d970f2 | |||
| caf97ba94e | |||
| 832f3f157a | |||
| 9fee09aa0f | |||
| 0ecfd13b95 | |||
| 80ed412f2c | |||
| 979931c880 | |||
| 8490feb378 | |||
| 16829738f0 | |||
| 0ec5ceba16 | |||
| 00aa8475ff | |||
| e19fa45bbe | |||
| 5858805023 | |||
| 2a9d16e130 | |||
| 3c03de593f | |||
| 58c637bfde | |||
| 87ec0e2f9a | |||
| be798e597e | |||
| 9f25b942f3 | |||
| a16a4a650d | |||
| 5106596545 | |||
| 953dc09b57 | |||
| a8c653ebfd | |||
| 28e5c8cc3c | |||
| c1ccd11e42 | |||
| 386556ad7a | |||
| 83abc2cb18 | |||
| 627aa7d3f0 | |||
| 09c6ab0945 | |||
| 9520a4e0cd | |||
| 58e38ace1e | |||
| 14fe238815 | |||
| 2f368822bc | |||
| ea5f0819c5 | |||
| 8a82d2d5ab | |||
| e2c7d37fe6 | |||
| a6182fef59 | |||
| a94e0a7ea6 | |||
| ed4a6054d8 | |||
| 09242f526d | |||
| 0cb77eaa44 | |||
| 7bbb5b2868 | |||
| 3d28c41d1c | |||
| 9c6719055e | |||
| 2d5ba6312f | |||
| dd91a7329e | |||
| b207c2ce9c | |||
| 8ef6b3dfde | |||
| 6b62b82e1a | |||
| 3b040fe7c1 | |||
| 3991c2aa73 | |||
| 3e1cb2c6fa | |||
| e378c2d267 | |||
| a26a7d8191 | |||
| 23f8661f4e | |||
| 623eede63e | |||
| c97f36fa83 | |||
| 12acc19c37 | |||
| 2f4ebbbbe9 | |||
| 9dfbd92b40 | |||
| e1dd6a9dff | |||
| 3b7b986954 | |||
| d086bfff83 | |||
| 2957ddac72 | |||
| 055bcbf797 | |||
| 7f1ac84759 | |||
| 25e258c360 | |||
| 3efb5d271f | |||
| f02f0dd54b | |||
| b0e79a919c | |||
| b8672ce0f2 | |||
| 5c173daddc | |||
| d1341457f1 | |||
| d30a6ec102 | |||
| 8b40776d15 | |||
| 1bd534f39d | |||
| 52c94ca47d | |||
| 3cb16d3813 | |||
| 724331c579 | |||
| b31db2fc7e | |||
| cfba6e3fe6 | |||
| 98a2c004ab | |||
| 592da77779 | |||
| d6e92fbf6c | |||
| c4313d89d1 | |||
| a54abe3f65 | |||
| 523f5b70b1 | |||
| 96797d5da1 | |||
| 35e11996f9 | |||
| 2d8e953343 | |||
| 636ab0a6c4 | |||
| cfc284beb6 | |||
| 465c2714be | |||
| 7fab3c1652 | |||
| 7b4c4016d3 | |||
| fe7827697e | |||
| 5f34186b4f | |||
| 514d965912 | |||
| 431bb0e5e3 | |||
| bd4992e70f | |||
| 640ff09de4 | |||
| 6cbe04160d | |||
| f189ab2733 | |||
| d1bb999f84 | |||
| 2f322f74a4 | |||
| 3dd0d555d3 | |||
| a587f63dfc | |||
| 84ec638d5c | |||
| fd26919f2e | |||
| cd5db3dc55 | |||
| d746073c3b | |||
| 858051bf2c | |||
| dccf3358c4 | |||
| 93333921c2 | |||
| 38af36b139 | |||
| e1b30a229e | |||
| e0972b3bd3 | |||
| c48c1abdc6 | |||
| 4f56c48b61 | |||
| b94e285a37 | |||
| c99770cf05 | |||
| 053e07cf5a | |||
| 6ebc88dc2e | |||
| aa68dca51c | |||
| 06d7aa1874 | |||
| 3d611684e4 | |||
| 484ffd482b | |||
| 4c2b9cc816 | |||
| 9c281c2db1 | |||
| c68210be47 | |||
| 55344e88d5 | |||
| 368aaaea8b | |||
| d4cbe72c98 | |||
| 5865cbb75b | |||
| 5f81b77081 | |||
| 6f77caca4f | |||
| d469565038 | |||
| 5146ad8b13 | |||
| 63fbbb2125 | |||
| 92b7fa8c77 | |||
| 0e60bf36c5 | |||
| d297d10b3c | |||
| b547701ef9 | |||
| 53f685283e | |||
| 76fa2a9a47 | |||
| adc3ddb68e | |||
| 2bb2c9f343 | |||
| b7485ed56c | |||
| cf459bd402 | |||
| 8cab366214 | |||
| 23e6365778 | |||
| 8b8c83f061 | |||
| ce3b5b9a77 | |||
| 81d81299bd | |||
| 93b7c87b95 | |||
| 259eac73d3 | |||
| fb04784af2 | |||
| c2d97f1165 | |||
| e72552b2cd | |||
| 4cb75e3962 | |||
| e435456e03 | |||
| 0ffb4a5509 | |||
| 7fe9149dbf | |||
| 232435c0c0 |
@@ -1,43 +0,0 @@
|
||||
---
|
||||
name: Release Please
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v5
|
||||
with:
|
||||
aws-region: us-west-2
|
||||
role-to-assume: ${{ secrets.SECRETS_AWS_PACKAGING_ROLE_TO_ASSUME }}
|
||||
role-duration-seconds: 900
|
||||
role-session-name: ${{ github.run_id }}
|
||||
|
||||
- name: Get git credentials
|
||||
uses: aws-actions/aws-secretsmanager-get-secrets@v2
|
||||
with:
|
||||
parse-json-secrets: true
|
||||
secret-ids: |
|
||||
${{ secrets.OSDS_PACKAGING_ROLE }}
|
||||
|
||||
- name: Run release-please
|
||||
uses: googleapis/release-please-action@v4
|
||||
with:
|
||||
release-type: node
|
||||
token: ${{ env.OSDS_ACCESS_TOKEN }}
|
||||
config-file: release-please-config.json
|
||||
manifest-file: .release-please-manifest.json
|
||||
@@ -1,12 +1,13 @@
|
||||
name: Run pre-release integ tests
|
||||
on:
|
||||
pull_request_target:
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
oidc:
|
||||
if: ${{ github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials') }}
|
||||
permissions:
|
||||
id-token: write
|
||||
strategy:
|
||||
@@ -32,7 +33,7 @@ jobs:
|
||||
|
||||
#can cut this test out if it's not necessary
|
||||
static_assumeRole:
|
||||
if: ${{ github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -57,7 +58,7 @@ jobs:
|
||||
aws sts get-caller-identity
|
||||
|
||||
role_chaining:
|
||||
if: ${{ github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials') }}
|
||||
permissions:
|
||||
id-token: write
|
||||
strategy:
|
||||
@@ -91,7 +92,7 @@ jobs:
|
||||
aws sts get-caller-identity
|
||||
|
||||
inline_policy:
|
||||
if: ${{ github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials') }}
|
||||
permissions:
|
||||
id-token: write
|
||||
strategy:
|
||||
@@ -129,7 +130,7 @@ jobs:
|
||||
run: exit 1
|
||||
|
||||
http-proxy:
|
||||
if: ${{ github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials') }}
|
||||
permissions:
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
@@ -163,7 +164,7 @@ jobs:
|
||||
run: exit 1
|
||||
|
||||
token-file:
|
||||
if: ${{ github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.user.login == 'aws-sdk-osds' && github.repository == 'aws-actions/configure-aws-credentials') }}
|
||||
permissions:
|
||||
id-token: write
|
||||
strategy:
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
".release-please-manifest.json": "4.0.2",
|
||||
"package.json": "4.0.2",
|
||||
".": "5.1.1"
|
||||
}
|
||||
@@ -2,6 +2,21 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [6.0.0](https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.1...v6.0.0) (2026-02-04)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* Update action to use node24 ([#1632](https://github.com/aws-actions/configure-aws-credentials/pull/1632)) ([a7a2c11](https://github.com/aws-actions/configure-aws-credentials/commit/a7a2c1125c67f40a1e95768f4e4a7d8f019f87af))
|
||||
|
||||
### Features
|
||||
|
||||
* add support to define transitive tag keys ([#1316](https://github.com/aws-actions/configure-aws-credentials/pull/1316)) ([232435c](https://github.com/aws-actions/configure-aws-credentials/commit/232435c0c05e51137544f0203931b84893d13b74)) ([930ebd9](https://github.com/aws-actions/configure-aws-credentials/pull/1628/changes/930ebd9bcaed959c3ba9e21567e8abbc3cae72c0))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* properly output `aws-account-id` and `authenticated-arn` when using role-chaining ([#1633](https://github.com/aws-actions/configure-aws-credentials/pull/1633)) ([7ceaf96](https://github.com/aws-actions/configure-aws-credentials/commit/7ceaf96edc86cc1713cef59eba79feeb23f59da1))
|
||||
|
||||
## [5.1.1](https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.0...v5.1.1) (2025-11-24)
|
||||
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ See [action.yml](./action.yml) for more detail.
|
||||
| role-external-id | The external ID of the role to assume. Only needed if your role requires it. | No |
|
||||
| role-session-name | Defaults to "GitHubActions", but may be changed if required. | No |
|
||||
| role-skip-session-tagging | Skips session tagging if set. | No |
|
||||
| transitive-tag-keys | Define a list of transitive tag keys to pass when assuming a role. | No |
|
||||
| inline-session-policy | You may further restrict the assumed role policy by defining an inline policy here. | No |
|
||||
| managed-session-policies | You may further restrict the assumed role policy by specifying a managed policy here. | No |
|
||||
| output-credentials | When set, outputs fetched credentials as action step output. (Outputs aws-access-key-id, aws-secret-access-key, aws-session-token, aws-account-id, authenticated-arn, and aws-expiration). Defaults to false. | No |
|
||||
@@ -181,7 +182,7 @@ this action will always consider the `HTTP_PROXY` environment variable.
|
||||
|
||||
Manually configured proxy:
|
||||
```yaml
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-region: us-east-2
|
||||
role-to-assume: my-github-actions-role
|
||||
@@ -217,7 +218,7 @@ run.*
|
||||
|
||||
The session will be tagged with the
|
||||
following tags: (Refer to [GitHub's documentation for `GITHUB_` environment
|
||||
variable definitions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables))
|
||||
variable definitions](https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables))
|
||||
|
||||
| Key | Value |
|
||||
| ---------- | ----------------- |
|
||||
@@ -237,6 +238,20 @@ will be replaced with an '*'._
|
||||
|
||||
The action will use session tagging by default unless you are using OIDC.
|
||||
|
||||
To [forward session tags to subsequent sessions in a role chain](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining),
|
||||
you can use the `transitive-tag-keys` input to specify the keys of the tags to be passed.
|
||||
|
||||
_Note that all subsequent roles in the chain must have `role-skip-session-tagging` set to `true`_
|
||||
```yaml
|
||||
uses: aws-actions/configure-aws-credentials@v5
|
||||
with:
|
||||
transitive-tag-keys: |
|
||||
Repository
|
||||
Workflow
|
||||
Action
|
||||
Actor
|
||||
```
|
||||
|
||||
### Session policies
|
||||
Session policies are not required, but they allow you to limit the scope of the
|
||||
fetched credentials without making changes to IAM roles. You can specify inline
|
||||
@@ -252,13 +267,13 @@ line.
|
||||
<summary>Inline session policy examples</summary>
|
||||
|
||||
```yaml
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
inline-session-policy: '{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:List*","Resource":"*"}]}'
|
||||
```
|
||||
Or we can have a nicely formatted JSON as well:
|
||||
```yaml
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
inline-session-policy: >-
|
||||
{
|
||||
@@ -284,13 +299,13 @@ the role.
|
||||
<summary>Managed session policy examples</summary>
|
||||
|
||||
```yaml
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
managed-session-policies: arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
|
||||
```
|
||||
And we can pass multiple managed policies likes this:
|
||||
```yaml
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
managed-session-policies: |
|
||||
arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
|
||||
@@ -328,7 +343,7 @@ You can specify the audience through the `audience` input:
|
||||
|
||||
```yaml
|
||||
- name: Configure AWS Credentials for China region audience
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
audience: sts.amazonaws.com.cn
|
||||
aws-region: cn-northwest-1
|
||||
@@ -402,7 +417,7 @@ Examples
|
||||
### AssumeRoleWithWebIdentity
|
||||
```yaml
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-region: us-east-2
|
||||
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
|
||||
@@ -416,13 +431,13 @@ environment variable and use it to assume the role
|
||||
### AssumeRole with role previously assumed by action in same workflow
|
||||
```yaml
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-region: us-east-2
|
||||
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
|
||||
role-session-name: MySessionName
|
||||
- name: Configure other AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-region: us-east-2
|
||||
role-to-assume: arn:aws:iam::987654321000:role/my-second-role
|
||||
@@ -439,7 +454,7 @@ Note that the trust relationship/trust policy of the second role must grant the
|
||||
### AssumeRole with static IAM credentials in repository secrets
|
||||
```yaml
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
@@ -458,7 +473,7 @@ name, like `role-to-assume: my-github-actions-role`.
|
||||
```yaml
|
||||
- name: Configure AWS Credentials 1
|
||||
id: creds
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-region: us-east-2
|
||||
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
|
||||
@@ -467,7 +482,7 @@ name, like `role-to-assume: my-github-actions-role`.
|
||||
run: |
|
||||
aws sts get-caller-identity
|
||||
- name: Configure AWS Credentials 2
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.0
|
||||
uses: aws-actions/configure-aws-credentials@v5.1.1
|
||||
with:
|
||||
aws-region: us-east-2
|
||||
aws-access-key-id: ${{ steps.creds.outputs.aws-access-key-id }}
|
||||
|
||||
+5
-2
@@ -2,7 +2,7 @@
|
||||
name: '"Configure AWS Credentials" Action for GitHub Actions'
|
||||
description: Configures AWS credentials for use in subsequent steps in a GitHub Action workflow
|
||||
runs:
|
||||
using: node20
|
||||
using: node24
|
||||
main: dist/index.js
|
||||
post: dist/cleanup/index.js
|
||||
branding:
|
||||
@@ -55,6 +55,9 @@ inputs:
|
||||
role-skip-session-tagging:
|
||||
description: Skip session tagging during role assumption
|
||||
required: false
|
||||
transitive-tag-keys:
|
||||
description: Define a list of transitive tag keys to pass when assuming a role
|
||||
required: false
|
||||
inline-session-policy:
|
||||
description: Define an inline session policy to use when assuming a role
|
||||
required: false
|
||||
@@ -67,7 +70,7 @@ inputs:
|
||||
output-env-credentials:
|
||||
description: Whether to export credentials as environment variables. If you set this to false, you probably want to use output-credentials.
|
||||
required: false
|
||||
default: true
|
||||
default: "true"
|
||||
unset-current-credentials:
|
||||
description: Whether to unset the existing credentials in your runner. May be useful if you run this action multiple times in the same job
|
||||
required: false
|
||||
|
||||
+103
-108
@@ -261,14 +261,14 @@ var schema = __webpack_require__(6890);
|
||||
var client = __webpack_require__(5152);
|
||||
var regionConfigResolver = __webpack_require__(6463);
|
||||
|
||||
let STSServiceException$1 = class STSServiceException extends smithyClient.ServiceException {
|
||||
class STSServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, STSServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 {
|
||||
class ExpiredTokenException extends STSServiceException {
|
||||
name = "ExpiredTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -279,8 +279,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceExce
|
||||
});
|
||||
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 {
|
||||
}
|
||||
class MalformedPolicyDocumentException extends STSServiceException {
|
||||
name = "MalformedPolicyDocumentException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -291,8 +291,8 @@ let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException
|
||||
});
|
||||
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
||||
}
|
||||
};
|
||||
let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 {
|
||||
}
|
||||
class PackedPolicyTooLargeException extends STSServiceException {
|
||||
name = "PackedPolicyTooLargeException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -303,8 +303,8 @@ let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
||||
}
|
||||
};
|
||||
let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 {
|
||||
}
|
||||
class RegionDisabledException extends STSServiceException {
|
||||
name = "RegionDisabledException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -315,8 +315,8 @@ let RegionDisabledException$1 = class RegionDisabledException extends STSService
|
||||
});
|
||||
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPRejectedClaimException extends STSServiceException {
|
||||
name = "IDPRejectedClaimException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -327,8 +327,8 @@ let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSSer
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
||||
}
|
||||
};
|
||||
let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 {
|
||||
}
|
||||
class InvalidIdentityTokenException extends STSServiceException {
|
||||
name = "InvalidIdentityTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -339,8 +339,8 @@ let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPCommunicationErrorException extends STSServiceException {
|
||||
name = "IDPCommunicationErrorException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -351,7 +351,7 @@ let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException exte
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _A = "Arn";
|
||||
const _AKI = "AccessKeyId";
|
||||
@@ -414,154 +414,129 @@ const _tLT = "tagListType";
|
||||
const n0 = "com.amazonaws.sts";
|
||||
var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
||||
var clientTokenType = [0, n0, _cTT, 8, 0];
|
||||
var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
|
||||
var AssumeRoleRequest = [
|
||||
var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
|
||||
var AssumeRoleRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARR,
|
||||
0,
|
||||
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
||||
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
||||
2,
|
||||
];
|
||||
var AssumeRoleResponse = [
|
||||
var AssumeRoleResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARRs,
|
||||
0,
|
||||
[_C, _ARU, _PPS, _SI],
|
||||
[[() => Credentials, 0], () => AssumedRoleUser, 1, 0],
|
||||
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
|
||||
];
|
||||
var AssumeRoleWithWebIdentityRequest = [
|
||||
var AssumeRoleWithWebIdentityRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIR,
|
||||
0,
|
||||
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
||||
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
||||
3,
|
||||
];
|
||||
var AssumeRoleWithWebIdentityResponse = [
|
||||
var AssumeRoleWithWebIdentityResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIRs,
|
||||
0,
|
||||
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
||||
[[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0],
|
||||
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
|
||||
];
|
||||
var Credentials = [
|
||||
var Credentials$ = [
|
||||
3,
|
||||
n0,
|
||||
_C,
|
||||
0,
|
||||
[_AKI, _SAK, _ST, _E],
|
||||
[0, [() => accessKeySecretType, 0], 0, 4],
|
||||
4,
|
||||
];
|
||||
var ExpiredTokenException = [
|
||||
var ExpiredTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_ETE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`ExpiredTokenException`, 400],
|
||||
},
|
||||
{ [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
|
||||
var IDPCommunicationErrorException = [
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
|
||||
var IDPCommunicationErrorException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPCEE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`IDPCommunicationError`, 400],
|
||||
},
|
||||
{ [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1);
|
||||
var IDPRejectedClaimException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
||||
var IDPRejectedClaimException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPRCE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`IDPRejectedClaim`, 403],
|
||||
},
|
||||
{ [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1);
|
||||
var InvalidIdentityTokenException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
||||
var InvalidIdentityTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IITE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`InvalidIdentityToken`, 400],
|
||||
},
|
||||
{ [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1);
|
||||
var MalformedPolicyDocumentException = [
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
||||
var MalformedPolicyDocumentException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_MPDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`MalformedPolicyDocument`, 400],
|
||||
},
|
||||
{ [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1);
|
||||
var PackedPolicyTooLargeException = [
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
||||
var PackedPolicyTooLargeException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_PPTLE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`PackedPolicyTooLarge`, 400],
|
||||
},
|
||||
{ [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1);
|
||||
var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException = [
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
||||
var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_RDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`RegionDisabledException`, 403],
|
||||
},
|
||||
{ [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1);
|
||||
var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
|
||||
var STSServiceException = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag];
|
||||
var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
|
||||
var AssumeRoleWithWebIdentity = [
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException$, RegionDisabledException);
|
||||
var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
|
||||
var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException$, STSServiceException);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag$];
|
||||
var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
|
||||
var AssumeRoleWithWebIdentity$ = [
|
||||
9,
|
||||
n0,
|
||||
_ARWWI,
|
||||
0,
|
||||
() => AssumeRoleWithWebIdentityRequest,
|
||||
() => AssumeRoleWithWebIdentityResponse,
|
||||
() => AssumeRoleWithWebIdentityRequest$,
|
||||
() => AssumeRoleWithWebIdentityResponse$,
|
||||
];
|
||||
|
||||
class AssumeRoleCommand extends smithyClient.Command
|
||||
@@ -572,7 +547,7 @@ class AssumeRoleCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
||||
.n("STSClient", "AssumeRoleCommand")
|
||||
.sc(AssumeRole)
|
||||
.sc(AssumeRole$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -584,7 +559,7 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
||||
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
||||
.sc(AssumeRoleWithWebIdentity)
|
||||
.sc(AssumeRoleWithWebIdentity$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -608,9 +583,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
||||
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
||||
const region = typeof _region === "function" ? await _region() : _region;
|
||||
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
||||
const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)();
|
||||
let stsDefaultRegion = "";
|
||||
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
|
||||
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
||||
return region ?? parentRegion ?? stsDefaultRegion;
|
||||
return resolvedRegion;
|
||||
};
|
||||
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
||||
let stsClient;
|
||||
@@ -719,17 +695,36 @@ Object.defineProperty(exports, "$Command", ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
}));
|
||||
exports.AssumeRole$ = AssumeRole$;
|
||||
exports.AssumeRoleCommand = AssumeRoleCommand;
|
||||
exports.AssumeRoleRequest$ = AssumeRoleRequest$;
|
||||
exports.AssumeRoleResponse$ = AssumeRoleResponse$;
|
||||
exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
|
||||
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
||||
exports.ExpiredTokenException = ExpiredTokenException$1;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException$1;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException$1;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException$1;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException$1;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException$1;
|
||||
exports.RegionDisabledException = RegionDisabledException$1;
|
||||
exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
|
||||
exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
|
||||
exports.AssumedRoleUser$ = AssumedRoleUser$;
|
||||
exports.Credentials$ = Credentials$;
|
||||
exports.ExpiredTokenException = ExpiredTokenException;
|
||||
exports.ExpiredTokenException$ = ExpiredTokenException$;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
|
||||
exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException;
|
||||
exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
|
||||
exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
|
||||
exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
|
||||
exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
|
||||
exports.PolicyDescriptorType$ = PolicyDescriptorType$;
|
||||
exports.ProvidedContext$ = ProvidedContext$;
|
||||
exports.RegionDisabledException = RegionDisabledException;
|
||||
exports.RegionDisabledException$ = RegionDisabledException$;
|
||||
exports.STS = STS;
|
||||
exports.STSServiceException = STSServiceException$1;
|
||||
exports.STSServiceException = STSServiceException;
|
||||
exports.STSServiceException$ = STSServiceException$;
|
||||
exports.Tag$ = Tag$;
|
||||
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
||||
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
||||
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
||||
@@ -759,14 +754,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(4443);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -855,12 +849,13 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ??
|
||||
new protocols_1.AwsQueryProtocol({
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
}),
|
||||
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
serviceTarget: "AWSSecurityTokenServiceV20110615",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "STS",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -895,7 +890,7 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.933.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+108
-164
@@ -221,17 +221,14 @@ class SSOOIDCClient extends smithyClient.Client {
|
||||
}
|
||||
}
|
||||
|
||||
let SSOOIDCServiceException$1 = class SSOOIDCServiceException extends smithyClient.ServiceException {
|
||||
class SSOOIDCServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const AccessDeniedExceptionReason = {
|
||||
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
|
||||
};
|
||||
let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCServiceException$1 {
|
||||
class AccessDeniedException extends SSOOIDCServiceException {
|
||||
name = "AccessDeniedException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -248,8 +245,8 @@ let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCService
|
||||
this.reason = opts.reason;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let AuthorizationPendingException$1 = class AuthorizationPendingException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class AuthorizationPendingException extends SSOOIDCServiceException {
|
||||
name = "AuthorizationPendingException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -264,8 +261,8 @@ let AuthorizationPendingException$1 = class AuthorizationPendingException extend
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class ExpiredTokenException extends SSOOIDCServiceException {
|
||||
name = "ExpiredTokenException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -280,8 +277,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCService
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InternalServerException$1 = class InternalServerException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InternalServerException extends SSOOIDCServiceException {
|
||||
name = "InternalServerException";
|
||||
$fault = "server";
|
||||
error;
|
||||
@@ -296,8 +293,8 @@ let InternalServerException$1 = class InternalServerException extends SSOOIDCSer
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidClientException extends SSOOIDCServiceException {
|
||||
name = "InvalidClientException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -312,8 +309,8 @@ let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServi
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidGrantException extends SSOOIDCServiceException {
|
||||
name = "InvalidGrantException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -328,14 +325,8 @@ let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCService
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
const InvalidRequestExceptionReason = {
|
||||
KMS_DISABLED_KEY: "KMS_DisabledException",
|
||||
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
|
||||
KMS_INVALID_STATE: "KMS_InvalidStateException",
|
||||
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
|
||||
};
|
||||
let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidRequestException extends SSOOIDCServiceException {
|
||||
name = "InvalidRequestException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -352,8 +343,8 @@ let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCSer
|
||||
this.reason = opts.reason;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidScopeException extends SSOOIDCServiceException {
|
||||
name = "InvalidScopeException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -368,8 +359,8 @@ let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCService
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class SlowDownException extends SSOOIDCServiceException {
|
||||
name = "SlowDownException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -384,8 +375,8 @@ let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceExceptio
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let UnauthorizedClientException$1 = class UnauthorizedClientException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class UnauthorizedClientException extends SSOOIDCServiceException {
|
||||
name = "UnauthorizedClientException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -400,8 +391,8 @@ let UnauthorizedClientException$1 = class UnauthorizedClientException extends SS
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class UnsupportedGrantTypeException extends SSOOIDCServiceException {
|
||||
name = "UnsupportedGrantTypeException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -416,7 +407,7 @@ let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extend
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _ADE = "AccessDeniedException";
|
||||
const _APE = "AuthorizationPendingException";
|
||||
@@ -464,39 +455,34 @@ var ClientSecret = [0, n0, _CS, 8, 0];
|
||||
var CodeVerifier = [0, n0, _CV, 8, 0];
|
||||
var IdToken = [0, n0, _IT, 8, 0];
|
||||
var RefreshToken = [0, n0, _RT, 8, 0];
|
||||
var AccessDeniedException = [
|
||||
var AccessDeniedException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_ADE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _r, _ed],
|
||||
[0, 0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
|
||||
var AuthorizationPendingException = [
|
||||
schema.TypeRegistry.for(n0).registerError(AccessDeniedException$, AccessDeniedException);
|
||||
var AuthorizationPendingException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_APE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(AuthorizationPendingException, AuthorizationPendingException$1);
|
||||
var CreateTokenRequest = [
|
||||
schema.TypeRegistry.for(n0).registerError(AuthorizationPendingException$, AuthorizationPendingException);
|
||||
var CreateTokenRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_CTR,
|
||||
0,
|
||||
[_cI, _cS, _gT, _dC, _co, _rT, _s, _rU, _cV],
|
||||
[0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],
|
||||
3,
|
||||
];
|
||||
var CreateTokenResponse = [
|
||||
var CreateTokenResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_CTRr,
|
||||
@@ -504,125 +490,54 @@ var CreateTokenResponse = [
|
||||
[_aT, _tT, _eI, _rT, _iT],
|
||||
[[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],
|
||||
];
|
||||
var ExpiredTokenException = [
|
||||
-3,
|
||||
n0,
|
||||
_ETE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
|
||||
var InternalServerException = [
|
||||
-3,
|
||||
n0,
|
||||
_ISE,
|
||||
{
|
||||
[_e]: _se,
|
||||
[_hE]: 500,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1);
|
||||
var InvalidClientException = [
|
||||
-3,
|
||||
n0,
|
||||
_ICE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 401,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidClientException, InvalidClientException$1);
|
||||
var InvalidGrantException = [
|
||||
-3,
|
||||
n0,
|
||||
_IGE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidGrantException, InvalidGrantException$1);
|
||||
var InvalidRequestException = [
|
||||
var ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
|
||||
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InternalServerException$, InternalServerException);
|
||||
var InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidClientException$, InvalidClientException);
|
||||
var InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidGrantException$, InvalidGrantException);
|
||||
var InvalidRequestException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IRE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _r, _ed],
|
||||
[0, 0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
|
||||
var InvalidScopeException = [
|
||||
-3,
|
||||
n0,
|
||||
_ISEn,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidScopeException, InvalidScopeException$1);
|
||||
var SlowDownException = [
|
||||
-3,
|
||||
n0,
|
||||
_SDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(SlowDownException, SlowDownException$1);
|
||||
var UnauthorizedClientException = [
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
|
||||
var InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidScopeException$, InvalidScopeException);
|
||||
var SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(SlowDownException$, SlowDownException);
|
||||
var UnauthorizedClientException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_UCE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedClientException, UnauthorizedClientException$1);
|
||||
var UnsupportedGrantTypeException = [
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedClientException$, UnauthorizedClientException);
|
||||
var UnsupportedGrantTypeException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_UGTE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(UnsupportedGrantTypeException, UnsupportedGrantTypeException$1);
|
||||
var SSOOIDCServiceException = [-3, _sm, "SSOOIDCServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_sm).registerError(SSOOIDCServiceException, SSOOIDCServiceException$1);
|
||||
var CreateToken = [
|
||||
schema.TypeRegistry.for(n0).registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);
|
||||
var SSOOIDCServiceException$ = [-3, _sm, "SSOOIDCServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_sm).registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
|
||||
var CreateToken$ = [
|
||||
9,
|
||||
n0,
|
||||
_CT,
|
||||
{
|
||||
[_h]: ["POST", "/token", 200],
|
||||
},
|
||||
() => CreateTokenRequest,
|
||||
() => CreateTokenResponse,
|
||||
{ [_h]: ["POST", "/token", 200] },
|
||||
() => CreateTokenRequest$,
|
||||
() => CreateTokenResponse$,
|
||||
];
|
||||
|
||||
class CreateTokenCommand extends smithyClient.Command
|
||||
@@ -633,7 +548,7 @@ class CreateTokenCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSSOOIDCService", "CreateToken", {})
|
||||
.n("SSOOIDCClient", "CreateTokenCommand")
|
||||
.sc(CreateToken)
|
||||
.sc(CreateToken$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -644,6 +559,16 @@ class SSOOIDC extends SSOOIDCClient {
|
||||
}
|
||||
smithyClient.createAggregatedClient(commands, SSOOIDC);
|
||||
|
||||
const AccessDeniedExceptionReason = {
|
||||
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
|
||||
};
|
||||
const InvalidRequestExceptionReason = {
|
||||
KMS_DISABLED_KEY: "KMS_DisabledException",
|
||||
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
|
||||
KMS_INVALID_STATE: "KMS_InvalidStateException",
|
||||
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
|
||||
};
|
||||
|
||||
__webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
@@ -652,23 +577,38 @@ __webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Client; }
|
||||
});
|
||||
__webpack_unused_export__ = AccessDeniedException$1;
|
||||
__webpack_unused_export__ = AccessDeniedException;
|
||||
__webpack_unused_export__ = AccessDeniedException$;
|
||||
__webpack_unused_export__ = AccessDeniedExceptionReason;
|
||||
__webpack_unused_export__ = AuthorizationPendingException$1;
|
||||
__webpack_unused_export__ = AuthorizationPendingException;
|
||||
__webpack_unused_export__ = AuthorizationPendingException$;
|
||||
__webpack_unused_export__ = CreateToken$;
|
||||
exports.CreateTokenCommand = CreateTokenCommand;
|
||||
__webpack_unused_export__ = ExpiredTokenException$1;
|
||||
__webpack_unused_export__ = InternalServerException$1;
|
||||
__webpack_unused_export__ = InvalidClientException$1;
|
||||
__webpack_unused_export__ = InvalidGrantException$1;
|
||||
__webpack_unused_export__ = InvalidRequestException$1;
|
||||
__webpack_unused_export__ = CreateTokenRequest$;
|
||||
__webpack_unused_export__ = CreateTokenResponse$;
|
||||
__webpack_unused_export__ = ExpiredTokenException;
|
||||
__webpack_unused_export__ = ExpiredTokenException$;
|
||||
__webpack_unused_export__ = InternalServerException;
|
||||
__webpack_unused_export__ = InternalServerException$;
|
||||
__webpack_unused_export__ = InvalidClientException;
|
||||
__webpack_unused_export__ = InvalidClientException$;
|
||||
__webpack_unused_export__ = InvalidGrantException;
|
||||
__webpack_unused_export__ = InvalidGrantException$;
|
||||
__webpack_unused_export__ = InvalidRequestException;
|
||||
__webpack_unused_export__ = InvalidRequestException$;
|
||||
__webpack_unused_export__ = InvalidRequestExceptionReason;
|
||||
__webpack_unused_export__ = InvalidScopeException$1;
|
||||
__webpack_unused_export__ = InvalidScopeException;
|
||||
__webpack_unused_export__ = InvalidScopeException$;
|
||||
__webpack_unused_export__ = SSOOIDC;
|
||||
exports.SSOOIDCClient = SSOOIDCClient;
|
||||
__webpack_unused_export__ = SSOOIDCServiceException$1;
|
||||
__webpack_unused_export__ = SlowDownException$1;
|
||||
__webpack_unused_export__ = UnauthorizedClientException$1;
|
||||
__webpack_unused_export__ = UnsupportedGrantTypeException$1;
|
||||
__webpack_unused_export__ = SSOOIDCServiceException;
|
||||
__webpack_unused_export__ = SSOOIDCServiceException$;
|
||||
__webpack_unused_export__ = SlowDownException;
|
||||
__webpack_unused_export__ = SlowDownException$;
|
||||
__webpack_unused_export__ = UnauthorizedClientException;
|
||||
__webpack_unused_export__ = UnauthorizedClientException$;
|
||||
__webpack_unused_export__ = UnsupportedGrantTypeException;
|
||||
__webpack_unused_export__ = UnsupportedGrantTypeException$;
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -688,14 +628,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(1546);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -771,7 +710,12 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.ssooidc" }),
|
||||
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.ssooidc",
|
||||
version: "2019-06-10",
|
||||
serviceTarget: "AWSSSOOIDCService",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "SSO OIDC",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -786,7 +730,7 @@ exports.getRuntimeConfig = getRuntimeConfig;
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.933.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+5
-1
@@ -134,6 +134,11 @@ class EventStreamSerde {
|
||||
[unionMember]: out,
|
||||
};
|
||||
}
|
||||
if (body.byteLength === 0) {
|
||||
return {
|
||||
[unionMember]: {},
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
[unionMember]: await this.deserializer.read(eventStreamSchema, body),
|
||||
@@ -195,7 +200,6 @@ class EventStreamSerde {
|
||||
const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
|
||||
if (eventPayload) {
|
||||
explicitPayloadMember = memberName;
|
||||
break;
|
||||
}
|
||||
else if (eventHeader) {
|
||||
const value = event[unionMember][memberName];
|
||||
|
||||
+587
@@ -0,0 +1,587 @@
|
||||
"use strict";
|
||||
exports.id = 762;
|
||||
exports.ids = [762];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 7709:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.resolveHttpAuthSchemeConfig = exports.defaultSigninHttpAuthSchemeProvider = exports.defaultSigninHttpAuthSchemeParametersProvider = void 0;
|
||||
const core_1 = __webpack_require__(8704);
|
||||
const util_middleware_1 = __webpack_require__(6324);
|
||||
const defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
||||
return {
|
||||
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
||||
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
|
||||
(() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
};
|
||||
};
|
||||
exports.defaultSigninHttpAuthSchemeParametersProvider = defaultSigninHttpAuthSchemeParametersProvider;
|
||||
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
||||
return {
|
||||
schemeId: "aws.auth#sigv4",
|
||||
signingProperties: {
|
||||
name: "signin",
|
||||
region: authParameters.region,
|
||||
},
|
||||
propertiesExtractor: (config, context) => ({
|
||||
signingProperties: {
|
||||
config,
|
||||
context,
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
||||
return {
|
||||
schemeId: "smithy.api#noAuth",
|
||||
};
|
||||
}
|
||||
const defaultSigninHttpAuthSchemeProvider = (authParameters) => {
|
||||
const options = [];
|
||||
switch (authParameters.operation) {
|
||||
case "CreateOAuth2Token": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
exports.defaultSigninHttpAuthSchemeProvider = defaultSigninHttpAuthSchemeProvider;
|
||||
const resolveHttpAuthSchemeConfig = (config) => {
|
||||
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
|
||||
return Object.assign(config_0, {
|
||||
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
|
||||
});
|
||||
};
|
||||
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2547:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.defaultEndpointResolver = void 0;
|
||||
const util_endpoints_1 = __webpack_require__(3068);
|
||||
const util_endpoints_2 = __webpack_require__(9674);
|
||||
const ruleset_1 = __webpack_require__(6904);
|
||||
const cache = new util_endpoints_2.EndpointCache({
|
||||
size: 50,
|
||||
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
||||
});
|
||||
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
}));
|
||||
};
|
||||
exports.defaultEndpointResolver = defaultEndpointResolver;
|
||||
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6904:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ruleSet = void 0;
|
||||
const u = "required", v = "fn", w = "argv", x = "ref";
|
||||
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: true, "default": false, "type": "boolean" }, j = { [u]: false, "type": "string" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, p = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, q = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }];
|
||||
const _data = { version: "1.0", parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: [m], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [{ [v]: h, [w]: [o, "aws"] }, p, q], endpoint: { url: "https://{Region}.signin.aws.amazon.com", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-cn"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws.cn", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-us-gov"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws-us-gov.com", properties: n, headers: n }, type: e }, { conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, r] }, s], rules: [{ endpoint: { url: "https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: [l, q], rules: [{ conditions: [{ [v]: c, [w]: [r, a] }], rules: [{ endpoint: { url: "https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: [p, m], rules: [{ conditions: [s], rules: [{ endpoint: { url: "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://signin.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
||||
exports.ruleSet = _data;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9762:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
var __webpack_unused_export__;
|
||||
|
||||
|
||||
var middlewareHostHeader = __webpack_require__(2590);
|
||||
var middlewareLogger = __webpack_require__(5242);
|
||||
var middlewareRecursionDetection = __webpack_require__(1568);
|
||||
var middlewareUserAgent = __webpack_require__(2959);
|
||||
var configResolver = __webpack_require__(9316);
|
||||
var core = __webpack_require__(402);
|
||||
var schema = __webpack_require__(6890);
|
||||
var middlewareContentLength = __webpack_require__(7212);
|
||||
var middlewareEndpoint = __webpack_require__(99);
|
||||
var middlewareRetry = __webpack_require__(9618);
|
||||
var smithyClient = __webpack_require__(1411);
|
||||
var httpAuthSchemeProvider = __webpack_require__(7709);
|
||||
var runtimeConfig = __webpack_require__(2836);
|
||||
var regionConfigResolver = __webpack_require__(6463);
|
||||
var protocolHttp = __webpack_require__(2356);
|
||||
|
||||
const resolveClientEndpointParameters = (options) => {
|
||||
return Object.assign(options, {
|
||||
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
||||
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
||||
defaultSigningName: "signin",
|
||||
});
|
||||
};
|
||||
const commonParams = {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
|
||||
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
||||
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
||||
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
||||
let _credentials = runtimeConfig.credentials;
|
||||
return {
|
||||
setHttpAuthScheme(httpAuthScheme) {
|
||||
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
||||
if (index === -1) {
|
||||
_httpAuthSchemes.push(httpAuthScheme);
|
||||
}
|
||||
else {
|
||||
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
||||
}
|
||||
},
|
||||
httpAuthSchemes() {
|
||||
return _httpAuthSchemes;
|
||||
},
|
||||
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
||||
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
||||
},
|
||||
httpAuthSchemeProvider() {
|
||||
return _httpAuthSchemeProvider;
|
||||
},
|
||||
setCredentials(credentials) {
|
||||
_credentials = credentials;
|
||||
},
|
||||
credentials() {
|
||||
return _credentials;
|
||||
},
|
||||
};
|
||||
};
|
||||
const resolveHttpAuthRuntimeConfig = (config) => {
|
||||
return {
|
||||
httpAuthSchemes: config.httpAuthSchemes(),
|
||||
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
||||
credentials: config.credentials(),
|
||||
};
|
||||
};
|
||||
|
||||
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
||||
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
||||
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
||||
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
||||
};
|
||||
|
||||
class SigninClient extends smithyClient.Client {
|
||||
config;
|
||||
constructor(...[configuration]) {
|
||||
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
||||
super(_config_0);
|
||||
this.initConfig = _config_0;
|
||||
const _config_1 = resolveClientEndpointParameters(_config_0);
|
||||
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
||||
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
||||
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
||||
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
||||
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
||||
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
||||
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
||||
this.config = _config_8;
|
||||
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
||||
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
||||
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
||||
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSigninHttpAuthSchemeParametersProvider,
|
||||
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
||||
"aws.auth#sigv4": config.credentials,
|
||||
}),
|
||||
}));
|
||||
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
||||
}
|
||||
destroy() {
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
class SigninServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SigninServiceException.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
class AccessDeniedException extends SigninServiceException {
|
||||
name = "AccessDeniedException";
|
||||
$fault = "client";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "AccessDeniedException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
class InternalServerException extends SigninServiceException {
|
||||
name = "InternalServerException";
|
||||
$fault = "server";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InternalServerException",
|
||||
$fault: "server",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, InternalServerException.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
class TooManyRequestsError extends SigninServiceException {
|
||||
name = "TooManyRequestsError";
|
||||
$fault = "client";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "TooManyRequestsError",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, TooManyRequestsError.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
class ValidationException extends SigninServiceException {
|
||||
name = "ValidationException";
|
||||
$fault = "client";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ValidationException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, ValidationException.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
|
||||
const _ADE = "AccessDeniedException";
|
||||
const _AT = "AccessToken";
|
||||
const _COAT = "CreateOAuth2Token";
|
||||
const _COATR = "CreateOAuth2TokenRequest";
|
||||
const _COATRB = "CreateOAuth2TokenRequestBody";
|
||||
const _COATRBr = "CreateOAuth2TokenResponseBody";
|
||||
const _COATRr = "CreateOAuth2TokenResponse";
|
||||
const _ISE = "InternalServerException";
|
||||
const _RT = "RefreshToken";
|
||||
const _TMRE = "TooManyRequestsError";
|
||||
const _VE = "ValidationException";
|
||||
const _aKI = "accessKeyId";
|
||||
const _aT = "accessToken";
|
||||
const _c = "client";
|
||||
const _cI = "clientId";
|
||||
const _cV = "codeVerifier";
|
||||
const _co = "code";
|
||||
const _e = "error";
|
||||
const _eI = "expiresIn";
|
||||
const _gT = "grantType";
|
||||
const _h = "http";
|
||||
const _hE = "httpError";
|
||||
const _iT = "idToken";
|
||||
const _jN = "jsonName";
|
||||
const _m = "message";
|
||||
const _rT = "refreshToken";
|
||||
const _rU = "redirectUri";
|
||||
const _s = "server";
|
||||
const _sAK = "secretAccessKey";
|
||||
const _sT = "sessionToken";
|
||||
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
|
||||
const _tI = "tokenInput";
|
||||
const _tO = "tokenOutput";
|
||||
const _tT = "tokenType";
|
||||
const n0 = "com.amazonaws.signin";
|
||||
var RefreshToken = [0, n0, _RT, 8, 0];
|
||||
var AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(AccessDeniedException$, AccessDeniedException);
|
||||
var AccessToken$ = [
|
||||
3,
|
||||
n0,
|
||||
_AT,
|
||||
8,
|
||||
[_aKI, _sAK, _sT],
|
||||
[
|
||||
[0, { [_jN]: _aKI }],
|
||||
[0, { [_jN]: _sAK }],
|
||||
[0, { [_jN]: _sT }],
|
||||
],
|
||||
3,
|
||||
];
|
||||
var CreateOAuth2TokenRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATR,
|
||||
0,
|
||||
[_tI],
|
||||
[[() => CreateOAuth2TokenRequestBody$, 16]],
|
||||
1,
|
||||
];
|
||||
var CreateOAuth2TokenRequestBody$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATRB,
|
||||
0,
|
||||
[_cI, _gT, _co, _rU, _cV, _rT],
|
||||
[
|
||||
[0, { [_jN]: _cI }],
|
||||
[0, { [_jN]: _gT }],
|
||||
0,
|
||||
[0, { [_jN]: _rU }],
|
||||
[0, { [_jN]: _cV }],
|
||||
[() => RefreshToken, { [_jN]: _rT }],
|
||||
],
|
||||
2,
|
||||
];
|
||||
var CreateOAuth2TokenResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATRr,
|
||||
0,
|
||||
[_tO],
|
||||
[[() => CreateOAuth2TokenResponseBody$, 16]],
|
||||
1,
|
||||
];
|
||||
var CreateOAuth2TokenResponseBody$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATRBr,
|
||||
0,
|
||||
[_aT, _tT, _eI, _rT, _iT],
|
||||
[
|
||||
[() => AccessToken$, { [_jN]: _aT }],
|
||||
[0, { [_jN]: _tT }],
|
||||
[1, { [_jN]: _eI }],
|
||||
[() => RefreshToken, { [_jN]: _rT }],
|
||||
[0, { [_jN]: _iT }],
|
||||
],
|
||||
4,
|
||||
];
|
||||
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _s, [_hE]: 500 }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(InternalServerException$, InternalServerException);
|
||||
var TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(TooManyRequestsError$, TooManyRequestsError);
|
||||
var ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(ValidationException$, ValidationException);
|
||||
var SigninServiceException$ = [-3, _sm, "SigninServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_sm).registerError(SigninServiceException$, SigninServiceException);
|
||||
var CreateOAuth2Token$ = [
|
||||
9,
|
||||
n0,
|
||||
_COAT,
|
||||
{ [_h]: ["POST", "/v1/token", 200] },
|
||||
() => CreateOAuth2TokenRequest$,
|
||||
() => CreateOAuth2TokenResponse$,
|
||||
];
|
||||
|
||||
class CreateOAuth2TokenCommand extends smithyClient.Command
|
||||
.classBuilder()
|
||||
.ep(commonParams)
|
||||
.m(function (Command, cs, config, o) {
|
||||
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
||||
})
|
||||
.s("Signin", "CreateOAuth2Token", {})
|
||||
.n("SigninClient", "CreateOAuth2TokenCommand")
|
||||
.sc(CreateOAuth2Token$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
const commands = {
|
||||
CreateOAuth2TokenCommand,
|
||||
};
|
||||
class Signin extends SigninClient {
|
||||
}
|
||||
smithyClient.createAggregatedClient(commands, Signin);
|
||||
|
||||
const OAuth2ErrorCode = {
|
||||
AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED",
|
||||
INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS",
|
||||
INVALID_REQUEST: "INVALID_REQUEST",
|
||||
SERVER_ERROR: "server_error",
|
||||
TOKEN_EXPIRED: "TOKEN_EXPIRED",
|
||||
USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED",
|
||||
};
|
||||
|
||||
__webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
});
|
||||
__webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Client; }
|
||||
});
|
||||
__webpack_unused_export__ = AccessDeniedException;
|
||||
__webpack_unused_export__ = AccessDeniedException$;
|
||||
__webpack_unused_export__ = AccessToken$;
|
||||
__webpack_unused_export__ = CreateOAuth2Token$;
|
||||
exports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenRequest$;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenRequestBody$;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenResponse$;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenResponseBody$;
|
||||
__webpack_unused_export__ = InternalServerException;
|
||||
__webpack_unused_export__ = InternalServerException$;
|
||||
__webpack_unused_export__ = OAuth2ErrorCode;
|
||||
__webpack_unused_export__ = Signin;
|
||||
exports.SigninClient = SigninClient;
|
||||
__webpack_unused_export__ = SigninServiceException;
|
||||
__webpack_unused_export__ = SigninServiceException$;
|
||||
__webpack_unused_export__ = TooManyRequestsError;
|
||||
__webpack_unused_export__ = TooManyRequestsError$;
|
||||
__webpack_unused_export__ = ValidationException;
|
||||
__webpack_unused_export__ = ValidationException$;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2836:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const tslib_1 = __webpack_require__(1860);
|
||||
const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955));
|
||||
const core_1 = __webpack_require__(8704);
|
||||
const util_user_agent_node_1 = __webpack_require__(1656);
|
||||
const config_resolver_1 = __webpack_require__(9316);
|
||||
const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(357);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const loaderConfig = {
|
||||
profile: config?.profile,
|
||||
logger: clientSharedValues.logger,
|
||||
};
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "node",
|
||||
defaultsMode,
|
||||
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
||||
region: config?.region ??
|
||||
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
||||
retryMode: config?.retryMode ??
|
||||
(0, node_config_provider_1.loadConfig)({
|
||||
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
||||
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
||||
}, config),
|
||||
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
||||
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
||||
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 357:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const core_1 = __webpack_require__(8704);
|
||||
const protocols_1 = __webpack_require__(7288);
|
||||
const core_2 = __webpack_require__(402);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const url_parser_1 = __webpack_require__(4494);
|
||||
const util_base64_1 = __webpack_require__(8385);
|
||||
const util_utf8_1 = __webpack_require__(1577);
|
||||
const httpAuthSchemeProvider_1 = __webpack_require__(7709);
|
||||
const endpointResolver_1 = __webpack_require__(2547);
|
||||
const getRuntimeConfig = (config) => {
|
||||
return {
|
||||
apiVersion: "2023-01-01",
|
||||
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
||||
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
||||
disableHostPrefix: config?.disableHostPrefix ?? false,
|
||||
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
||||
extensions: config?.extensions ?? [],
|
||||
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSigninHttpAuthSchemeProvider,
|
||||
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
||||
{
|
||||
schemeId: "aws.auth#sigv4",
|
||||
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
||||
signer: new core_1.AwsSdkSigV4Signer(),
|
||||
},
|
||||
{
|
||||
schemeId: "smithy.api#noAuth",
|
||||
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
||||
signer: new core_2.NoAuthSigner(),
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.signin",
|
||||
version: "2023-01-01",
|
||||
serviceTarget: "Signin",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "Signin",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
+327
-21
@@ -11,6 +11,7 @@ exports.modules = {
|
||||
var sharedIniFileLoader = __webpack_require__(4964);
|
||||
var propertyProvider = __webpack_require__(1238);
|
||||
var client = __webpack_require__(5152);
|
||||
var credentialProviderLogin = __webpack_require__(4072);
|
||||
|
||||
const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
||||
const sourceProvidersMap = {
|
||||
@@ -64,7 +65,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
||||
}
|
||||
return withProviderProfile;
|
||||
};
|
||||
const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
|
||||
const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {
|
||||
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
||||
const profileData = profiles[profileName];
|
||||
const { source_profile, region } = profileData;
|
||||
@@ -74,8 +75,9 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi
|
||||
...options.clientConfig,
|
||||
credentialProviderLogger: options.logger,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
...options?.parentClientConfig,
|
||||
region: region ?? options?.parentClientConfig?.region,
|
||||
region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,
|
||||
},
|
||||
}, options.clientPlugins);
|
||||
}
|
||||
@@ -86,7 +88,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi
|
||||
}
|
||||
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
||||
const sourceCredsProvider = source_profile
|
||||
? resolveProfileData(source_profile, profiles, options, {
|
||||
? resolveProfileData(source_profile, profiles, options, callerClientConfig, {
|
||||
...visitedProfiles,
|
||||
[source_profile]: true,
|
||||
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
|
||||
@@ -117,20 +119,33 @@ const isCredentialSourceWithoutRoleArn = (section) => {
|
||||
return !section.role_arn && !!section.credential_source;
|
||||
};
|
||||
|
||||
const isLoginProfile = (data) => {
|
||||
return Boolean(data && data.login_session);
|
||||
};
|
||||
const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
||||
const credentials = await credentialProviderLogin.fromLoginCredentials({
|
||||
...options,
|
||||
profile: profileName,
|
||||
})({ callerClientConfig });
|
||||
return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
||||
};
|
||||
|
||||
const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
||||
const resolveProcessCredentials = async (options, profile) => __webpack_require__.e(/* import() */ 360).then(__webpack_require__.t.bind(__webpack_require__, 5360, 19)).then(({ fromProcess }) => fromProcess({
|
||||
...options,
|
||||
profile,
|
||||
})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
||||
|
||||
const resolveSsoCredentials = async (profile, profileData, options = {}) => {
|
||||
const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
||||
const { fromSSO } = await __webpack_require__.e(/* import() */ 998).then(__webpack_require__.t.bind(__webpack_require__, 998, 19));
|
||||
return fromSSO({
|
||||
profile,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
clientConfig: options.clientConfig,
|
||||
})().then((creds) => {
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => {
|
||||
if (profileData.sso_session) {
|
||||
return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
||||
}
|
||||
@@ -169,56 +184,347 @@ const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg.web_identity_token_file === "string" &&
|
||||
typeof arg.role_arn === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
||||
const resolveWebIdentityCredentials = async (profile, options) => __webpack_require__.e(/* import() */ 956).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({
|
||||
const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => __webpack_require__.e(/* import() */ 956).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({
|
||||
webIdentityTokenFile: profile.web_identity_token_file,
|
||||
roleArn: profile.role_arn,
|
||||
roleSessionName: profile.role_session_name,
|
||||
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
||||
|
||||
const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
||||
const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
||||
const data = profiles[profileName];
|
||||
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
||||
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
|
||||
return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
|
||||
}
|
||||
if (isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isWebIdentityProfile(data)) {
|
||||
return resolveWebIdentityCredentials(data, options);
|
||||
return resolveWebIdentityCredentials(data, options, callerClientConfig);
|
||||
}
|
||||
if (isProcessProfile(data)) {
|
||||
return resolveProcessCredentials(options, profileName);
|
||||
}
|
||||
if (isSsoProfile(data)) {
|
||||
return await resolveSsoCredentials(profileName, data, options);
|
||||
return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
|
||||
}
|
||||
if (isLoginProfile(data)) {
|
||||
return resolveLoginCredentials(profileName, options, callerClientConfig);
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
||||
};
|
||||
|
||||
const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
const init = {
|
||||
..._init,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
..._init.parentClientConfig,
|
||||
},
|
||||
};
|
||||
const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
|
||||
return resolveProfileData(sharedIniFileLoader.getProfileName({
|
||||
profile: _init.profile ?? callerClientConfig?.profile,
|
||||
}), profiles, init);
|
||||
profile: init.profile ?? callerClientConfig?.profile,
|
||||
}), profiles, init, callerClientConfig);
|
||||
};
|
||||
|
||||
exports.fromIni = fromIni;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4072:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
|
||||
var client = __webpack_require__(5152);
|
||||
var propertyProvider = __webpack_require__(1238);
|
||||
var sharedIniFileLoader = __webpack_require__(4964);
|
||||
var protocolHttp = __webpack_require__(2356);
|
||||
var node_crypto = __webpack_require__(7598);
|
||||
var node_fs = __webpack_require__(3024);
|
||||
var node_os = __webpack_require__(8161);
|
||||
var node_path = __webpack_require__(6760);
|
||||
|
||||
class LoginCredentialsFetcher {
|
||||
profileData;
|
||||
init;
|
||||
callerClientConfig;
|
||||
static REFRESH_THRESHOLD = 5 * 60 * 1000;
|
||||
constructor(profileData, init, callerClientConfig) {
|
||||
this.profileData = profileData;
|
||||
this.init = init;
|
||||
this.callerClientConfig = callerClientConfig;
|
||||
}
|
||||
async loadCredentials() {
|
||||
const token = await this.loadToken();
|
||||
if (!token) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
|
||||
}
|
||||
const accessToken = token.accessToken;
|
||||
const now = Date.now();
|
||||
const expiryTime = new Date(accessToken.expiresAt).getTime();
|
||||
const timeUntilExpiry = expiryTime - now;
|
||||
if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {
|
||||
return this.refresh(token);
|
||||
}
|
||||
return {
|
||||
accessKeyId: accessToken.accessKeyId,
|
||||
secretAccessKey: accessToken.secretAccessKey,
|
||||
sessionToken: accessToken.sessionToken,
|
||||
accountId: accessToken.accountId,
|
||||
expiration: new Date(accessToken.expiresAt),
|
||||
};
|
||||
}
|
||||
get logger() {
|
||||
return this.init?.logger;
|
||||
}
|
||||
get loginSession() {
|
||||
return this.profileData.login_session;
|
||||
}
|
||||
async refresh(token) {
|
||||
const { SigninClient, CreateOAuth2TokenCommand } = await __webpack_require__.e(/* import() */ 762).then(__webpack_require__.t.bind(__webpack_require__, 9762, 19));
|
||||
const { logger, userAgentAppId } = this.callerClientConfig ?? {};
|
||||
const isH2 = (requestHandler) => {
|
||||
return requestHandler?.metadata?.handlerProtocol === "h2";
|
||||
};
|
||||
const requestHandler = isH2(this.callerClientConfig?.requestHandler)
|
||||
? undefined
|
||||
: this.callerClientConfig?.requestHandler;
|
||||
const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;
|
||||
const client = new SigninClient({
|
||||
credentials: {
|
||||
accessKeyId: "",
|
||||
secretAccessKey: "",
|
||||
},
|
||||
region,
|
||||
requestHandler,
|
||||
logger,
|
||||
userAgentAppId,
|
||||
...this.init?.clientConfig,
|
||||
});
|
||||
this.createDPoPInterceptor(client.middlewareStack);
|
||||
const commandInput = {
|
||||
tokenInput: {
|
||||
clientId: token.clientId,
|
||||
refreshToken: token.refreshToken,
|
||||
grantType: "refresh_token",
|
||||
},
|
||||
};
|
||||
try {
|
||||
const response = await client.send(new CreateOAuth2TokenCommand(commandInput));
|
||||
const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
|
||||
const { refreshToken, expiresIn } = response.tokenOutput ?? {};
|
||||
if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
|
||||
throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", {
|
||||
logger: this.logger,
|
||||
tryNextLink: false,
|
||||
});
|
||||
}
|
||||
const expiresInMs = (expiresIn ?? 900) * 1000;
|
||||
const expiration = new Date(Date.now() + expiresInMs);
|
||||
const updatedToken = {
|
||||
...token,
|
||||
accessToken: {
|
||||
...token.accessToken,
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey,
|
||||
sessionToken: sessionToken,
|
||||
expiresAt: expiration.toISOString(),
|
||||
},
|
||||
refreshToken: refreshToken,
|
||||
};
|
||||
await this.saveToken(updatedToken);
|
||||
const newAccessToken = updatedToken.accessToken;
|
||||
return {
|
||||
accessKeyId: newAccessToken.accessKeyId,
|
||||
secretAccessKey: newAccessToken.secretAccessKey,
|
||||
sessionToken: newAccessToken.sessionToken,
|
||||
accountId: newAccessToken.accountId,
|
||||
expiration,
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
if (error.name === "AccessDeniedException") {
|
||||
const errorType = error.error;
|
||||
let message;
|
||||
switch (errorType) {
|
||||
case "TOKEN_EXPIRED":
|
||||
message = "Your session has expired. Please reauthenticate.";
|
||||
break;
|
||||
case "USER_CREDENTIALS_CHANGED":
|
||||
message =
|
||||
"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";
|
||||
break;
|
||||
case "INSUFFICIENT_PERMISSIONS":
|
||||
message =
|
||||
"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";
|
||||
break;
|
||||
default:
|
||||
message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
|
||||
}
|
||||
}
|
||||
async loadToken() {
|
||||
const tokenFilePath = this.getTokenFilePath();
|
||||
try {
|
||||
let tokenData;
|
||||
try {
|
||||
tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
|
||||
}
|
||||
catch {
|
||||
tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8");
|
||||
}
|
||||
const token = JSON.parse(tokenData);
|
||||
const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]);
|
||||
if (!token.accessToken?.accountId) {
|
||||
missingFields.push("accountId");
|
||||
}
|
||||
if (missingFields.length > 0) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
|
||||
logger: this.logger,
|
||||
tryNextLink: false,
|
||||
});
|
||||
}
|
||||
return token;
|
||||
}
|
||||
catch (error) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
|
||||
logger: this.logger,
|
||||
tryNextLink: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
async saveToken(token) {
|
||||
const tokenFilePath = this.getTokenFilePath();
|
||||
const directory = node_path.dirname(tokenFilePath);
|
||||
try {
|
||||
await node_fs.promises.mkdir(directory, { recursive: true });
|
||||
}
|
||||
catch (error) {
|
||||
}
|
||||
await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
||||
}
|
||||
getTokenFilePath() {
|
||||
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), ".aws", "login", "cache");
|
||||
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
||||
const loginSessionSha256 = node_crypto.createHash("sha256").update(loginSessionBytes).digest("hex");
|
||||
return node_path.join(directory, `${loginSessionSha256}.json`);
|
||||
}
|
||||
derToRawSignature(derSignature) {
|
||||
let offset = 2;
|
||||
if (derSignature[offset] !== 0x02) {
|
||||
throw new Error("Invalid DER signature");
|
||||
}
|
||||
offset++;
|
||||
const rLength = derSignature[offset++];
|
||||
let r = derSignature.subarray(offset, offset + rLength);
|
||||
offset += rLength;
|
||||
if (derSignature[offset] !== 0x02) {
|
||||
throw new Error("Invalid DER signature");
|
||||
}
|
||||
offset++;
|
||||
const sLength = derSignature[offset++];
|
||||
let s = derSignature.subarray(offset, offset + sLength);
|
||||
r = r[0] === 0x00 ? r.subarray(1) : r;
|
||||
s = s[0] === 0x00 ? s.subarray(1) : s;
|
||||
const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);
|
||||
const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);
|
||||
return Buffer.concat([rPadded, sPadded]);
|
||||
}
|
||||
createDPoPInterceptor(middlewareStack) {
|
||||
middlewareStack.add((next) => async (args) => {
|
||||
if (protocolHttp.HttpRequest.isInstance(args.request)) {
|
||||
const request = args.request;
|
||||
const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`;
|
||||
const dpop = await this.generateDpop(request.method, actualEndpoint);
|
||||
request.headers = {
|
||||
...request.headers,
|
||||
DPoP: dpop,
|
||||
};
|
||||
}
|
||||
return next(args);
|
||||
}, {
|
||||
step: "finalizeRequest",
|
||||
name: "dpopInterceptor",
|
||||
override: true,
|
||||
});
|
||||
}
|
||||
async generateDpop(method = "POST", endpoint) {
|
||||
const token = await this.loadToken();
|
||||
try {
|
||||
const privateKey = node_crypto.createPrivateKey({
|
||||
key: token.dpopKey,
|
||||
format: "pem",
|
||||
type: "sec1",
|
||||
});
|
||||
const publicKey = node_crypto.createPublicKey(privateKey);
|
||||
const publicDer = publicKey.export({ format: "der", type: "spki" });
|
||||
let pointStart = -1;
|
||||
for (let i = 0; i < publicDer.length; i++) {
|
||||
if (publicDer[i] === 0x04) {
|
||||
pointStart = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const x = publicDer.slice(pointStart + 1, pointStart + 33);
|
||||
const y = publicDer.slice(pointStart + 33, pointStart + 65);
|
||||
const header = {
|
||||
alg: "ES256",
|
||||
typ: "dpop+jwt",
|
||||
jwk: {
|
||||
kty: "EC",
|
||||
crv: "P-256",
|
||||
x: x.toString("base64url"),
|
||||
y: y.toString("base64url"),
|
||||
},
|
||||
};
|
||||
const payload = {
|
||||
jti: crypto.randomUUID(),
|
||||
htm: method,
|
||||
htu: endpoint,
|
||||
iat: Math.floor(Date.now() / 1000),
|
||||
};
|
||||
const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url");
|
||||
const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url");
|
||||
const message = `${headerB64}.${payloadB64}`;
|
||||
const asn1Signature = node_crypto.sign("sha256", Buffer.from(message), privateKey);
|
||||
const rawSignature = this.derToRawSignature(asn1Signature);
|
||||
const signatureB64 = rawSignature.toString("base64url");
|
||||
return `${message}.${signatureB64}`;
|
||||
}
|
||||
catch (error) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
|
||||
init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init || {});
|
||||
const profileName = sharedIniFileLoader.getProfileName({
|
||||
profile: init?.profile ?? callerClientConfig?.profile,
|
||||
});
|
||||
const profile = profiles[profileName];
|
||||
if (!profile?.login_session) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
|
||||
tryNextLink: true,
|
||||
logger: init?.logger,
|
||||
});
|
||||
}
|
||||
const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
|
||||
const credentials = await fetcher.loadCredentials();
|
||||
return client.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
|
||||
};
|
||||
|
||||
exports.fromLoginCredentials = fromLoginCredentials;
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
|
||||
+103
-108
@@ -397,14 +397,14 @@ var schema = __webpack_require__(6890);
|
||||
var client = __webpack_require__(5152);
|
||||
var regionConfigResolver = __webpack_require__(6463);
|
||||
|
||||
let STSServiceException$1 = class STSServiceException extends smithyClient.ServiceException {
|
||||
class STSServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, STSServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 {
|
||||
class ExpiredTokenException extends STSServiceException {
|
||||
name = "ExpiredTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -415,8 +415,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceExce
|
||||
});
|
||||
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 {
|
||||
}
|
||||
class MalformedPolicyDocumentException extends STSServiceException {
|
||||
name = "MalformedPolicyDocumentException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -427,8 +427,8 @@ let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException
|
||||
});
|
||||
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
||||
}
|
||||
};
|
||||
let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 {
|
||||
}
|
||||
class PackedPolicyTooLargeException extends STSServiceException {
|
||||
name = "PackedPolicyTooLargeException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -439,8 +439,8 @@ let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
||||
}
|
||||
};
|
||||
let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 {
|
||||
}
|
||||
class RegionDisabledException extends STSServiceException {
|
||||
name = "RegionDisabledException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -451,8 +451,8 @@ let RegionDisabledException$1 = class RegionDisabledException extends STSService
|
||||
});
|
||||
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPRejectedClaimException extends STSServiceException {
|
||||
name = "IDPRejectedClaimException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -463,8 +463,8 @@ let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSSer
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
||||
}
|
||||
};
|
||||
let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 {
|
||||
}
|
||||
class InvalidIdentityTokenException extends STSServiceException {
|
||||
name = "InvalidIdentityTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -475,8 +475,8 @@ let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPCommunicationErrorException extends STSServiceException {
|
||||
name = "IDPCommunicationErrorException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -487,7 +487,7 @@ let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException exte
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _A = "Arn";
|
||||
const _AKI = "AccessKeyId";
|
||||
@@ -550,154 +550,129 @@ const _tLT = "tagListType";
|
||||
const n0 = "com.amazonaws.sts";
|
||||
var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
||||
var clientTokenType = [0, n0, _cTT, 8, 0];
|
||||
var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
|
||||
var AssumeRoleRequest = [
|
||||
var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
|
||||
var AssumeRoleRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARR,
|
||||
0,
|
||||
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
||||
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
||||
2,
|
||||
];
|
||||
var AssumeRoleResponse = [
|
||||
var AssumeRoleResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARRs,
|
||||
0,
|
||||
[_C, _ARU, _PPS, _SI],
|
||||
[[() => Credentials, 0], () => AssumedRoleUser, 1, 0],
|
||||
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
|
||||
];
|
||||
var AssumeRoleWithWebIdentityRequest = [
|
||||
var AssumeRoleWithWebIdentityRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIR,
|
||||
0,
|
||||
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
||||
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
||||
3,
|
||||
];
|
||||
var AssumeRoleWithWebIdentityResponse = [
|
||||
var AssumeRoleWithWebIdentityResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIRs,
|
||||
0,
|
||||
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
||||
[[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0],
|
||||
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
|
||||
];
|
||||
var Credentials = [
|
||||
var Credentials$ = [
|
||||
3,
|
||||
n0,
|
||||
_C,
|
||||
0,
|
||||
[_AKI, _SAK, _ST, _E],
|
||||
[0, [() => accessKeySecretType, 0], 0, 4],
|
||||
4,
|
||||
];
|
||||
var ExpiredTokenException = [
|
||||
var ExpiredTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_ETE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`ExpiredTokenException`, 400],
|
||||
},
|
||||
{ [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
|
||||
var IDPCommunicationErrorException = [
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
|
||||
var IDPCommunicationErrorException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPCEE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`IDPCommunicationError`, 400],
|
||||
},
|
||||
{ [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1);
|
||||
var IDPRejectedClaimException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
||||
var IDPRejectedClaimException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPRCE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`IDPRejectedClaim`, 403],
|
||||
},
|
||||
{ [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1);
|
||||
var InvalidIdentityTokenException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
||||
var InvalidIdentityTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IITE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`InvalidIdentityToken`, 400],
|
||||
},
|
||||
{ [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1);
|
||||
var MalformedPolicyDocumentException = [
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
||||
var MalformedPolicyDocumentException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_MPDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`MalformedPolicyDocument`, 400],
|
||||
},
|
||||
{ [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1);
|
||||
var PackedPolicyTooLargeException = [
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
||||
var PackedPolicyTooLargeException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_PPTLE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`PackedPolicyTooLarge`, 400],
|
||||
},
|
||||
{ [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1);
|
||||
var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException = [
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
||||
var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_RDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`RegionDisabledException`, 403],
|
||||
},
|
||||
{ [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1);
|
||||
var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
|
||||
var STSServiceException = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag];
|
||||
var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
|
||||
var AssumeRoleWithWebIdentity = [
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException$, RegionDisabledException);
|
||||
var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
|
||||
var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException$, STSServiceException);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag$];
|
||||
var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
|
||||
var AssumeRoleWithWebIdentity$ = [
|
||||
9,
|
||||
n0,
|
||||
_ARWWI,
|
||||
0,
|
||||
() => AssumeRoleWithWebIdentityRequest,
|
||||
() => AssumeRoleWithWebIdentityResponse,
|
||||
() => AssumeRoleWithWebIdentityRequest$,
|
||||
() => AssumeRoleWithWebIdentityResponse$,
|
||||
];
|
||||
|
||||
class AssumeRoleCommand extends smithyClient.Command
|
||||
@@ -708,7 +683,7 @@ class AssumeRoleCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
||||
.n("STSClient", "AssumeRoleCommand")
|
||||
.sc(AssumeRole)
|
||||
.sc(AssumeRole$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -720,7 +695,7 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
||||
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
||||
.sc(AssumeRoleWithWebIdentity)
|
||||
.sc(AssumeRoleWithWebIdentity$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -744,9 +719,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
||||
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
||||
const region = typeof _region === "function" ? await _region() : _region;
|
||||
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
||||
const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)();
|
||||
let stsDefaultRegion = "";
|
||||
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
|
||||
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
||||
return region ?? parentRegion ?? stsDefaultRegion;
|
||||
return resolvedRegion;
|
||||
};
|
||||
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
||||
let stsClient;
|
||||
@@ -855,17 +831,36 @@ Object.defineProperty(exports, "$Command", ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
}));
|
||||
exports.AssumeRole$ = AssumeRole$;
|
||||
exports.AssumeRoleCommand = AssumeRoleCommand;
|
||||
exports.AssumeRoleRequest$ = AssumeRoleRequest$;
|
||||
exports.AssumeRoleResponse$ = AssumeRoleResponse$;
|
||||
exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
|
||||
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
||||
exports.ExpiredTokenException = ExpiredTokenException$1;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException$1;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException$1;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException$1;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException$1;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException$1;
|
||||
exports.RegionDisabledException = RegionDisabledException$1;
|
||||
exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
|
||||
exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
|
||||
exports.AssumedRoleUser$ = AssumedRoleUser$;
|
||||
exports.Credentials$ = Credentials$;
|
||||
exports.ExpiredTokenException = ExpiredTokenException;
|
||||
exports.ExpiredTokenException$ = ExpiredTokenException$;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
|
||||
exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException;
|
||||
exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
|
||||
exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
|
||||
exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
|
||||
exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
|
||||
exports.PolicyDescriptorType$ = PolicyDescriptorType$;
|
||||
exports.ProvidedContext$ = ProvidedContext$;
|
||||
exports.RegionDisabledException = RegionDisabledException;
|
||||
exports.RegionDisabledException$ = RegionDisabledException$;
|
||||
exports.STS = STS;
|
||||
exports.STSServiceException = STSServiceException$1;
|
||||
exports.STSServiceException = STSServiceException;
|
||||
exports.STSServiceException$ = STSServiceException$;
|
||||
exports.Tag$ = Tag$;
|
||||
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
||||
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
||||
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
||||
@@ -895,14 +890,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(4443);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -991,12 +985,13 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ??
|
||||
new protocols_1.AwsQueryProtocol({
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
}),
|
||||
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
serviceTarget: "AWSSecurityTokenServiceV20110615",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "STS",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -1031,7 +1026,7 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.933.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+166
-248
@@ -14,10 +14,9 @@ const util_middleware_1 = __webpack_require__(6324);
|
||||
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
||||
return {
|
||||
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
||||
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
|
||||
(() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
};
|
||||
};
|
||||
exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
|
||||
@@ -44,22 +43,30 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
||||
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
|
||||
const options = [];
|
||||
switch (authParameters.operation) {
|
||||
case "GetRoleCredentials": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "ListAccountRoles": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "ListAccounts": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "Logout": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "GetRoleCredentials":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
case "ListAccountRoles":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
case "ListAccounts":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
case "Logout":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
default: {
|
||||
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
||||
}
|
||||
@@ -232,14 +239,14 @@ class SSOClient extends smithyClient.Client {
|
||||
}
|
||||
}
|
||||
|
||||
let SSOServiceException$1 = class SSOServiceException extends smithyClient.ServiceException {
|
||||
class SSOServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SSOServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let InvalidRequestException$1 = class InvalidRequestException extends SSOServiceException$1 {
|
||||
class InvalidRequestException extends SSOServiceException {
|
||||
name = "InvalidRequestException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -250,8 +257,8 @@ let InvalidRequestException$1 = class InvalidRequestException extends SSOService
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
||||
}
|
||||
};
|
||||
let ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOServiceException$1 {
|
||||
}
|
||||
class ResourceNotFoundException extends SSOServiceException {
|
||||
name = "ResourceNotFoundException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -262,8 +269,8 @@ let ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOSer
|
||||
});
|
||||
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
||||
}
|
||||
};
|
||||
let TooManyRequestsException$1 = class TooManyRequestsException extends SSOServiceException$1 {
|
||||
}
|
||||
class TooManyRequestsException extends SSOServiceException {
|
||||
name = "TooManyRequestsException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -274,8 +281,8 @@ let TooManyRequestsException$1 = class TooManyRequestsException extends SSOServi
|
||||
});
|
||||
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
||||
}
|
||||
};
|
||||
let UnauthorizedException$1 = class UnauthorizedException extends SSOServiceException$1 {
|
||||
}
|
||||
class UnauthorizedException extends SSOServiceException {
|
||||
name = "UnauthorizedException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -286,7 +293,7 @@ let UnauthorizedException$1 = class UnauthorizedException extends SSOServiceExce
|
||||
});
|
||||
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _AI = "AccountInfo";
|
||||
const _ALT = "AccountListType";
|
||||
@@ -342,213 +349,100 @@ const n0 = "com.amazonaws.sso";
|
||||
var AccessTokenType = [0, n0, _ATT, 8, 0];
|
||||
var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
|
||||
var SessionTokenType = [0, n0, _STT, 8, 0];
|
||||
var AccountInfo = [3, n0, _AI, 0, [_aI, _aN, _eA], [0, 0, 0]];
|
||||
var GetRoleCredentialsRequest = [
|
||||
3,
|
||||
n0,
|
||||
_GRCR,
|
||||
var AccountInfo$ = [3, n0, _AI,
|
||||
0,
|
||||
[_aI, _aN, _eA],
|
||||
[0, 0, 0]
|
||||
];
|
||||
var GetRoleCredentialsRequest$ = [3, n0, _GRCR,
|
||||
0,
|
||||
[_rN, _aI, _aT],
|
||||
[
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _rn,
|
||||
},
|
||||
],
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _ai,
|
||||
},
|
||||
],
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
],
|
||||
[[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3
|
||||
];
|
||||
var GetRoleCredentialsResponse = [3, n0, _GRCRe, 0, [_rC], [[() => RoleCredentials, 0]]];
|
||||
var InvalidRequestException = [
|
||||
-3,
|
||||
n0,
|
||||
_IRE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
var GetRoleCredentialsResponse$ = [3, n0, _GRCRe,
|
||||
0,
|
||||
[_rC],
|
||||
[[() => RoleCredentials$, 0]]
|
||||
];
|
||||
var InvalidRequestException$ = [-3, n0, _IRE,
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
|
||||
var ListAccountRolesRequest = [
|
||||
3,
|
||||
n0,
|
||||
_LARR,
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
|
||||
var ListAccountRolesRequest$ = [3, n0, _LARR,
|
||||
0,
|
||||
[_nT, _mR, _aT, _aI],
|
||||
[
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _nt,
|
||||
},
|
||||
],
|
||||
[
|
||||
1,
|
||||
{
|
||||
[_hQ]: _mr,
|
||||
},
|
||||
],
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _ai,
|
||||
},
|
||||
],
|
||||
],
|
||||
[_aT, _aI, _nT, _mR],
|
||||
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _ai }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 2
|
||||
];
|
||||
var ListAccountRolesResponse = [3, n0, _LARRi, 0, [_nT, _rL], [0, () => RoleListType]];
|
||||
var ListAccountsRequest = [
|
||||
3,
|
||||
n0,
|
||||
_LAR,
|
||||
var ListAccountRolesResponse$ = [3, n0, _LARRi,
|
||||
0,
|
||||
[_nT, _mR, _aT],
|
||||
[
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _nt,
|
||||
},
|
||||
],
|
||||
[
|
||||
1,
|
||||
{
|
||||
[_hQ]: _mr,
|
||||
},
|
||||
],
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
],
|
||||
[_nT, _rL],
|
||||
[0, () => RoleListType]
|
||||
];
|
||||
var ListAccountsResponse = [3, n0, _LARi, 0, [_nT, _aL], [0, () => AccountListType]];
|
||||
var LogoutRequest = [
|
||||
3,
|
||||
n0,
|
||||
_LR,
|
||||
var ListAccountsRequest$ = [3, n0, _LAR,
|
||||
0,
|
||||
[_aT, _nT, _mR],
|
||||
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 1
|
||||
];
|
||||
var ListAccountsResponse$ = [3, n0, _LARi,
|
||||
0,
|
||||
[_nT, _aL],
|
||||
[0, () => AccountListType]
|
||||
];
|
||||
var LogoutRequest$ = [3, n0, _LR,
|
||||
0,
|
||||
[_aT],
|
||||
[
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
],
|
||||
[[() => AccessTokenType, { [_hH]: _xasbt }]], 1
|
||||
];
|
||||
var ResourceNotFoundException = [
|
||||
-3,
|
||||
n0,
|
||||
_RNFE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 404,
|
||||
},
|
||||
var ResourceNotFoundException$ = [-3, n0, _RNFE,
|
||||
{ [_e]: _c, [_hE]: 404 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
|
||||
var RoleCredentials = [
|
||||
3,
|
||||
n0,
|
||||
_RC,
|
||||
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
||||
var RoleCredentials$ = [3, n0, _RC,
|
||||
0,
|
||||
[_aKI, _sAK, _sT, _ex],
|
||||
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
|
||||
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
|
||||
];
|
||||
var RoleInfo = [3, n0, _RI, 0, [_rN, _aI], [0, 0]];
|
||||
var TooManyRequestsException = [
|
||||
-3,
|
||||
n0,
|
||||
_TMRE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 429,
|
||||
},
|
||||
var RoleInfo$ = [3, n0, _RI,
|
||||
0,
|
||||
[_rN, _aI],
|
||||
[0, 0]
|
||||
];
|
||||
var TooManyRequestsException$ = [-3, n0, _TMRE,
|
||||
{ [_e]: _c, [_hE]: 429 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(TooManyRequestsException, TooManyRequestsException$1);
|
||||
var UnauthorizedException = [
|
||||
-3,
|
||||
n0,
|
||||
_UE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 401,
|
||||
},
|
||||
schema.TypeRegistry.for(n0).registerError(TooManyRequestsException$, TooManyRequestsException);
|
||||
var UnauthorizedException$ = [-3, n0, _UE,
|
||||
{ [_e]: _c, [_hE]: 401 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedException, UnauthorizedException$1);
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedException$, UnauthorizedException);
|
||||
var __Unit = "unit";
|
||||
var SSOServiceException = [-3, _s, "SSOServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(SSOServiceException, SSOServiceException$1);
|
||||
var AccountListType = [1, n0, _ALT, 0, () => AccountInfo];
|
||||
var RoleListType = [1, n0, _RLT, 0, () => RoleInfo];
|
||||
var GetRoleCredentials = [
|
||||
9,
|
||||
n0,
|
||||
_GRC,
|
||||
{
|
||||
[_h]: ["GET", "/federation/credentials", 200],
|
||||
},
|
||||
() => GetRoleCredentialsRequest,
|
||||
() => GetRoleCredentialsResponse,
|
||||
var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(SSOServiceException$, SSOServiceException);
|
||||
var AccountListType = [1, n0, _ALT,
|
||||
0, () => AccountInfo$
|
||||
];
|
||||
var ListAccountRoles = [
|
||||
9,
|
||||
n0,
|
||||
_LARis,
|
||||
{
|
||||
[_h]: ["GET", "/assignment/roles", 200],
|
||||
},
|
||||
() => ListAccountRolesRequest,
|
||||
() => ListAccountRolesResponse,
|
||||
var RoleListType = [1, n0, _RLT,
|
||||
0, () => RoleInfo$
|
||||
];
|
||||
var ListAccounts = [
|
||||
9,
|
||||
n0,
|
||||
_LA,
|
||||
{
|
||||
[_h]: ["GET", "/assignment/accounts", 200],
|
||||
},
|
||||
() => ListAccountsRequest,
|
||||
() => ListAccountsResponse,
|
||||
var GetRoleCredentials$ = [9, n0, _GRC,
|
||||
{ [_h]: ["GET", "/federation/credentials", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$
|
||||
];
|
||||
var Logout = [
|
||||
9,
|
||||
n0,
|
||||
_L,
|
||||
{
|
||||
[_h]: ["POST", "/logout", 200],
|
||||
},
|
||||
() => LogoutRequest,
|
||||
() => __Unit,
|
||||
var ListAccountRoles$ = [9, n0, _LARis,
|
||||
{ [_h]: ["GET", "/assignment/roles", 200] }, () => ListAccountRolesRequest$, () => ListAccountRolesResponse$
|
||||
];
|
||||
var ListAccounts$ = [9, n0, _LA,
|
||||
{ [_h]: ["GET", "/assignment/accounts", 200] }, () => ListAccountsRequest$, () => ListAccountsResponse$
|
||||
];
|
||||
var Logout$ = [9, n0, _L,
|
||||
{ [_h]: ["POST", "/logout", 200] }, () => LogoutRequest$, () => __Unit
|
||||
];
|
||||
|
||||
class GetRoleCredentialsCommand extends smithyClient.Command
|
||||
@@ -559,7 +453,7 @@ class GetRoleCredentialsCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "GetRoleCredentials", {})
|
||||
.n("SSOClient", "GetRoleCredentialsCommand")
|
||||
.sc(GetRoleCredentials)
|
||||
.sc(GetRoleCredentials$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -571,7 +465,7 @@ class ListAccountRolesCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "ListAccountRoles", {})
|
||||
.n("SSOClient", "ListAccountRolesCommand")
|
||||
.sc(ListAccountRoles)
|
||||
.sc(ListAccountRoles$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -583,7 +477,7 @@ class ListAccountsCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "ListAccounts", {})
|
||||
.n("SSOClient", "ListAccountsCommand")
|
||||
.sc(ListAccounts)
|
||||
.sc(ListAccounts$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -595,7 +489,7 @@ class LogoutCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "Logout", {})
|
||||
.n("SSOClient", "LogoutCommand")
|
||||
.sc(Logout)
|
||||
.sc(Logout$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -621,17 +515,36 @@ Object.defineProperty(exports, "__Client", ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Client; }
|
||||
}));
|
||||
exports.AccountInfo$ = AccountInfo$;
|
||||
exports.GetRoleCredentials$ = GetRoleCredentials$;
|
||||
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
|
||||
exports.InvalidRequestException = InvalidRequestException$1;
|
||||
exports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;
|
||||
exports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;
|
||||
exports.InvalidRequestException = InvalidRequestException;
|
||||
exports.InvalidRequestException$ = InvalidRequestException$;
|
||||
exports.ListAccountRoles$ = ListAccountRoles$;
|
||||
exports.ListAccountRolesCommand = ListAccountRolesCommand;
|
||||
exports.ListAccountRolesRequest$ = ListAccountRolesRequest$;
|
||||
exports.ListAccountRolesResponse$ = ListAccountRolesResponse$;
|
||||
exports.ListAccounts$ = ListAccounts$;
|
||||
exports.ListAccountsCommand = ListAccountsCommand;
|
||||
exports.ListAccountsRequest$ = ListAccountsRequest$;
|
||||
exports.ListAccountsResponse$ = ListAccountsResponse$;
|
||||
exports.Logout$ = Logout$;
|
||||
exports.LogoutCommand = LogoutCommand;
|
||||
exports.ResourceNotFoundException = ResourceNotFoundException$1;
|
||||
exports.LogoutRequest$ = LogoutRequest$;
|
||||
exports.ResourceNotFoundException = ResourceNotFoundException;
|
||||
exports.ResourceNotFoundException$ = ResourceNotFoundException$;
|
||||
exports.RoleCredentials$ = RoleCredentials$;
|
||||
exports.RoleInfo$ = RoleInfo$;
|
||||
exports.SSO = SSO;
|
||||
exports.SSOClient = SSOClient;
|
||||
exports.SSOServiceException = SSOServiceException$1;
|
||||
exports.TooManyRequestsException = TooManyRequestsException$1;
|
||||
exports.UnauthorizedException = UnauthorizedException$1;
|
||||
exports.SSOServiceException = SSOServiceException;
|
||||
exports.SSOServiceException$ = SSOServiceException$;
|
||||
exports.TooManyRequestsException = TooManyRequestsException;
|
||||
exports.TooManyRequestsException$ = TooManyRequestsException$;
|
||||
exports.UnauthorizedException = UnauthorizedException;
|
||||
exports.UnauthorizedException$ = UnauthorizedException$;
|
||||
exports.paginateListAccountRoles = paginateListAccountRoles;
|
||||
exports.paginateListAccounts = paginateListAccounts;
|
||||
|
||||
@@ -653,14 +566,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(8073);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -676,11 +588,9 @@ const getRuntimeConfig = (config) => {
|
||||
defaultsMode,
|
||||
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
||||
region: config?.region ??
|
||||
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
||||
retryMode: config?.retryMode ??
|
||||
(0, node_config_provider_1.loadConfig)({
|
||||
@@ -736,7 +646,12 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.sso" }),
|
||||
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.sso",
|
||||
version: "2019-06-10",
|
||||
serviceTarget: "SWBPortalService",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "SSO",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -927,7 +842,15 @@ const resolveAwsSdkSigV4Config = (config) => {
|
||||
});
|
||||
const boundProvider = bindCallerConfig(config, memoizedProvider);
|
||||
if (isUserSupplied && !boundProvider.attributed) {
|
||||
resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
|
||||
const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
|
||||
resolvedCredentials = async (options) => {
|
||||
const creds = await boundProvider(options);
|
||||
const attributedCreds = creds;
|
||||
if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
|
||||
return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
|
||||
}
|
||||
return attributedCreds;
|
||||
};
|
||||
resolvedCredentials.memoized = boundProvider.memoized;
|
||||
resolvedCredentials.configBound = boundProvider.configBound;
|
||||
resolvedCredentials.attributed = true;
|
||||
@@ -1073,7 +996,7 @@ const isSsoProfile = (arg) => arg &&
|
||||
typeof arg.sso_role_name === "string");
|
||||
|
||||
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
||||
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
|
||||
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
|
||||
let token;
|
||||
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
|
||||
if (ssoSession) {
|
||||
@@ -1117,9 +1040,9 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
|
||||
const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(6553); });
|
||||
const sso = ssoClient ||
|
||||
new SSOClient(Object.assign({}, clientConfig ?? {}, {
|
||||
logger: clientConfig?.logger ?? parentClientConfig?.logger,
|
||||
logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
|
||||
region: clientConfig?.region ?? ssoRegion,
|
||||
userAgentAppId: clientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
|
||||
userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
|
||||
}));
|
||||
let ssoResp;
|
||||
try {
|
||||
@@ -1215,6 +1138,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
ssoClient: ssoClient,
|
||||
clientConfig: init.clientConfig,
|
||||
parentClientConfig: init.parentClientConfig,
|
||||
callerClientConfig: init.callerClientConfig,
|
||||
profile: profileName,
|
||||
filepath: init.filepath,
|
||||
configFilepath: init.configFilepath,
|
||||
@@ -1236,6 +1160,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
ssoClient,
|
||||
clientConfig: init.clientConfig,
|
||||
parentClientConfig: init.parentClientConfig,
|
||||
callerClientConfig: init.callerClientConfig,
|
||||
profile: profileName,
|
||||
filepath: init.filepath,
|
||||
configFilepath: init.configFilepath,
|
||||
@@ -1301,9 +1226,9 @@ const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
|
||||
const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
|
||||
const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
|
||||
|
||||
const getSsoOidcClient = async (ssoRegion, init = {}) => {
|
||||
const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
||||
const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19));
|
||||
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];
|
||||
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
|
||||
const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
|
||||
region: ssoRegion ?? init.clientConfig?.region,
|
||||
logger: coalesce("logger"),
|
||||
@@ -1312,9 +1237,9 @@ const getSsoOidcClient = async (ssoRegion, init = {}) => {
|
||||
return ssoOidcClient;
|
||||
};
|
||||
|
||||
const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
|
||||
const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
|
||||
const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19));
|
||||
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
|
||||
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
|
||||
return ssoOidcClient.send(new CreateTokenCommand({
|
||||
clientId: ssoToken.clientId,
|
||||
clientSecret: ssoToken.clientSecret,
|
||||
@@ -1343,14 +1268,7 @@ const writeSSOTokenToFile = (id, ssoToken) => {
|
||||
};
|
||||
|
||||
const lastRefreshAttemptTime = new Date(0);
|
||||
const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
const init = {
|
||||
..._init,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
..._init.parentClientConfig,
|
||||
},
|
||||
};
|
||||
const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
|
||||
const profileName = sharedIniFileLoader.getProfileName({
|
||||
@@ -1399,7 +1317,7 @@ const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
||||
try {
|
||||
lastRefreshAttemptTime.setTime(Date.now());
|
||||
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
|
||||
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
||||
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
||||
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
||||
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
|
||||
@@ -1447,7 +1365,7 @@ exports.nodeProvider = nodeProvider;
|
||||
/***/ 5188:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.933.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.975.0","scripts":{"build":"concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8","concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"engines":{"node":">=20.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+103
-108
@@ -261,14 +261,14 @@ var schema = __webpack_require__(6890);
|
||||
var client = __webpack_require__(5152);
|
||||
var regionConfigResolver = __webpack_require__(6463);
|
||||
|
||||
let STSServiceException$1 = class STSServiceException extends smithyClient.ServiceException {
|
||||
class STSServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, STSServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 {
|
||||
class ExpiredTokenException extends STSServiceException {
|
||||
name = "ExpiredTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -279,8 +279,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceExce
|
||||
});
|
||||
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 {
|
||||
}
|
||||
class MalformedPolicyDocumentException extends STSServiceException {
|
||||
name = "MalformedPolicyDocumentException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -291,8 +291,8 @@ let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException
|
||||
});
|
||||
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
||||
}
|
||||
};
|
||||
let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 {
|
||||
}
|
||||
class PackedPolicyTooLargeException extends STSServiceException {
|
||||
name = "PackedPolicyTooLargeException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -303,8 +303,8 @@ let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
||||
}
|
||||
};
|
||||
let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 {
|
||||
}
|
||||
class RegionDisabledException extends STSServiceException {
|
||||
name = "RegionDisabledException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -315,8 +315,8 @@ let RegionDisabledException$1 = class RegionDisabledException extends STSService
|
||||
});
|
||||
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPRejectedClaimException extends STSServiceException {
|
||||
name = "IDPRejectedClaimException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -327,8 +327,8 @@ let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSSer
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
||||
}
|
||||
};
|
||||
let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 {
|
||||
}
|
||||
class InvalidIdentityTokenException extends STSServiceException {
|
||||
name = "InvalidIdentityTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -339,8 +339,8 @@ let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPCommunicationErrorException extends STSServiceException {
|
||||
name = "IDPCommunicationErrorException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -351,7 +351,7 @@ let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException exte
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _A = "Arn";
|
||||
const _AKI = "AccessKeyId";
|
||||
@@ -414,154 +414,129 @@ const _tLT = "tagListType";
|
||||
const n0 = "com.amazonaws.sts";
|
||||
var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
||||
var clientTokenType = [0, n0, _cTT, 8, 0];
|
||||
var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
|
||||
var AssumeRoleRequest = [
|
||||
var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
|
||||
var AssumeRoleRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARR,
|
||||
0,
|
||||
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
||||
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
||||
2,
|
||||
];
|
||||
var AssumeRoleResponse = [
|
||||
var AssumeRoleResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARRs,
|
||||
0,
|
||||
[_C, _ARU, _PPS, _SI],
|
||||
[[() => Credentials, 0], () => AssumedRoleUser, 1, 0],
|
||||
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
|
||||
];
|
||||
var AssumeRoleWithWebIdentityRequest = [
|
||||
var AssumeRoleWithWebIdentityRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIR,
|
||||
0,
|
||||
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
||||
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
||||
3,
|
||||
];
|
||||
var AssumeRoleWithWebIdentityResponse = [
|
||||
var AssumeRoleWithWebIdentityResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIRs,
|
||||
0,
|
||||
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
||||
[[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0],
|
||||
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
|
||||
];
|
||||
var Credentials = [
|
||||
var Credentials$ = [
|
||||
3,
|
||||
n0,
|
||||
_C,
|
||||
0,
|
||||
[_AKI, _SAK, _ST, _E],
|
||||
[0, [() => accessKeySecretType, 0], 0, 4],
|
||||
4,
|
||||
];
|
||||
var ExpiredTokenException = [
|
||||
var ExpiredTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_ETE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`ExpiredTokenException`, 400],
|
||||
},
|
||||
{ [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
|
||||
var IDPCommunicationErrorException = [
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
|
||||
var IDPCommunicationErrorException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPCEE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`IDPCommunicationError`, 400],
|
||||
},
|
||||
{ [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1);
|
||||
var IDPRejectedClaimException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
||||
var IDPRejectedClaimException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPRCE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`IDPRejectedClaim`, 403],
|
||||
},
|
||||
{ [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1);
|
||||
var InvalidIdentityTokenException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
||||
var InvalidIdentityTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IITE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`InvalidIdentityToken`, 400],
|
||||
},
|
||||
{ [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1);
|
||||
var MalformedPolicyDocumentException = [
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
||||
var MalformedPolicyDocumentException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_MPDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`MalformedPolicyDocument`, 400],
|
||||
},
|
||||
{ [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1);
|
||||
var PackedPolicyTooLargeException = [
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
||||
var PackedPolicyTooLargeException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_PPTLE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`PackedPolicyTooLarge`, 400],
|
||||
},
|
||||
{ [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1);
|
||||
var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException = [
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
||||
var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_RDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`RegionDisabledException`, 403],
|
||||
},
|
||||
{ [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1);
|
||||
var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
|
||||
var STSServiceException = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag];
|
||||
var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
|
||||
var AssumeRoleWithWebIdentity = [
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException$, RegionDisabledException);
|
||||
var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
|
||||
var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException$, STSServiceException);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag$];
|
||||
var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
|
||||
var AssumeRoleWithWebIdentity$ = [
|
||||
9,
|
||||
n0,
|
||||
_ARWWI,
|
||||
0,
|
||||
() => AssumeRoleWithWebIdentityRequest,
|
||||
() => AssumeRoleWithWebIdentityResponse,
|
||||
() => AssumeRoleWithWebIdentityRequest$,
|
||||
() => AssumeRoleWithWebIdentityResponse$,
|
||||
];
|
||||
|
||||
class AssumeRoleCommand extends smithyClient.Command
|
||||
@@ -572,7 +547,7 @@ class AssumeRoleCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
||||
.n("STSClient", "AssumeRoleCommand")
|
||||
.sc(AssumeRole)
|
||||
.sc(AssumeRole$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -584,7 +559,7 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
||||
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
||||
.sc(AssumeRoleWithWebIdentity)
|
||||
.sc(AssumeRoleWithWebIdentity$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -608,9 +583,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
||||
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
||||
const region = typeof _region === "function" ? await _region() : _region;
|
||||
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
||||
const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)();
|
||||
let stsDefaultRegion = "";
|
||||
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
|
||||
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
||||
return region ?? parentRegion ?? stsDefaultRegion;
|
||||
return resolvedRegion;
|
||||
};
|
||||
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
||||
let stsClient;
|
||||
@@ -719,17 +695,36 @@ Object.defineProperty(exports, "$Command", ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
}));
|
||||
exports.AssumeRole$ = AssumeRole$;
|
||||
exports.AssumeRoleCommand = AssumeRoleCommand;
|
||||
exports.AssumeRoleRequest$ = AssumeRoleRequest$;
|
||||
exports.AssumeRoleResponse$ = AssumeRoleResponse$;
|
||||
exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
|
||||
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
||||
exports.ExpiredTokenException = ExpiredTokenException$1;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException$1;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException$1;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException$1;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException$1;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException$1;
|
||||
exports.RegionDisabledException = RegionDisabledException$1;
|
||||
exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
|
||||
exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
|
||||
exports.AssumedRoleUser$ = AssumedRoleUser$;
|
||||
exports.Credentials$ = Credentials$;
|
||||
exports.ExpiredTokenException = ExpiredTokenException;
|
||||
exports.ExpiredTokenException$ = ExpiredTokenException$;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
|
||||
exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException;
|
||||
exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
|
||||
exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
|
||||
exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
|
||||
exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
|
||||
exports.PolicyDescriptorType$ = PolicyDescriptorType$;
|
||||
exports.ProvidedContext$ = ProvidedContext$;
|
||||
exports.RegionDisabledException = RegionDisabledException;
|
||||
exports.RegionDisabledException$ = RegionDisabledException$;
|
||||
exports.STS = STS;
|
||||
exports.STSServiceException = STSServiceException$1;
|
||||
exports.STSServiceException = STSServiceException;
|
||||
exports.STSServiceException$ = STSServiceException$;
|
||||
exports.Tag$ = Tag$;
|
||||
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
||||
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
||||
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
||||
@@ -759,14 +754,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(4443);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -855,12 +849,13 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ??
|
||||
new protocols_1.AwsQueryProtocol({
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
}),
|
||||
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
serviceTarget: "AWSSecurityTokenServiceV20110615",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "STS",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -895,7 +890,7 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.933.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+108
-164
@@ -221,17 +221,14 @@ class SSOOIDCClient extends smithyClient.Client {
|
||||
}
|
||||
}
|
||||
|
||||
let SSOOIDCServiceException$1 = class SSOOIDCServiceException extends smithyClient.ServiceException {
|
||||
class SSOOIDCServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const AccessDeniedExceptionReason = {
|
||||
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
|
||||
};
|
||||
let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCServiceException$1 {
|
||||
class AccessDeniedException extends SSOOIDCServiceException {
|
||||
name = "AccessDeniedException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -248,8 +245,8 @@ let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCService
|
||||
this.reason = opts.reason;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let AuthorizationPendingException$1 = class AuthorizationPendingException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class AuthorizationPendingException extends SSOOIDCServiceException {
|
||||
name = "AuthorizationPendingException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -264,8 +261,8 @@ let AuthorizationPendingException$1 = class AuthorizationPendingException extend
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class ExpiredTokenException extends SSOOIDCServiceException {
|
||||
name = "ExpiredTokenException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -280,8 +277,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCService
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InternalServerException$1 = class InternalServerException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InternalServerException extends SSOOIDCServiceException {
|
||||
name = "InternalServerException";
|
||||
$fault = "server";
|
||||
error;
|
||||
@@ -296,8 +293,8 @@ let InternalServerException$1 = class InternalServerException extends SSOOIDCSer
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidClientException extends SSOOIDCServiceException {
|
||||
name = "InvalidClientException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -312,8 +309,8 @@ let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServi
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidGrantException extends SSOOIDCServiceException {
|
||||
name = "InvalidGrantException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -328,14 +325,8 @@ let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCService
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
const InvalidRequestExceptionReason = {
|
||||
KMS_DISABLED_KEY: "KMS_DisabledException",
|
||||
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
|
||||
KMS_INVALID_STATE: "KMS_InvalidStateException",
|
||||
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
|
||||
};
|
||||
let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidRequestException extends SSOOIDCServiceException {
|
||||
name = "InvalidRequestException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -352,8 +343,8 @@ let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCSer
|
||||
this.reason = opts.reason;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class InvalidScopeException extends SSOOIDCServiceException {
|
||||
name = "InvalidScopeException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -368,8 +359,8 @@ let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCService
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class SlowDownException extends SSOOIDCServiceException {
|
||||
name = "SlowDownException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -384,8 +375,8 @@ let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceExceptio
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let UnauthorizedClientException$1 = class UnauthorizedClientException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class UnauthorizedClientException extends SSOOIDCServiceException {
|
||||
name = "UnauthorizedClientException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -400,8 +391,8 @@ let UnauthorizedClientException$1 = class UnauthorizedClientException extends SS
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extends SSOOIDCServiceException$1 {
|
||||
}
|
||||
class UnsupportedGrantTypeException extends SSOOIDCServiceException {
|
||||
name = "UnsupportedGrantTypeException";
|
||||
$fault = "client";
|
||||
error;
|
||||
@@ -416,7 +407,7 @@ let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extend
|
||||
this.error = opts.error;
|
||||
this.error_description = opts.error_description;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _ADE = "AccessDeniedException";
|
||||
const _APE = "AuthorizationPendingException";
|
||||
@@ -464,39 +455,34 @@ var ClientSecret = [0, n0, _CS, 8, 0];
|
||||
var CodeVerifier = [0, n0, _CV, 8, 0];
|
||||
var IdToken = [0, n0, _IT, 8, 0];
|
||||
var RefreshToken = [0, n0, _RT, 8, 0];
|
||||
var AccessDeniedException = [
|
||||
var AccessDeniedException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_ADE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _r, _ed],
|
||||
[0, 0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
|
||||
var AuthorizationPendingException = [
|
||||
schema.TypeRegistry.for(n0).registerError(AccessDeniedException$, AccessDeniedException);
|
||||
var AuthorizationPendingException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_APE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(AuthorizationPendingException, AuthorizationPendingException$1);
|
||||
var CreateTokenRequest = [
|
||||
schema.TypeRegistry.for(n0).registerError(AuthorizationPendingException$, AuthorizationPendingException);
|
||||
var CreateTokenRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_CTR,
|
||||
0,
|
||||
[_cI, _cS, _gT, _dC, _co, _rT, _s, _rU, _cV],
|
||||
[0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],
|
||||
3,
|
||||
];
|
||||
var CreateTokenResponse = [
|
||||
var CreateTokenResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_CTRr,
|
||||
@@ -504,125 +490,54 @@ var CreateTokenResponse = [
|
||||
[_aT, _tT, _eI, _rT, _iT],
|
||||
[[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],
|
||||
];
|
||||
var ExpiredTokenException = [
|
||||
-3,
|
||||
n0,
|
||||
_ETE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
|
||||
var InternalServerException = [
|
||||
-3,
|
||||
n0,
|
||||
_ISE,
|
||||
{
|
||||
[_e]: _se,
|
||||
[_hE]: 500,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1);
|
||||
var InvalidClientException = [
|
||||
-3,
|
||||
n0,
|
||||
_ICE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 401,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidClientException, InvalidClientException$1);
|
||||
var InvalidGrantException = [
|
||||
-3,
|
||||
n0,
|
||||
_IGE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidGrantException, InvalidGrantException$1);
|
||||
var InvalidRequestException = [
|
||||
var ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
|
||||
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InternalServerException$, InternalServerException);
|
||||
var InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidClientException$, InvalidClientException);
|
||||
var InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidGrantException$, InvalidGrantException);
|
||||
var InvalidRequestException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IRE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _r, _ed],
|
||||
[0, 0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
|
||||
var InvalidScopeException = [
|
||||
-3,
|
||||
n0,
|
||||
_ISEn,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidScopeException, InvalidScopeException$1);
|
||||
var SlowDownException = [
|
||||
-3,
|
||||
n0,
|
||||
_SDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(SlowDownException, SlowDownException$1);
|
||||
var UnauthorizedClientException = [
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
|
||||
var InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidScopeException$, InvalidScopeException);
|
||||
var SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
|
||||
schema.TypeRegistry.for(n0).registerError(SlowDownException$, SlowDownException);
|
||||
var UnauthorizedClientException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_UCE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedClientException, UnauthorizedClientException$1);
|
||||
var UnsupportedGrantTypeException = [
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedClientException$, UnauthorizedClientException);
|
||||
var UnsupportedGrantTypeException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_UGTE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_e, _ed],
|
||||
[0, 0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(UnsupportedGrantTypeException, UnsupportedGrantTypeException$1);
|
||||
var SSOOIDCServiceException = [-3, _sm, "SSOOIDCServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_sm).registerError(SSOOIDCServiceException, SSOOIDCServiceException$1);
|
||||
var CreateToken = [
|
||||
schema.TypeRegistry.for(n0).registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);
|
||||
var SSOOIDCServiceException$ = [-3, _sm, "SSOOIDCServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_sm).registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
|
||||
var CreateToken$ = [
|
||||
9,
|
||||
n0,
|
||||
_CT,
|
||||
{
|
||||
[_h]: ["POST", "/token", 200],
|
||||
},
|
||||
() => CreateTokenRequest,
|
||||
() => CreateTokenResponse,
|
||||
{ [_h]: ["POST", "/token", 200] },
|
||||
() => CreateTokenRequest$,
|
||||
() => CreateTokenResponse$,
|
||||
];
|
||||
|
||||
class CreateTokenCommand extends smithyClient.Command
|
||||
@@ -633,7 +548,7 @@ class CreateTokenCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSSOOIDCService", "CreateToken", {})
|
||||
.n("SSOOIDCClient", "CreateTokenCommand")
|
||||
.sc(CreateToken)
|
||||
.sc(CreateToken$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -644,6 +559,16 @@ class SSOOIDC extends SSOOIDCClient {
|
||||
}
|
||||
smithyClient.createAggregatedClient(commands, SSOOIDC);
|
||||
|
||||
const AccessDeniedExceptionReason = {
|
||||
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
|
||||
};
|
||||
const InvalidRequestExceptionReason = {
|
||||
KMS_DISABLED_KEY: "KMS_DisabledException",
|
||||
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
|
||||
KMS_INVALID_STATE: "KMS_InvalidStateException",
|
||||
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
|
||||
};
|
||||
|
||||
__webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
@@ -652,23 +577,38 @@ __webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Client; }
|
||||
});
|
||||
__webpack_unused_export__ = AccessDeniedException$1;
|
||||
__webpack_unused_export__ = AccessDeniedException;
|
||||
__webpack_unused_export__ = AccessDeniedException$;
|
||||
__webpack_unused_export__ = AccessDeniedExceptionReason;
|
||||
__webpack_unused_export__ = AuthorizationPendingException$1;
|
||||
__webpack_unused_export__ = AuthorizationPendingException;
|
||||
__webpack_unused_export__ = AuthorizationPendingException$;
|
||||
__webpack_unused_export__ = CreateToken$;
|
||||
exports.CreateTokenCommand = CreateTokenCommand;
|
||||
__webpack_unused_export__ = ExpiredTokenException$1;
|
||||
__webpack_unused_export__ = InternalServerException$1;
|
||||
__webpack_unused_export__ = InvalidClientException$1;
|
||||
__webpack_unused_export__ = InvalidGrantException$1;
|
||||
__webpack_unused_export__ = InvalidRequestException$1;
|
||||
__webpack_unused_export__ = CreateTokenRequest$;
|
||||
__webpack_unused_export__ = CreateTokenResponse$;
|
||||
__webpack_unused_export__ = ExpiredTokenException;
|
||||
__webpack_unused_export__ = ExpiredTokenException$;
|
||||
__webpack_unused_export__ = InternalServerException;
|
||||
__webpack_unused_export__ = InternalServerException$;
|
||||
__webpack_unused_export__ = InvalidClientException;
|
||||
__webpack_unused_export__ = InvalidClientException$;
|
||||
__webpack_unused_export__ = InvalidGrantException;
|
||||
__webpack_unused_export__ = InvalidGrantException$;
|
||||
__webpack_unused_export__ = InvalidRequestException;
|
||||
__webpack_unused_export__ = InvalidRequestException$;
|
||||
__webpack_unused_export__ = InvalidRequestExceptionReason;
|
||||
__webpack_unused_export__ = InvalidScopeException$1;
|
||||
__webpack_unused_export__ = InvalidScopeException;
|
||||
__webpack_unused_export__ = InvalidScopeException$;
|
||||
__webpack_unused_export__ = SSOOIDC;
|
||||
exports.SSOOIDCClient = SSOOIDCClient;
|
||||
__webpack_unused_export__ = SSOOIDCServiceException$1;
|
||||
__webpack_unused_export__ = SlowDownException$1;
|
||||
__webpack_unused_export__ = UnauthorizedClientException$1;
|
||||
__webpack_unused_export__ = UnsupportedGrantTypeException$1;
|
||||
__webpack_unused_export__ = SSOOIDCServiceException;
|
||||
__webpack_unused_export__ = SSOOIDCServiceException$;
|
||||
__webpack_unused_export__ = SlowDownException;
|
||||
__webpack_unused_export__ = SlowDownException$;
|
||||
__webpack_unused_export__ = UnauthorizedClientException;
|
||||
__webpack_unused_export__ = UnauthorizedClientException$;
|
||||
__webpack_unused_export__ = UnsupportedGrantTypeException;
|
||||
__webpack_unused_export__ = UnsupportedGrantTypeException$;
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -688,14 +628,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(1546);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -771,7 +710,12 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.ssooidc" }),
|
||||
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.ssooidc",
|
||||
version: "2019-06-10",
|
||||
serviceTarget: "AWSSSOOIDCService",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "SSO OIDC",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -786,7 +730,7 @@ exports.getRuntimeConfig = getRuntimeConfig;
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.933.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+5
-1
@@ -134,6 +134,11 @@ class EventStreamSerde {
|
||||
[unionMember]: out,
|
||||
};
|
||||
}
|
||||
if (body.byteLength === 0) {
|
||||
return {
|
||||
[unionMember]: {},
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
[unionMember]: await this.deserializer.read(eventStreamSchema, body),
|
||||
@@ -195,7 +200,6 @@ class EventStreamSerde {
|
||||
const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
|
||||
if (eventPayload) {
|
||||
explicitPayloadMember = memberName;
|
||||
break;
|
||||
}
|
||||
else if (eventHeader) {
|
||||
const value = event[unionMember][memberName];
|
||||
|
||||
+587
@@ -0,0 +1,587 @@
|
||||
"use strict";
|
||||
exports.id = 762;
|
||||
exports.ids = [762];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 7709:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.resolveHttpAuthSchemeConfig = exports.defaultSigninHttpAuthSchemeProvider = exports.defaultSigninHttpAuthSchemeParametersProvider = void 0;
|
||||
const core_1 = __webpack_require__(8704);
|
||||
const util_middleware_1 = __webpack_require__(6324);
|
||||
const defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
||||
return {
|
||||
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
||||
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
|
||||
(() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
};
|
||||
};
|
||||
exports.defaultSigninHttpAuthSchemeParametersProvider = defaultSigninHttpAuthSchemeParametersProvider;
|
||||
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
||||
return {
|
||||
schemeId: "aws.auth#sigv4",
|
||||
signingProperties: {
|
||||
name: "signin",
|
||||
region: authParameters.region,
|
||||
},
|
||||
propertiesExtractor: (config, context) => ({
|
||||
signingProperties: {
|
||||
config,
|
||||
context,
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
||||
return {
|
||||
schemeId: "smithy.api#noAuth",
|
||||
};
|
||||
}
|
||||
const defaultSigninHttpAuthSchemeProvider = (authParameters) => {
|
||||
const options = [];
|
||||
switch (authParameters.operation) {
|
||||
case "CreateOAuth2Token": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
exports.defaultSigninHttpAuthSchemeProvider = defaultSigninHttpAuthSchemeProvider;
|
||||
const resolveHttpAuthSchemeConfig = (config) => {
|
||||
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
|
||||
return Object.assign(config_0, {
|
||||
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
|
||||
});
|
||||
};
|
||||
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2547:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.defaultEndpointResolver = void 0;
|
||||
const util_endpoints_1 = __webpack_require__(3068);
|
||||
const util_endpoints_2 = __webpack_require__(9674);
|
||||
const ruleset_1 = __webpack_require__(6904);
|
||||
const cache = new util_endpoints_2.EndpointCache({
|
||||
size: 50,
|
||||
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
||||
});
|
||||
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
}));
|
||||
};
|
||||
exports.defaultEndpointResolver = defaultEndpointResolver;
|
||||
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6904:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ruleSet = void 0;
|
||||
const u = "required", v = "fn", w = "argv", x = "ref";
|
||||
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: true, "default": false, "type": "boolean" }, j = { [u]: false, "type": "string" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, p = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, q = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }];
|
||||
const _data = { version: "1.0", parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: [m], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [{ [v]: h, [w]: [o, "aws"] }, p, q], endpoint: { url: "https://{Region}.signin.aws.amazon.com", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-cn"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws.cn", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-us-gov"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws-us-gov.com", properties: n, headers: n }, type: e }, { conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, r] }, s], rules: [{ endpoint: { url: "https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: [l, q], rules: [{ conditions: [{ [v]: c, [w]: [r, a] }], rules: [{ endpoint: { url: "https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: [p, m], rules: [{ conditions: [s], rules: [{ endpoint: { url: "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://signin.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
||||
exports.ruleSet = _data;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9762:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
var __webpack_unused_export__;
|
||||
|
||||
|
||||
var middlewareHostHeader = __webpack_require__(2590);
|
||||
var middlewareLogger = __webpack_require__(5242);
|
||||
var middlewareRecursionDetection = __webpack_require__(1568);
|
||||
var middlewareUserAgent = __webpack_require__(2959);
|
||||
var configResolver = __webpack_require__(9316);
|
||||
var core = __webpack_require__(402);
|
||||
var schema = __webpack_require__(6890);
|
||||
var middlewareContentLength = __webpack_require__(7212);
|
||||
var middlewareEndpoint = __webpack_require__(99);
|
||||
var middlewareRetry = __webpack_require__(9618);
|
||||
var smithyClient = __webpack_require__(1411);
|
||||
var httpAuthSchemeProvider = __webpack_require__(7709);
|
||||
var runtimeConfig = __webpack_require__(2836);
|
||||
var regionConfigResolver = __webpack_require__(6463);
|
||||
var protocolHttp = __webpack_require__(2356);
|
||||
|
||||
const resolveClientEndpointParameters = (options) => {
|
||||
return Object.assign(options, {
|
||||
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
||||
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
||||
defaultSigningName: "signin",
|
||||
});
|
||||
};
|
||||
const commonParams = {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
|
||||
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
||||
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
||||
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
||||
let _credentials = runtimeConfig.credentials;
|
||||
return {
|
||||
setHttpAuthScheme(httpAuthScheme) {
|
||||
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
||||
if (index === -1) {
|
||||
_httpAuthSchemes.push(httpAuthScheme);
|
||||
}
|
||||
else {
|
||||
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
||||
}
|
||||
},
|
||||
httpAuthSchemes() {
|
||||
return _httpAuthSchemes;
|
||||
},
|
||||
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
||||
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
||||
},
|
||||
httpAuthSchemeProvider() {
|
||||
return _httpAuthSchemeProvider;
|
||||
},
|
||||
setCredentials(credentials) {
|
||||
_credentials = credentials;
|
||||
},
|
||||
credentials() {
|
||||
return _credentials;
|
||||
},
|
||||
};
|
||||
};
|
||||
const resolveHttpAuthRuntimeConfig = (config) => {
|
||||
return {
|
||||
httpAuthSchemes: config.httpAuthSchemes(),
|
||||
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
||||
credentials: config.credentials(),
|
||||
};
|
||||
};
|
||||
|
||||
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
||||
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
||||
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
||||
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
||||
};
|
||||
|
||||
class SigninClient extends smithyClient.Client {
|
||||
config;
|
||||
constructor(...[configuration]) {
|
||||
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
||||
super(_config_0);
|
||||
this.initConfig = _config_0;
|
||||
const _config_1 = resolveClientEndpointParameters(_config_0);
|
||||
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
||||
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
||||
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
||||
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
||||
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
||||
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
||||
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
||||
this.config = _config_8;
|
||||
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
||||
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
||||
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
||||
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
||||
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSigninHttpAuthSchemeParametersProvider,
|
||||
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
||||
"aws.auth#sigv4": config.credentials,
|
||||
}),
|
||||
}));
|
||||
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
||||
}
|
||||
destroy() {
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
class SigninServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SigninServiceException.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
class AccessDeniedException extends SigninServiceException {
|
||||
name = "AccessDeniedException";
|
||||
$fault = "client";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "AccessDeniedException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
class InternalServerException extends SigninServiceException {
|
||||
name = "InternalServerException";
|
||||
$fault = "server";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InternalServerException",
|
||||
$fault: "server",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, InternalServerException.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
class TooManyRequestsError extends SigninServiceException {
|
||||
name = "TooManyRequestsError";
|
||||
$fault = "client";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "TooManyRequestsError",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, TooManyRequestsError.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
class ValidationException extends SigninServiceException {
|
||||
name = "ValidationException";
|
||||
$fault = "client";
|
||||
error;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ValidationException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, ValidationException.prototype);
|
||||
this.error = opts.error;
|
||||
}
|
||||
}
|
||||
|
||||
const _ADE = "AccessDeniedException";
|
||||
const _AT = "AccessToken";
|
||||
const _COAT = "CreateOAuth2Token";
|
||||
const _COATR = "CreateOAuth2TokenRequest";
|
||||
const _COATRB = "CreateOAuth2TokenRequestBody";
|
||||
const _COATRBr = "CreateOAuth2TokenResponseBody";
|
||||
const _COATRr = "CreateOAuth2TokenResponse";
|
||||
const _ISE = "InternalServerException";
|
||||
const _RT = "RefreshToken";
|
||||
const _TMRE = "TooManyRequestsError";
|
||||
const _VE = "ValidationException";
|
||||
const _aKI = "accessKeyId";
|
||||
const _aT = "accessToken";
|
||||
const _c = "client";
|
||||
const _cI = "clientId";
|
||||
const _cV = "codeVerifier";
|
||||
const _co = "code";
|
||||
const _e = "error";
|
||||
const _eI = "expiresIn";
|
||||
const _gT = "grantType";
|
||||
const _h = "http";
|
||||
const _hE = "httpError";
|
||||
const _iT = "idToken";
|
||||
const _jN = "jsonName";
|
||||
const _m = "message";
|
||||
const _rT = "refreshToken";
|
||||
const _rU = "redirectUri";
|
||||
const _s = "server";
|
||||
const _sAK = "secretAccessKey";
|
||||
const _sT = "sessionToken";
|
||||
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
|
||||
const _tI = "tokenInput";
|
||||
const _tO = "tokenOutput";
|
||||
const _tT = "tokenType";
|
||||
const n0 = "com.amazonaws.signin";
|
||||
var RefreshToken = [0, n0, _RT, 8, 0];
|
||||
var AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(AccessDeniedException$, AccessDeniedException);
|
||||
var AccessToken$ = [
|
||||
3,
|
||||
n0,
|
||||
_AT,
|
||||
8,
|
||||
[_aKI, _sAK, _sT],
|
||||
[
|
||||
[0, { [_jN]: _aKI }],
|
||||
[0, { [_jN]: _sAK }],
|
||||
[0, { [_jN]: _sT }],
|
||||
],
|
||||
3,
|
||||
];
|
||||
var CreateOAuth2TokenRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATR,
|
||||
0,
|
||||
[_tI],
|
||||
[[() => CreateOAuth2TokenRequestBody$, 16]],
|
||||
1,
|
||||
];
|
||||
var CreateOAuth2TokenRequestBody$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATRB,
|
||||
0,
|
||||
[_cI, _gT, _co, _rU, _cV, _rT],
|
||||
[
|
||||
[0, { [_jN]: _cI }],
|
||||
[0, { [_jN]: _gT }],
|
||||
0,
|
||||
[0, { [_jN]: _rU }],
|
||||
[0, { [_jN]: _cV }],
|
||||
[() => RefreshToken, { [_jN]: _rT }],
|
||||
],
|
||||
2,
|
||||
];
|
||||
var CreateOAuth2TokenResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATRr,
|
||||
0,
|
||||
[_tO],
|
||||
[[() => CreateOAuth2TokenResponseBody$, 16]],
|
||||
1,
|
||||
];
|
||||
var CreateOAuth2TokenResponseBody$ = [
|
||||
3,
|
||||
n0,
|
||||
_COATRBr,
|
||||
0,
|
||||
[_aT, _tT, _eI, _rT, _iT],
|
||||
[
|
||||
[() => AccessToken$, { [_jN]: _aT }],
|
||||
[0, { [_jN]: _tT }],
|
||||
[1, { [_jN]: _eI }],
|
||||
[() => RefreshToken, { [_jN]: _rT }],
|
||||
[0, { [_jN]: _iT }],
|
||||
],
|
||||
4,
|
||||
];
|
||||
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _s, [_hE]: 500 }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(InternalServerException$, InternalServerException);
|
||||
var TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(TooManyRequestsError$, TooManyRequestsError);
|
||||
var ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];
|
||||
schema.TypeRegistry.for(n0).registerError(ValidationException$, ValidationException);
|
||||
var SigninServiceException$ = [-3, _sm, "SigninServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_sm).registerError(SigninServiceException$, SigninServiceException);
|
||||
var CreateOAuth2Token$ = [
|
||||
9,
|
||||
n0,
|
||||
_COAT,
|
||||
{ [_h]: ["POST", "/v1/token", 200] },
|
||||
() => CreateOAuth2TokenRequest$,
|
||||
() => CreateOAuth2TokenResponse$,
|
||||
];
|
||||
|
||||
class CreateOAuth2TokenCommand extends smithyClient.Command
|
||||
.classBuilder()
|
||||
.ep(commonParams)
|
||||
.m(function (Command, cs, config, o) {
|
||||
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
||||
})
|
||||
.s("Signin", "CreateOAuth2Token", {})
|
||||
.n("SigninClient", "CreateOAuth2TokenCommand")
|
||||
.sc(CreateOAuth2Token$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
const commands = {
|
||||
CreateOAuth2TokenCommand,
|
||||
};
|
||||
class Signin extends SigninClient {
|
||||
}
|
||||
smithyClient.createAggregatedClient(commands, Signin);
|
||||
|
||||
const OAuth2ErrorCode = {
|
||||
AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED",
|
||||
INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS",
|
||||
INVALID_REQUEST: "INVALID_REQUEST",
|
||||
SERVER_ERROR: "server_error",
|
||||
TOKEN_EXPIRED: "TOKEN_EXPIRED",
|
||||
USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED",
|
||||
};
|
||||
|
||||
__webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
});
|
||||
__webpack_unused_export__ = ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Client; }
|
||||
});
|
||||
__webpack_unused_export__ = AccessDeniedException;
|
||||
__webpack_unused_export__ = AccessDeniedException$;
|
||||
__webpack_unused_export__ = AccessToken$;
|
||||
__webpack_unused_export__ = CreateOAuth2Token$;
|
||||
exports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenRequest$;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenRequestBody$;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenResponse$;
|
||||
__webpack_unused_export__ = CreateOAuth2TokenResponseBody$;
|
||||
__webpack_unused_export__ = InternalServerException;
|
||||
__webpack_unused_export__ = InternalServerException$;
|
||||
__webpack_unused_export__ = OAuth2ErrorCode;
|
||||
__webpack_unused_export__ = Signin;
|
||||
exports.SigninClient = SigninClient;
|
||||
__webpack_unused_export__ = SigninServiceException;
|
||||
__webpack_unused_export__ = SigninServiceException$;
|
||||
__webpack_unused_export__ = TooManyRequestsError;
|
||||
__webpack_unused_export__ = TooManyRequestsError$;
|
||||
__webpack_unused_export__ = ValidationException;
|
||||
__webpack_unused_export__ = ValidationException$;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2836:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const tslib_1 = __webpack_require__(1860);
|
||||
const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955));
|
||||
const core_1 = __webpack_require__(8704);
|
||||
const util_user_agent_node_1 = __webpack_require__(1656);
|
||||
const config_resolver_1 = __webpack_require__(9316);
|
||||
const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(357);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const loaderConfig = {
|
||||
profile: config?.profile,
|
||||
logger: clientSharedValues.logger,
|
||||
};
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "node",
|
||||
defaultsMode,
|
||||
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
||||
region: config?.region ??
|
||||
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
||||
retryMode: config?.retryMode ??
|
||||
(0, node_config_provider_1.loadConfig)({
|
||||
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
||||
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
||||
}, config),
|
||||
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
||||
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
||||
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 357:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const core_1 = __webpack_require__(8704);
|
||||
const protocols_1 = __webpack_require__(7288);
|
||||
const core_2 = __webpack_require__(402);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const url_parser_1 = __webpack_require__(4494);
|
||||
const util_base64_1 = __webpack_require__(8385);
|
||||
const util_utf8_1 = __webpack_require__(1577);
|
||||
const httpAuthSchemeProvider_1 = __webpack_require__(7709);
|
||||
const endpointResolver_1 = __webpack_require__(2547);
|
||||
const getRuntimeConfig = (config) => {
|
||||
return {
|
||||
apiVersion: "2023-01-01",
|
||||
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
||||
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
||||
disableHostPrefix: config?.disableHostPrefix ?? false,
|
||||
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
||||
extensions: config?.extensions ?? [],
|
||||
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSigninHttpAuthSchemeProvider,
|
||||
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
||||
{
|
||||
schemeId: "aws.auth#sigv4",
|
||||
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
||||
signer: new core_1.AwsSdkSigV4Signer(),
|
||||
},
|
||||
{
|
||||
schemeId: "smithy.api#noAuth",
|
||||
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
||||
signer: new core_2.NoAuthSigner(),
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.signin",
|
||||
version: "2023-01-01",
|
||||
serviceTarget: "Signin",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "Signin",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
+327
-21
@@ -11,6 +11,7 @@ exports.modules = {
|
||||
var sharedIniFileLoader = __webpack_require__(4964);
|
||||
var propertyProvider = __webpack_require__(1238);
|
||||
var client = __webpack_require__(5152);
|
||||
var credentialProviderLogin = __webpack_require__(4072);
|
||||
|
||||
const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
||||
const sourceProvidersMap = {
|
||||
@@ -64,7 +65,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
||||
}
|
||||
return withProviderProfile;
|
||||
};
|
||||
const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
|
||||
const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {
|
||||
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
||||
const profileData = profiles[profileName];
|
||||
const { source_profile, region } = profileData;
|
||||
@@ -74,8 +75,9 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi
|
||||
...options.clientConfig,
|
||||
credentialProviderLogger: options.logger,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
...options?.parentClientConfig,
|
||||
region: region ?? options?.parentClientConfig?.region,
|
||||
region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,
|
||||
},
|
||||
}, options.clientPlugins);
|
||||
}
|
||||
@@ -86,7 +88,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi
|
||||
}
|
||||
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
||||
const sourceCredsProvider = source_profile
|
||||
? resolveProfileData(source_profile, profiles, options, {
|
||||
? resolveProfileData(source_profile, profiles, options, callerClientConfig, {
|
||||
...visitedProfiles,
|
||||
[source_profile]: true,
|
||||
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
|
||||
@@ -117,20 +119,33 @@ const isCredentialSourceWithoutRoleArn = (section) => {
|
||||
return !section.role_arn && !!section.credential_source;
|
||||
};
|
||||
|
||||
const isLoginProfile = (data) => {
|
||||
return Boolean(data && data.login_session);
|
||||
};
|
||||
const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
||||
const credentials = await credentialProviderLogin.fromLoginCredentials({
|
||||
...options,
|
||||
profile: profileName,
|
||||
})({ callerClientConfig });
|
||||
return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
||||
};
|
||||
|
||||
const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
||||
const resolveProcessCredentials = async (options, profile) => __webpack_require__.e(/* import() */ 360).then(__webpack_require__.t.bind(__webpack_require__, 5360, 19)).then(({ fromProcess }) => fromProcess({
|
||||
...options,
|
||||
profile,
|
||||
})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
||||
|
||||
const resolveSsoCredentials = async (profile, profileData, options = {}) => {
|
||||
const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
||||
const { fromSSO } = await __webpack_require__.e(/* import() */ 998).then(__webpack_require__.t.bind(__webpack_require__, 998, 19));
|
||||
return fromSSO({
|
||||
profile,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
clientConfig: options.clientConfig,
|
||||
})().then((creds) => {
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => {
|
||||
if (profileData.sso_session) {
|
||||
return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
||||
}
|
||||
@@ -169,56 +184,347 @@ const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg.web_identity_token_file === "string" &&
|
||||
typeof arg.role_arn === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
||||
const resolveWebIdentityCredentials = async (profile, options) => __webpack_require__.e(/* import() */ 956).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({
|
||||
const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => __webpack_require__.e(/* import() */ 956).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({
|
||||
webIdentityTokenFile: profile.web_identity_token_file,
|
||||
roleArn: profile.role_arn,
|
||||
roleSessionName: profile.role_session_name,
|
||||
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
||||
|
||||
const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
||||
const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
||||
const data = profiles[profileName];
|
||||
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
||||
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
|
||||
return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
|
||||
}
|
||||
if (isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isWebIdentityProfile(data)) {
|
||||
return resolveWebIdentityCredentials(data, options);
|
||||
return resolveWebIdentityCredentials(data, options, callerClientConfig);
|
||||
}
|
||||
if (isProcessProfile(data)) {
|
||||
return resolveProcessCredentials(options, profileName);
|
||||
}
|
||||
if (isSsoProfile(data)) {
|
||||
return await resolveSsoCredentials(profileName, data, options);
|
||||
return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
|
||||
}
|
||||
if (isLoginProfile(data)) {
|
||||
return resolveLoginCredentials(profileName, options, callerClientConfig);
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
||||
};
|
||||
|
||||
const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
const init = {
|
||||
..._init,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
..._init.parentClientConfig,
|
||||
},
|
||||
};
|
||||
const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
|
||||
return resolveProfileData(sharedIniFileLoader.getProfileName({
|
||||
profile: _init.profile ?? callerClientConfig?.profile,
|
||||
}), profiles, init);
|
||||
profile: init.profile ?? callerClientConfig?.profile,
|
||||
}), profiles, init, callerClientConfig);
|
||||
};
|
||||
|
||||
exports.fromIni = fromIni;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4072:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
|
||||
var client = __webpack_require__(5152);
|
||||
var propertyProvider = __webpack_require__(1238);
|
||||
var sharedIniFileLoader = __webpack_require__(4964);
|
||||
var protocolHttp = __webpack_require__(2356);
|
||||
var node_crypto = __webpack_require__(7598);
|
||||
var node_fs = __webpack_require__(3024);
|
||||
var node_os = __webpack_require__(8161);
|
||||
var node_path = __webpack_require__(6760);
|
||||
|
||||
class LoginCredentialsFetcher {
|
||||
profileData;
|
||||
init;
|
||||
callerClientConfig;
|
||||
static REFRESH_THRESHOLD = 5 * 60 * 1000;
|
||||
constructor(profileData, init, callerClientConfig) {
|
||||
this.profileData = profileData;
|
||||
this.init = init;
|
||||
this.callerClientConfig = callerClientConfig;
|
||||
}
|
||||
async loadCredentials() {
|
||||
const token = await this.loadToken();
|
||||
if (!token) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
|
||||
}
|
||||
const accessToken = token.accessToken;
|
||||
const now = Date.now();
|
||||
const expiryTime = new Date(accessToken.expiresAt).getTime();
|
||||
const timeUntilExpiry = expiryTime - now;
|
||||
if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {
|
||||
return this.refresh(token);
|
||||
}
|
||||
return {
|
||||
accessKeyId: accessToken.accessKeyId,
|
||||
secretAccessKey: accessToken.secretAccessKey,
|
||||
sessionToken: accessToken.sessionToken,
|
||||
accountId: accessToken.accountId,
|
||||
expiration: new Date(accessToken.expiresAt),
|
||||
};
|
||||
}
|
||||
get logger() {
|
||||
return this.init?.logger;
|
||||
}
|
||||
get loginSession() {
|
||||
return this.profileData.login_session;
|
||||
}
|
||||
async refresh(token) {
|
||||
const { SigninClient, CreateOAuth2TokenCommand } = await __webpack_require__.e(/* import() */ 762).then(__webpack_require__.t.bind(__webpack_require__, 9762, 19));
|
||||
const { logger, userAgentAppId } = this.callerClientConfig ?? {};
|
||||
const isH2 = (requestHandler) => {
|
||||
return requestHandler?.metadata?.handlerProtocol === "h2";
|
||||
};
|
||||
const requestHandler = isH2(this.callerClientConfig?.requestHandler)
|
||||
? undefined
|
||||
: this.callerClientConfig?.requestHandler;
|
||||
const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;
|
||||
const client = new SigninClient({
|
||||
credentials: {
|
||||
accessKeyId: "",
|
||||
secretAccessKey: "",
|
||||
},
|
||||
region,
|
||||
requestHandler,
|
||||
logger,
|
||||
userAgentAppId,
|
||||
...this.init?.clientConfig,
|
||||
});
|
||||
this.createDPoPInterceptor(client.middlewareStack);
|
||||
const commandInput = {
|
||||
tokenInput: {
|
||||
clientId: token.clientId,
|
||||
refreshToken: token.refreshToken,
|
||||
grantType: "refresh_token",
|
||||
},
|
||||
};
|
||||
try {
|
||||
const response = await client.send(new CreateOAuth2TokenCommand(commandInput));
|
||||
const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
|
||||
const { refreshToken, expiresIn } = response.tokenOutput ?? {};
|
||||
if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
|
||||
throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", {
|
||||
logger: this.logger,
|
||||
tryNextLink: false,
|
||||
});
|
||||
}
|
||||
const expiresInMs = (expiresIn ?? 900) * 1000;
|
||||
const expiration = new Date(Date.now() + expiresInMs);
|
||||
const updatedToken = {
|
||||
...token,
|
||||
accessToken: {
|
||||
...token.accessToken,
|
||||
accessKeyId: accessKeyId,
|
||||
secretAccessKey: secretAccessKey,
|
||||
sessionToken: sessionToken,
|
||||
expiresAt: expiration.toISOString(),
|
||||
},
|
||||
refreshToken: refreshToken,
|
||||
};
|
||||
await this.saveToken(updatedToken);
|
||||
const newAccessToken = updatedToken.accessToken;
|
||||
return {
|
||||
accessKeyId: newAccessToken.accessKeyId,
|
||||
secretAccessKey: newAccessToken.secretAccessKey,
|
||||
sessionToken: newAccessToken.sessionToken,
|
||||
accountId: newAccessToken.accountId,
|
||||
expiration,
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
if (error.name === "AccessDeniedException") {
|
||||
const errorType = error.error;
|
||||
let message;
|
||||
switch (errorType) {
|
||||
case "TOKEN_EXPIRED":
|
||||
message = "Your session has expired. Please reauthenticate.";
|
||||
break;
|
||||
case "USER_CREDENTIALS_CHANGED":
|
||||
message =
|
||||
"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";
|
||||
break;
|
||||
case "INSUFFICIENT_PERMISSIONS":
|
||||
message =
|
||||
"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";
|
||||
break;
|
||||
default:
|
||||
message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
|
||||
}
|
||||
}
|
||||
async loadToken() {
|
||||
const tokenFilePath = this.getTokenFilePath();
|
||||
try {
|
||||
let tokenData;
|
||||
try {
|
||||
tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
|
||||
}
|
||||
catch {
|
||||
tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8");
|
||||
}
|
||||
const token = JSON.parse(tokenData);
|
||||
const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]);
|
||||
if (!token.accessToken?.accountId) {
|
||||
missingFields.push("accountId");
|
||||
}
|
||||
if (missingFields.length > 0) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
|
||||
logger: this.logger,
|
||||
tryNextLink: false,
|
||||
});
|
||||
}
|
||||
return token;
|
||||
}
|
||||
catch (error) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
|
||||
logger: this.logger,
|
||||
tryNextLink: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
async saveToken(token) {
|
||||
const tokenFilePath = this.getTokenFilePath();
|
||||
const directory = node_path.dirname(tokenFilePath);
|
||||
try {
|
||||
await node_fs.promises.mkdir(directory, { recursive: true });
|
||||
}
|
||||
catch (error) {
|
||||
}
|
||||
await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
||||
}
|
||||
getTokenFilePath() {
|
||||
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), ".aws", "login", "cache");
|
||||
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
||||
const loginSessionSha256 = node_crypto.createHash("sha256").update(loginSessionBytes).digest("hex");
|
||||
return node_path.join(directory, `${loginSessionSha256}.json`);
|
||||
}
|
||||
derToRawSignature(derSignature) {
|
||||
let offset = 2;
|
||||
if (derSignature[offset] !== 0x02) {
|
||||
throw new Error("Invalid DER signature");
|
||||
}
|
||||
offset++;
|
||||
const rLength = derSignature[offset++];
|
||||
let r = derSignature.subarray(offset, offset + rLength);
|
||||
offset += rLength;
|
||||
if (derSignature[offset] !== 0x02) {
|
||||
throw new Error("Invalid DER signature");
|
||||
}
|
||||
offset++;
|
||||
const sLength = derSignature[offset++];
|
||||
let s = derSignature.subarray(offset, offset + sLength);
|
||||
r = r[0] === 0x00 ? r.subarray(1) : r;
|
||||
s = s[0] === 0x00 ? s.subarray(1) : s;
|
||||
const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);
|
||||
const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);
|
||||
return Buffer.concat([rPadded, sPadded]);
|
||||
}
|
||||
createDPoPInterceptor(middlewareStack) {
|
||||
middlewareStack.add((next) => async (args) => {
|
||||
if (protocolHttp.HttpRequest.isInstance(args.request)) {
|
||||
const request = args.request;
|
||||
const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`;
|
||||
const dpop = await this.generateDpop(request.method, actualEndpoint);
|
||||
request.headers = {
|
||||
...request.headers,
|
||||
DPoP: dpop,
|
||||
};
|
||||
}
|
||||
return next(args);
|
||||
}, {
|
||||
step: "finalizeRequest",
|
||||
name: "dpopInterceptor",
|
||||
override: true,
|
||||
});
|
||||
}
|
||||
async generateDpop(method = "POST", endpoint) {
|
||||
const token = await this.loadToken();
|
||||
try {
|
||||
const privateKey = node_crypto.createPrivateKey({
|
||||
key: token.dpopKey,
|
||||
format: "pem",
|
||||
type: "sec1",
|
||||
});
|
||||
const publicKey = node_crypto.createPublicKey(privateKey);
|
||||
const publicDer = publicKey.export({ format: "der", type: "spki" });
|
||||
let pointStart = -1;
|
||||
for (let i = 0; i < publicDer.length; i++) {
|
||||
if (publicDer[i] === 0x04) {
|
||||
pointStart = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const x = publicDer.slice(pointStart + 1, pointStart + 33);
|
||||
const y = publicDer.slice(pointStart + 33, pointStart + 65);
|
||||
const header = {
|
||||
alg: "ES256",
|
||||
typ: "dpop+jwt",
|
||||
jwk: {
|
||||
kty: "EC",
|
||||
crv: "P-256",
|
||||
x: x.toString("base64url"),
|
||||
y: y.toString("base64url"),
|
||||
},
|
||||
};
|
||||
const payload = {
|
||||
jti: crypto.randomUUID(),
|
||||
htm: method,
|
||||
htu: endpoint,
|
||||
iat: Math.floor(Date.now() / 1000),
|
||||
};
|
||||
const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url");
|
||||
const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url");
|
||||
const message = `${headerB64}.${payloadB64}`;
|
||||
const asn1Signature = node_crypto.sign("sha256", Buffer.from(message), privateKey);
|
||||
const rawSignature = this.derToRawSignature(asn1Signature);
|
||||
const signatureB64 = rawSignature.toString("base64url");
|
||||
return `${message}.${signatureB64}`;
|
||||
}
|
||||
catch (error) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
|
||||
init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init || {});
|
||||
const profileName = sharedIniFileLoader.getProfileName({
|
||||
profile: init?.profile ?? callerClientConfig?.profile,
|
||||
});
|
||||
const profile = profiles[profileName];
|
||||
if (!profile?.login_session) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
|
||||
tryNextLink: true,
|
||||
logger: init?.logger,
|
||||
});
|
||||
}
|
||||
const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
|
||||
const credentials = await fetcher.loadCredentials();
|
||||
return client.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
|
||||
};
|
||||
|
||||
exports.fromLoginCredentials = fromLoginCredentials;
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
|
||||
+103
-108
@@ -397,14 +397,14 @@ var schema = __webpack_require__(6890);
|
||||
var client = __webpack_require__(5152);
|
||||
var regionConfigResolver = __webpack_require__(6463);
|
||||
|
||||
let STSServiceException$1 = class STSServiceException extends smithyClient.ServiceException {
|
||||
class STSServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, STSServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 {
|
||||
class ExpiredTokenException extends STSServiceException {
|
||||
name = "ExpiredTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -415,8 +415,8 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceExce
|
||||
});
|
||||
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 {
|
||||
}
|
||||
class MalformedPolicyDocumentException extends STSServiceException {
|
||||
name = "MalformedPolicyDocumentException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -427,8 +427,8 @@ let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException
|
||||
});
|
||||
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
||||
}
|
||||
};
|
||||
let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 {
|
||||
}
|
||||
class PackedPolicyTooLargeException extends STSServiceException {
|
||||
name = "PackedPolicyTooLargeException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -439,8 +439,8 @@ let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
||||
}
|
||||
};
|
||||
let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 {
|
||||
}
|
||||
class RegionDisabledException extends STSServiceException {
|
||||
name = "RegionDisabledException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -451,8 +451,8 @@ let RegionDisabledException$1 = class RegionDisabledException extends STSService
|
||||
});
|
||||
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPRejectedClaimException extends STSServiceException {
|
||||
name = "IDPRejectedClaimException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -463,8 +463,8 @@ let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSSer
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
||||
}
|
||||
};
|
||||
let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 {
|
||||
}
|
||||
class InvalidIdentityTokenException extends STSServiceException {
|
||||
name = "InvalidIdentityTokenException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -475,8 +475,8 @@ let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extend
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
||||
}
|
||||
};
|
||||
let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 {
|
||||
}
|
||||
class IDPCommunicationErrorException extends STSServiceException {
|
||||
name = "IDPCommunicationErrorException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -487,7 +487,7 @@ let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException exte
|
||||
});
|
||||
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _A = "Arn";
|
||||
const _AKI = "AccessKeyId";
|
||||
@@ -550,154 +550,129 @@ const _tLT = "tagListType";
|
||||
const n0 = "com.amazonaws.sts";
|
||||
var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
||||
var clientTokenType = [0, n0, _cTT, 8, 0];
|
||||
var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
|
||||
var AssumeRoleRequest = [
|
||||
var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
|
||||
var AssumeRoleRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARR,
|
||||
0,
|
||||
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
||||
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
||||
2,
|
||||
];
|
||||
var AssumeRoleResponse = [
|
||||
var AssumeRoleResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARRs,
|
||||
0,
|
||||
[_C, _ARU, _PPS, _SI],
|
||||
[[() => Credentials, 0], () => AssumedRoleUser, 1, 0],
|
||||
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
|
||||
];
|
||||
var AssumeRoleWithWebIdentityRequest = [
|
||||
var AssumeRoleWithWebIdentityRequest$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIR,
|
||||
0,
|
||||
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
||||
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
||||
3,
|
||||
];
|
||||
var AssumeRoleWithWebIdentityResponse = [
|
||||
var AssumeRoleWithWebIdentityResponse$ = [
|
||||
3,
|
||||
n0,
|
||||
_ARWWIRs,
|
||||
0,
|
||||
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
||||
[[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0],
|
||||
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
|
||||
];
|
||||
var Credentials = [
|
||||
var Credentials$ = [
|
||||
3,
|
||||
n0,
|
||||
_C,
|
||||
0,
|
||||
[_AKI, _SAK, _ST, _E],
|
||||
[0, [() => accessKeySecretType, 0], 0, 4],
|
||||
4,
|
||||
];
|
||||
var ExpiredTokenException = [
|
||||
var ExpiredTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_ETE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`ExpiredTokenException`, 400],
|
||||
},
|
||||
{ [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
|
||||
var IDPCommunicationErrorException = [
|
||||
schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
|
||||
var IDPCommunicationErrorException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPCEE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`IDPCommunicationError`, 400],
|
||||
},
|
||||
{ [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1);
|
||||
var IDPRejectedClaimException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
||||
var IDPRejectedClaimException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IDPRCE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`IDPRejectedClaim`, 403],
|
||||
},
|
||||
{ [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1);
|
||||
var InvalidIdentityTokenException = [
|
||||
schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
||||
var InvalidIdentityTokenException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_IITE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`InvalidIdentityToken`, 400],
|
||||
},
|
||||
{ [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1);
|
||||
var MalformedPolicyDocumentException = [
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
||||
var MalformedPolicyDocumentException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_MPDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`MalformedPolicyDocument`, 400],
|
||||
},
|
||||
{ [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1);
|
||||
var PackedPolicyTooLargeException = [
|
||||
schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
||||
var PackedPolicyTooLargeException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_PPTLE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
[_aQE]: [`PackedPolicyTooLarge`, 400],
|
||||
},
|
||||
{ [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1);
|
||||
var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException = [
|
||||
schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
||||
var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
|
||||
var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
||||
var RegionDisabledException$ = [
|
||||
-3,
|
||||
n0,
|
||||
_RDE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 403,
|
||||
[_aQE]: [`RegionDisabledException`, 403],
|
||||
},
|
||||
{ [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
|
||||
[_m],
|
||||
[0],
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1);
|
||||
var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
|
||||
var STSServiceException = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag];
|
||||
var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
|
||||
var AssumeRoleWithWebIdentity = [
|
||||
schema.TypeRegistry.for(n0).registerError(RegionDisabledException$, RegionDisabledException);
|
||||
var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
|
||||
var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(STSServiceException$, STSServiceException);
|
||||
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
|
||||
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
|
||||
var tagListType = [1, n0, _tLT, 0, () => Tag$];
|
||||
var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
|
||||
var AssumeRoleWithWebIdentity$ = [
|
||||
9,
|
||||
n0,
|
||||
_ARWWI,
|
||||
0,
|
||||
() => AssumeRoleWithWebIdentityRequest,
|
||||
() => AssumeRoleWithWebIdentityResponse,
|
||||
() => AssumeRoleWithWebIdentityRequest$,
|
||||
() => AssumeRoleWithWebIdentityResponse$,
|
||||
];
|
||||
|
||||
class AssumeRoleCommand extends smithyClient.Command
|
||||
@@ -708,7 +683,7 @@ class AssumeRoleCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
||||
.n("STSClient", "AssumeRoleCommand")
|
||||
.sc(AssumeRole)
|
||||
.sc(AssumeRole$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -720,7 +695,7 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
|
||||
})
|
||||
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
||||
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
||||
.sc(AssumeRoleWithWebIdentity)
|
||||
.sc(AssumeRoleWithWebIdentity$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -744,9 +719,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
||||
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
||||
const region = typeof _region === "function" ? await _region() : _region;
|
||||
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
||||
const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)();
|
||||
let stsDefaultRegion = "";
|
||||
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
|
||||
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
||||
return region ?? parentRegion ?? stsDefaultRegion;
|
||||
return resolvedRegion;
|
||||
};
|
||||
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
||||
let stsClient;
|
||||
@@ -855,17 +831,36 @@ Object.defineProperty(exports, "$Command", ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Command; }
|
||||
}));
|
||||
exports.AssumeRole$ = AssumeRole$;
|
||||
exports.AssumeRoleCommand = AssumeRoleCommand;
|
||||
exports.AssumeRoleRequest$ = AssumeRoleRequest$;
|
||||
exports.AssumeRoleResponse$ = AssumeRoleResponse$;
|
||||
exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
|
||||
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
||||
exports.ExpiredTokenException = ExpiredTokenException$1;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException$1;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException$1;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException$1;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException$1;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException$1;
|
||||
exports.RegionDisabledException = RegionDisabledException$1;
|
||||
exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
|
||||
exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
|
||||
exports.AssumedRoleUser$ = AssumedRoleUser$;
|
||||
exports.Credentials$ = Credentials$;
|
||||
exports.ExpiredTokenException = ExpiredTokenException;
|
||||
exports.ExpiredTokenException$ = ExpiredTokenException$;
|
||||
exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
|
||||
exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
|
||||
exports.IDPRejectedClaimException = IDPRejectedClaimException;
|
||||
exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
|
||||
exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
|
||||
exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
|
||||
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
|
||||
exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
|
||||
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
|
||||
exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
|
||||
exports.PolicyDescriptorType$ = PolicyDescriptorType$;
|
||||
exports.ProvidedContext$ = ProvidedContext$;
|
||||
exports.RegionDisabledException = RegionDisabledException;
|
||||
exports.RegionDisabledException$ = RegionDisabledException$;
|
||||
exports.STS = STS;
|
||||
exports.STSServiceException = STSServiceException$1;
|
||||
exports.STSServiceException = STSServiceException;
|
||||
exports.STSServiceException$ = STSServiceException$;
|
||||
exports.Tag$ = Tag$;
|
||||
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
||||
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
||||
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
||||
@@ -895,14 +890,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(4443);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -991,12 +985,13 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ??
|
||||
new protocols_1.AwsQueryProtocol({
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
}),
|
||||
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.sts",
|
||||
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
||||
version: "2011-06-15",
|
||||
serviceTarget: "AWSSecurityTokenServiceV20110615",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "STS",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -1031,7 +1026,7 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
||||
/***/ 9955:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.933.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.975.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+166
-248
@@ -14,10 +14,9 @@ const util_middleware_1 = __webpack_require__(6324);
|
||||
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
||||
return {
|
||||
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
||||
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
|
||||
(() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
};
|
||||
};
|
||||
exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
|
||||
@@ -44,22 +43,30 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
||||
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
|
||||
const options = [];
|
||||
switch (authParameters.operation) {
|
||||
case "GetRoleCredentials": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "ListAccountRoles": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "ListAccounts": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "Logout": {
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
case "GetRoleCredentials":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
case "ListAccountRoles":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
case "ListAccounts":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
case "Logout":
|
||||
{
|
||||
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
||||
break;
|
||||
}
|
||||
;
|
||||
default: {
|
||||
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
||||
}
|
||||
@@ -232,14 +239,14 @@ class SSOClient extends smithyClient.Client {
|
||||
}
|
||||
}
|
||||
|
||||
let SSOServiceException$1 = class SSOServiceException extends smithyClient.ServiceException {
|
||||
class SSOServiceException extends smithyClient.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SSOServiceException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let InvalidRequestException$1 = class InvalidRequestException extends SSOServiceException$1 {
|
||||
class InvalidRequestException extends SSOServiceException {
|
||||
name = "InvalidRequestException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -250,8 +257,8 @@ let InvalidRequestException$1 = class InvalidRequestException extends SSOService
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
||||
}
|
||||
};
|
||||
let ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOServiceException$1 {
|
||||
}
|
||||
class ResourceNotFoundException extends SSOServiceException {
|
||||
name = "ResourceNotFoundException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -262,8 +269,8 @@ let ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOSer
|
||||
});
|
||||
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
||||
}
|
||||
};
|
||||
let TooManyRequestsException$1 = class TooManyRequestsException extends SSOServiceException$1 {
|
||||
}
|
||||
class TooManyRequestsException extends SSOServiceException {
|
||||
name = "TooManyRequestsException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -274,8 +281,8 @@ let TooManyRequestsException$1 = class TooManyRequestsException extends SSOServi
|
||||
});
|
||||
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
||||
}
|
||||
};
|
||||
let UnauthorizedException$1 = class UnauthorizedException extends SSOServiceException$1 {
|
||||
}
|
||||
class UnauthorizedException extends SSOServiceException {
|
||||
name = "UnauthorizedException";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
@@ -286,7 +293,7 @@ let UnauthorizedException$1 = class UnauthorizedException extends SSOServiceExce
|
||||
});
|
||||
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const _AI = "AccountInfo";
|
||||
const _ALT = "AccountListType";
|
||||
@@ -342,213 +349,100 @@ const n0 = "com.amazonaws.sso";
|
||||
var AccessTokenType = [0, n0, _ATT, 8, 0];
|
||||
var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
|
||||
var SessionTokenType = [0, n0, _STT, 8, 0];
|
||||
var AccountInfo = [3, n0, _AI, 0, [_aI, _aN, _eA], [0, 0, 0]];
|
||||
var GetRoleCredentialsRequest = [
|
||||
3,
|
||||
n0,
|
||||
_GRCR,
|
||||
var AccountInfo$ = [3, n0, _AI,
|
||||
0,
|
||||
[_aI, _aN, _eA],
|
||||
[0, 0, 0]
|
||||
];
|
||||
var GetRoleCredentialsRequest$ = [3, n0, _GRCR,
|
||||
0,
|
||||
[_rN, _aI, _aT],
|
||||
[
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _rn,
|
||||
},
|
||||
],
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _ai,
|
||||
},
|
||||
],
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
],
|
||||
[[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3
|
||||
];
|
||||
var GetRoleCredentialsResponse = [3, n0, _GRCRe, 0, [_rC], [[() => RoleCredentials, 0]]];
|
||||
var InvalidRequestException = [
|
||||
-3,
|
||||
n0,
|
||||
_IRE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 400,
|
||||
},
|
||||
var GetRoleCredentialsResponse$ = [3, n0, _GRCRe,
|
||||
0,
|
||||
[_rC],
|
||||
[[() => RoleCredentials$, 0]]
|
||||
];
|
||||
var InvalidRequestException$ = [-3, n0, _IRE,
|
||||
{ [_e]: _c, [_hE]: 400 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
|
||||
var ListAccountRolesRequest = [
|
||||
3,
|
||||
n0,
|
||||
_LARR,
|
||||
schema.TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
|
||||
var ListAccountRolesRequest$ = [3, n0, _LARR,
|
||||
0,
|
||||
[_nT, _mR, _aT, _aI],
|
||||
[
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _nt,
|
||||
},
|
||||
],
|
||||
[
|
||||
1,
|
||||
{
|
||||
[_hQ]: _mr,
|
||||
},
|
||||
],
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _ai,
|
||||
},
|
||||
],
|
||||
],
|
||||
[_aT, _aI, _nT, _mR],
|
||||
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _ai }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 2
|
||||
];
|
||||
var ListAccountRolesResponse = [3, n0, _LARRi, 0, [_nT, _rL], [0, () => RoleListType]];
|
||||
var ListAccountsRequest = [
|
||||
3,
|
||||
n0,
|
||||
_LAR,
|
||||
var ListAccountRolesResponse$ = [3, n0, _LARRi,
|
||||
0,
|
||||
[_nT, _mR, _aT],
|
||||
[
|
||||
[
|
||||
0,
|
||||
{
|
||||
[_hQ]: _nt,
|
||||
},
|
||||
],
|
||||
[
|
||||
1,
|
||||
{
|
||||
[_hQ]: _mr,
|
||||
},
|
||||
],
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
],
|
||||
[_nT, _rL],
|
||||
[0, () => RoleListType]
|
||||
];
|
||||
var ListAccountsResponse = [3, n0, _LARi, 0, [_nT, _aL], [0, () => AccountListType]];
|
||||
var LogoutRequest = [
|
||||
3,
|
||||
n0,
|
||||
_LR,
|
||||
var ListAccountsRequest$ = [3, n0, _LAR,
|
||||
0,
|
||||
[_aT, _nT, _mR],
|
||||
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 1
|
||||
];
|
||||
var ListAccountsResponse$ = [3, n0, _LARi,
|
||||
0,
|
||||
[_nT, _aL],
|
||||
[0, () => AccountListType]
|
||||
];
|
||||
var LogoutRequest$ = [3, n0, _LR,
|
||||
0,
|
||||
[_aT],
|
||||
[
|
||||
[
|
||||
() => AccessTokenType,
|
||||
{
|
||||
[_hH]: _xasbt,
|
||||
},
|
||||
],
|
||||
],
|
||||
[[() => AccessTokenType, { [_hH]: _xasbt }]], 1
|
||||
];
|
||||
var ResourceNotFoundException = [
|
||||
-3,
|
||||
n0,
|
||||
_RNFE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 404,
|
||||
},
|
||||
var ResourceNotFoundException$ = [-3, n0, _RNFE,
|
||||
{ [_e]: _c, [_hE]: 404 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
|
||||
var RoleCredentials = [
|
||||
3,
|
||||
n0,
|
||||
_RC,
|
||||
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
||||
var RoleCredentials$ = [3, n0, _RC,
|
||||
0,
|
||||
[_aKI, _sAK, _sT, _ex],
|
||||
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
|
||||
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
|
||||
];
|
||||
var RoleInfo = [3, n0, _RI, 0, [_rN, _aI], [0, 0]];
|
||||
var TooManyRequestsException = [
|
||||
-3,
|
||||
n0,
|
||||
_TMRE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 429,
|
||||
},
|
||||
var RoleInfo$ = [3, n0, _RI,
|
||||
0,
|
||||
[_rN, _aI],
|
||||
[0, 0]
|
||||
];
|
||||
var TooManyRequestsException$ = [-3, n0, _TMRE,
|
||||
{ [_e]: _c, [_hE]: 429 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(TooManyRequestsException, TooManyRequestsException$1);
|
||||
var UnauthorizedException = [
|
||||
-3,
|
||||
n0,
|
||||
_UE,
|
||||
{
|
||||
[_e]: _c,
|
||||
[_hE]: 401,
|
||||
},
|
||||
schema.TypeRegistry.for(n0).registerError(TooManyRequestsException$, TooManyRequestsException);
|
||||
var UnauthorizedException$ = [-3, n0, _UE,
|
||||
{ [_e]: _c, [_hE]: 401 },
|
||||
[_m],
|
||||
[0],
|
||||
[0]
|
||||
];
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedException, UnauthorizedException$1);
|
||||
schema.TypeRegistry.for(n0).registerError(UnauthorizedException$, UnauthorizedException);
|
||||
var __Unit = "unit";
|
||||
var SSOServiceException = [-3, _s, "SSOServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(SSOServiceException, SSOServiceException$1);
|
||||
var AccountListType = [1, n0, _ALT, 0, () => AccountInfo];
|
||||
var RoleListType = [1, n0, _RLT, 0, () => RoleInfo];
|
||||
var GetRoleCredentials = [
|
||||
9,
|
||||
n0,
|
||||
_GRC,
|
||||
{
|
||||
[_h]: ["GET", "/federation/credentials", 200],
|
||||
},
|
||||
() => GetRoleCredentialsRequest,
|
||||
() => GetRoleCredentialsResponse,
|
||||
var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
|
||||
schema.TypeRegistry.for(_s).registerError(SSOServiceException$, SSOServiceException);
|
||||
var AccountListType = [1, n0, _ALT,
|
||||
0, () => AccountInfo$
|
||||
];
|
||||
var ListAccountRoles = [
|
||||
9,
|
||||
n0,
|
||||
_LARis,
|
||||
{
|
||||
[_h]: ["GET", "/assignment/roles", 200],
|
||||
},
|
||||
() => ListAccountRolesRequest,
|
||||
() => ListAccountRolesResponse,
|
||||
var RoleListType = [1, n0, _RLT,
|
||||
0, () => RoleInfo$
|
||||
];
|
||||
var ListAccounts = [
|
||||
9,
|
||||
n0,
|
||||
_LA,
|
||||
{
|
||||
[_h]: ["GET", "/assignment/accounts", 200],
|
||||
},
|
||||
() => ListAccountsRequest,
|
||||
() => ListAccountsResponse,
|
||||
var GetRoleCredentials$ = [9, n0, _GRC,
|
||||
{ [_h]: ["GET", "/federation/credentials", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$
|
||||
];
|
||||
var Logout = [
|
||||
9,
|
||||
n0,
|
||||
_L,
|
||||
{
|
||||
[_h]: ["POST", "/logout", 200],
|
||||
},
|
||||
() => LogoutRequest,
|
||||
() => __Unit,
|
||||
var ListAccountRoles$ = [9, n0, _LARis,
|
||||
{ [_h]: ["GET", "/assignment/roles", 200] }, () => ListAccountRolesRequest$, () => ListAccountRolesResponse$
|
||||
];
|
||||
var ListAccounts$ = [9, n0, _LA,
|
||||
{ [_h]: ["GET", "/assignment/accounts", 200] }, () => ListAccountsRequest$, () => ListAccountsResponse$
|
||||
];
|
||||
var Logout$ = [9, n0, _L,
|
||||
{ [_h]: ["POST", "/logout", 200] }, () => LogoutRequest$, () => __Unit
|
||||
];
|
||||
|
||||
class GetRoleCredentialsCommand extends smithyClient.Command
|
||||
@@ -559,7 +453,7 @@ class GetRoleCredentialsCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "GetRoleCredentials", {})
|
||||
.n("SSOClient", "GetRoleCredentialsCommand")
|
||||
.sc(GetRoleCredentials)
|
||||
.sc(GetRoleCredentials$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -571,7 +465,7 @@ class ListAccountRolesCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "ListAccountRoles", {})
|
||||
.n("SSOClient", "ListAccountRolesCommand")
|
||||
.sc(ListAccountRoles)
|
||||
.sc(ListAccountRoles$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -583,7 +477,7 @@ class ListAccountsCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "ListAccounts", {})
|
||||
.n("SSOClient", "ListAccountsCommand")
|
||||
.sc(ListAccounts)
|
||||
.sc(ListAccounts$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -595,7 +489,7 @@ class LogoutCommand extends smithyClient.Command
|
||||
})
|
||||
.s("SWBPortalService", "Logout", {})
|
||||
.n("SSOClient", "LogoutCommand")
|
||||
.sc(Logout)
|
||||
.sc(Logout$)
|
||||
.build() {
|
||||
}
|
||||
|
||||
@@ -621,17 +515,36 @@ Object.defineProperty(exports, "__Client", ({
|
||||
enumerable: true,
|
||||
get: function () { return smithyClient.Client; }
|
||||
}));
|
||||
exports.AccountInfo$ = AccountInfo$;
|
||||
exports.GetRoleCredentials$ = GetRoleCredentials$;
|
||||
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
|
||||
exports.InvalidRequestException = InvalidRequestException$1;
|
||||
exports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;
|
||||
exports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;
|
||||
exports.InvalidRequestException = InvalidRequestException;
|
||||
exports.InvalidRequestException$ = InvalidRequestException$;
|
||||
exports.ListAccountRoles$ = ListAccountRoles$;
|
||||
exports.ListAccountRolesCommand = ListAccountRolesCommand;
|
||||
exports.ListAccountRolesRequest$ = ListAccountRolesRequest$;
|
||||
exports.ListAccountRolesResponse$ = ListAccountRolesResponse$;
|
||||
exports.ListAccounts$ = ListAccounts$;
|
||||
exports.ListAccountsCommand = ListAccountsCommand;
|
||||
exports.ListAccountsRequest$ = ListAccountsRequest$;
|
||||
exports.ListAccountsResponse$ = ListAccountsResponse$;
|
||||
exports.Logout$ = Logout$;
|
||||
exports.LogoutCommand = LogoutCommand;
|
||||
exports.ResourceNotFoundException = ResourceNotFoundException$1;
|
||||
exports.LogoutRequest$ = LogoutRequest$;
|
||||
exports.ResourceNotFoundException = ResourceNotFoundException;
|
||||
exports.ResourceNotFoundException$ = ResourceNotFoundException$;
|
||||
exports.RoleCredentials$ = RoleCredentials$;
|
||||
exports.RoleInfo$ = RoleInfo$;
|
||||
exports.SSO = SSO;
|
||||
exports.SSOClient = SSOClient;
|
||||
exports.SSOServiceException = SSOServiceException$1;
|
||||
exports.TooManyRequestsException = TooManyRequestsException$1;
|
||||
exports.UnauthorizedException = UnauthorizedException$1;
|
||||
exports.SSOServiceException = SSOServiceException;
|
||||
exports.SSOServiceException$ = SSOServiceException$;
|
||||
exports.TooManyRequestsException = TooManyRequestsException;
|
||||
exports.TooManyRequestsException$ = TooManyRequestsException$;
|
||||
exports.UnauthorizedException = UnauthorizedException;
|
||||
exports.UnauthorizedException$ = UnauthorizedException$;
|
||||
exports.paginateListAccountRoles = paginateListAccountRoles;
|
||||
exports.paginateListAccounts = paginateListAccounts;
|
||||
|
||||
@@ -653,14 +566,13 @@ const hash_node_1 = __webpack_require__(5092);
|
||||
const middleware_retry_1 = __webpack_require__(9618);
|
||||
const node_config_provider_1 = __webpack_require__(5704);
|
||||
const node_http_handler_1 = __webpack_require__(1279);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_body_length_node_1 = __webpack_require__(3638);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const util_retry_1 = __webpack_require__(5518);
|
||||
const runtimeConfig_shared_1 = __webpack_require__(8073);
|
||||
const smithy_client_1 = __webpack_require__(1411);
|
||||
const util_defaults_mode_node_1 = __webpack_require__(5435);
|
||||
const smithy_client_2 = __webpack_require__(1411);
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
@@ -676,11 +588,9 @@ const getRuntimeConfig = (config) => {
|
||||
defaultsMode,
|
||||
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
||||
region: config?.region ??
|
||||
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
||||
retryMode: config?.retryMode ??
|
||||
(0, node_config_provider_1.loadConfig)({
|
||||
@@ -736,7 +646,12 @@ const getRuntimeConfig = (config) => {
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.sso" }),
|
||||
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.sso",
|
||||
version: "2019-06-10",
|
||||
serviceTarget: "SWBPortalService",
|
||||
},
|
||||
serviceId: config?.serviceId ?? "SSO",
|
||||
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
||||
@@ -927,7 +842,15 @@ const resolveAwsSdkSigV4Config = (config) => {
|
||||
});
|
||||
const boundProvider = bindCallerConfig(config, memoizedProvider);
|
||||
if (isUserSupplied && !boundProvider.attributed) {
|
||||
resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
|
||||
const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
|
||||
resolvedCredentials = async (options) => {
|
||||
const creds = await boundProvider(options);
|
||||
const attributedCreds = creds;
|
||||
if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
|
||||
return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
|
||||
}
|
||||
return attributedCreds;
|
||||
};
|
||||
resolvedCredentials.memoized = boundProvider.memoized;
|
||||
resolvedCredentials.configBound = boundProvider.configBound;
|
||||
resolvedCredentials.attributed = true;
|
||||
@@ -1073,7 +996,7 @@ const isSsoProfile = (arg) => arg &&
|
||||
typeof arg.sso_role_name === "string");
|
||||
|
||||
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
||||
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
|
||||
const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
|
||||
let token;
|
||||
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
|
||||
if (ssoSession) {
|
||||
@@ -1117,9 +1040,9 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
|
||||
const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(6553); });
|
||||
const sso = ssoClient ||
|
||||
new SSOClient(Object.assign({}, clientConfig ?? {}, {
|
||||
logger: clientConfig?.logger ?? parentClientConfig?.logger,
|
||||
logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
|
||||
region: clientConfig?.region ?? ssoRegion,
|
||||
userAgentAppId: clientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
|
||||
userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
|
||||
}));
|
||||
let ssoResp;
|
||||
try {
|
||||
@@ -1215,6 +1138,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
ssoClient: ssoClient,
|
||||
clientConfig: init.clientConfig,
|
||||
parentClientConfig: init.parentClientConfig,
|
||||
callerClientConfig: init.callerClientConfig,
|
||||
profile: profileName,
|
||||
filepath: init.filepath,
|
||||
configFilepath: init.configFilepath,
|
||||
@@ -1236,6 +1160,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
ssoClient,
|
||||
clientConfig: init.clientConfig,
|
||||
parentClientConfig: init.parentClientConfig,
|
||||
callerClientConfig: init.callerClientConfig,
|
||||
profile: profileName,
|
||||
filepath: init.filepath,
|
||||
configFilepath: init.configFilepath,
|
||||
@@ -1301,9 +1226,9 @@ const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
|
||||
const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
|
||||
const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
|
||||
|
||||
const getSsoOidcClient = async (ssoRegion, init = {}) => {
|
||||
const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
||||
const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19));
|
||||
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];
|
||||
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
|
||||
const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
|
||||
region: ssoRegion ?? init.clientConfig?.region,
|
||||
logger: coalesce("logger"),
|
||||
@@ -1312,9 +1237,9 @@ const getSsoOidcClient = async (ssoRegion, init = {}) => {
|
||||
return ssoOidcClient;
|
||||
};
|
||||
|
||||
const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
|
||||
const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
|
||||
const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19));
|
||||
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
|
||||
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
|
||||
return ssoOidcClient.send(new CreateTokenCommand({
|
||||
clientId: ssoToken.clientId,
|
||||
clientSecret: ssoToken.clientSecret,
|
||||
@@ -1343,14 +1268,7 @@ const writeSSOTokenToFile = (id, ssoToken) => {
|
||||
};
|
||||
|
||||
const lastRefreshAttemptTime = new Date(0);
|
||||
const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
const init = {
|
||||
..._init,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
..._init.parentClientConfig,
|
||||
},
|
||||
};
|
||||
const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
|
||||
const profileName = sharedIniFileLoader.getProfileName({
|
||||
@@ -1399,7 +1317,7 @@ const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
||||
try {
|
||||
lastRefreshAttemptTime.setTime(Date.now());
|
||||
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
|
||||
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
||||
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
||||
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
||||
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
|
||||
@@ -1447,7 +1365,7 @@ exports.nodeProvider = nodeProvider;
|
||||
/***/ 5188:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.933.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.932.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.932.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.932.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.2","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.9","@smithy/middleware-retry":"^4.4.9","@smithy/middleware-serde":"^4.2.5","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.5","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.8","@smithy/util-defaults-mode-node":"^4.2.11","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.975.0","scripts":{"build":"concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.2","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.1","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.11","@smithy/middleware-retry":"^4.4.27","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.12","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.26","@smithy/util-defaults-mode-node":"^4.2.29","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8","concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"engines":{"node":">=20.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
||||
+1708
-768
File diff suppressed because it is too large
Load Diff
+1715
-771
File diff suppressed because it is too large
Load Diff
Generated
+882
-545
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "configure-aws-credentials",
|
||||
"description": "A GitHub Action to configure AWS credentials",
|
||||
"version": "5.1.1",
|
||||
"version": "6.0.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "biome check --error-on-warnings ./src",
|
||||
@@ -16,25 +16,25 @@
|
||||
"organization": true
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-sdk/credential-provider-env": "^3.928.0",
|
||||
"@biomejs/biome": "2.3.6",
|
||||
"@smithy/property-provider": "^4.2.5",
|
||||
"@types/node": "^24.10.1",
|
||||
"@aws-sdk/credential-provider-env": "^3.970.0",
|
||||
"@biomejs/biome": "2.3.13",
|
||||
"@smithy/property-provider": "^4.2.7",
|
||||
"@types/node": "^25.2.0",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"aws-sdk-client-mock": "^4.1.0",
|
||||
"cpy-cli": "^6.0.0",
|
||||
"del-cli": "^7.0.0",
|
||||
"json-schema": "^0.4.0",
|
||||
"memfs": "^4.51.0",
|
||||
"memfs": "^4.56.10",
|
||||
"standard-version": "^9.5.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@aws-sdk/client-sts": "^3.933.0",
|
||||
"@smithy/node-http-handler": "^4.4.5",
|
||||
"@actions/core": "^2.0.2",
|
||||
"@aws-sdk/client-sts": "^3.975.0",
|
||||
"@smithy/node-http-handler": "^4.4.7",
|
||||
"proxy-agent": "^6.5.0"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -43,7 +43,7 @@
|
||||
"github-action"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
"node": ">= 16.3.0"
|
||||
},
|
||||
"main": "build/index.js",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"packages": {
|
||||
".": {
|
||||
"changelog-path": "CHANGELOG.md",
|
||||
"release-type": "node",
|
||||
"bump-minor-pre-major": false,
|
||||
"bump-patch-for-minor-pre-major": false,
|
||||
"draft": false,
|
||||
"prerelease": false,
|
||||
"exclude-paths": [".github", "dist"]
|
||||
}
|
||||
},
|
||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||
}
|
||||
@@ -12,12 +12,14 @@ export interface CredentialsClientProps {
|
||||
region?: string;
|
||||
proxyServer?: string;
|
||||
noProxy?: string;
|
||||
roleChaining: boolean;
|
||||
}
|
||||
|
||||
export class CredentialsClient {
|
||||
public region?: string;
|
||||
private _stsClient?: STSClient;
|
||||
private readonly requestHandler?: NodeHttpHandler;
|
||||
private roleChaining?: boolean;
|
||||
|
||||
constructor(props: CredentialsClientProps) {
|
||||
if (props.region !== undefined) {
|
||||
@@ -39,10 +41,11 @@ export class CredentialsClient {
|
||||
httpAgent: handler,
|
||||
});
|
||||
}
|
||||
this.roleChaining = props.roleChaining;
|
||||
}
|
||||
|
||||
public get stsClient(): STSClient {
|
||||
if (!this._stsClient) {
|
||||
if (!this._stsClient || this.roleChaining) {
|
||||
const config = { customUserAgent: USER_AGENT } as {
|
||||
customUserAgent: string;
|
||||
region?: string;
|
||||
|
||||
@@ -9,6 +9,7 @@ import { errorMessage, isDefined, sanitizeGitHubVariables } from './helpers';
|
||||
|
||||
async function assumeRoleWithOIDC(params: AssumeRoleCommandInput, client: STSClient, webIdentityToken: string) {
|
||||
delete params.Tags;
|
||||
delete params.TransitiveTagKeys;
|
||||
core.info('Assuming role with OIDC');
|
||||
try {
|
||||
const creds = await client.send(
|
||||
@@ -70,6 +71,7 @@ export interface assumeRoleParams {
|
||||
roleDuration: number;
|
||||
roleSessionName: string;
|
||||
roleSkipSessionTagging?: boolean;
|
||||
transitiveTagKeys?: string[];
|
||||
sourceAccountId?: string;
|
||||
roleExternalId?: string;
|
||||
webIdentityTokenFile?: string;
|
||||
@@ -87,6 +89,7 @@ export async function assumeRole(params: assumeRoleParams) {
|
||||
roleDuration,
|
||||
roleSessionName,
|
||||
roleSkipSessionTagging,
|
||||
transitiveTagKeys,
|
||||
webIdentityTokenFile,
|
||||
webIdentityToken,
|
||||
inlineSessionPolicy,
|
||||
@@ -121,6 +124,11 @@ export async function assumeRole(params: assumeRoleParams) {
|
||||
core.debug(`${tags.length} role session tags are being used.`);
|
||||
}
|
||||
|
||||
//only populate transitiveTagKeys array if user is actually using session tagging
|
||||
const transitiveTagKeysArray = roleSkipSessionTagging
|
||||
? undefined
|
||||
: transitiveTagKeys?.filter((key) => tags?.some((tag) => tag.Key === key));
|
||||
|
||||
// Calculate role ARN from name and account ID (currently only supports `aws` partition)
|
||||
let roleArn = roleToAssume;
|
||||
if (!roleArn.startsWith('arn:aws')) {
|
||||
@@ -137,6 +145,7 @@ export async function assumeRole(params: assumeRoleParams) {
|
||||
RoleSessionName: roleSessionName,
|
||||
DurationSeconds: roleDuration,
|
||||
Tags: tags ? tags : undefined,
|
||||
TransitiveTagKeys: transitiveTagKeysArray ? transitiveTagKeysArray : undefined,
|
||||
ExternalId: roleExternalId ? roleExternalId : undefined,
|
||||
Policy: inlineSessionPolicy ? inlineSessionPolicy : undefined,
|
||||
PolicyArns: managedSessionPolicies?.length ? managedSessionPolicies : undefined,
|
||||
|
||||
@@ -20,6 +20,7 @@ export function translateEnvVariables() {
|
||||
'ROLE_EXTERNAL_ID',
|
||||
'ROLE_SESSION_NAME',
|
||||
'ROLE_SKIP_SESSION_TAGGING',
|
||||
'TRANSITIVE_TAG_KEYS',
|
||||
'INLINE_SESSION_POLICY',
|
||||
'MANAGED_SESSION_POLICIES',
|
||||
'OUTPUT_CREDENTIALS',
|
||||
|
||||
+6
-1
@@ -38,6 +38,7 @@ export async function run() {
|
||||
Number.parseInt(core.getInput('role-duration-seconds', { required: false })) || DEFAULT_ROLE_DURATION;
|
||||
const roleSessionName = core.getInput('role-session-name', { required: false }) || ROLE_SESSION_NAME;
|
||||
const roleSkipSessionTagging = getBooleanInput('role-skip-session-tagging', { required: false });
|
||||
const transitiveTagKeys = core.getMultilineInput('transitive-tag-keys', { required: false });
|
||||
const proxyServer = core.getInput('http-proxy', { required: false }) || process.env.HTTP_PROXY;
|
||||
const inlineSessionPolicy = core.getInput('inline-session-policy', { required: false });
|
||||
const managedSessionPolicies = core.getMultilineInput('managed-session-policies', { required: false }).map((p) => {
|
||||
@@ -120,7 +121,10 @@ export async function run() {
|
||||
exportRegion(region, outputEnvCredentials);
|
||||
|
||||
// Instantiate credentials client
|
||||
const clientProps: { region: string; proxyServer?: string; noProxy?: string } = { region };
|
||||
const clientProps: { region: string; proxyServer?: string; noProxy?: string; roleChaining: boolean } = {
|
||||
region,
|
||||
roleChaining,
|
||||
};
|
||||
if (proxyServer) clientProps.proxyServer = proxyServer;
|
||||
if (noProxy) clientProps.noProxy = noProxy;
|
||||
const credentialsClient = new CredentialsClient(clientProps);
|
||||
@@ -189,6 +193,7 @@ export async function run() {
|
||||
roleDuration,
|
||||
roleSessionName,
|
||||
roleSkipSessionTagging,
|
||||
transitiveTagKeys,
|
||||
webIdentityTokenFile,
|
||||
webIdentityToken,
|
||||
inlineSessionPolicy,
|
||||
|
||||
Reference in New Issue
Block a user