@cdk8s/awscdk-resolver 0.0.409 → 0.0.411
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/README.md +8 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +736 -533
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/CloudFormation.js +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/DescribeEventsCommand.js +16 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/index.js +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/index.js +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/enums.js +520 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/errors.js +407 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_0.js +1 -805
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/DescribeChangeSetPaginator.js +4 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/DescribeEventsPaginator.js +4 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/index.js +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/schemas/schemas_0.js +162 -29
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +8 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +3 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/CreateChangeSetCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/CreateStackCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeChangeSetCommand.d.ts +20 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeChangeSetHooksCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeEventsCommand.d.ts +143 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeStackEventsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeStackResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeStackResourceDriftsCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeStackResourcesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeStacksCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DetectStackResourceDriftCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/GetHookResultCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListStackInstanceResourceDriftsCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListStackResourcesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListStackSetOperationResultsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListStackSetOperationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListStackSetsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListStacksCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListTypeRegistrationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListTypeVersionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListTypesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/PublishTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/RecordHandlerProgressCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/RegisterPublisherCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/RegisterTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/RollbackStackCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/SetStackPolicyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/SetTypeConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/SetTypeDefaultVersionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/SignalResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/StartResourceScanCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/StopStackSetOperationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/TestTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateGeneratedTemplateCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateStackCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateStackInstancesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateStackSetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateTerminationProtectionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ValidateTemplateCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/index.d.ts +3 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/enums.d.ts +1200 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/errors.d.ts +413 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +2950 -1454
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/DescribeChangeSetPaginator.d.ts +7 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/DescribeEventsPaginator.d.ts +7 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/schemas/schemas_0.d.ts +11 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormation.d.ts +18 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormationClient.d.ts +6 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/DescribeEventsCommand.d.ts +47 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListStackSetOperationResultsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListStackSetOperationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListStackSetsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListTypeRegistrationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListTypeVersionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListTypesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/PublishTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/RecordHandlerProgressCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/RegisterPublisherCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/RegisterTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/RollbackStackCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/SetStackPolicyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/SetTypeConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/SetTypeDefaultVersionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/SignalResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/StartResourceScanCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/StopStackSetOperationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/TestTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateGeneratedTemplateCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateStackCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateStackInstancesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateStackSetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateTerminationProtectionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ValidateTemplateCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/index.d.ts +3 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/enums.d.ts +669 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/errors.d.ts +264 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_0.d.ts +479 -798
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/DescribeChangeSetPaginator.d.ts +11 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/DescribeEventsPaginator.d.ts +11 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/schemas/schemas_0.d.ts +11 -0
- package/node_modules/@aws-sdk/client-cloudformation/package.json +19 -19
- package/node_modules/@aws-sdk/client-sso/dist-es/index.js +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-es/models/errors.js +49 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js +1 -49
- package/node_modules/@aws-sdk/client-sso/dist-es/schemas/schemas_0.js +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/index.d.ts +2 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/models/errors.d.ts +53 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/models/models_0.d.ts +0 -53
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/index.d.ts +2 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/errors.d.ts +30 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/models_0.d.ts +0 -30
- package/node_modules/@aws-sdk/client-sso/package.json +18 -18
- package/node_modules/@aws-sdk/core/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +15 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js +12 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts +4 -3
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveLoginCredentials.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts +3 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveLoginCredentials.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -9
- package/node_modules/@aws-sdk/credential-provider-login/README.md +7 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +286 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +262 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js +21 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/index.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/types.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/LoginCredentialsFetcher.d.ts +42 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/fromLoginCredentials.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/index.d.ts +8 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/LoginCredentialsFetcher.d.ts +24 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/fromLoginCredentials.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/index.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/types.d.ts +39 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/types.d.ts +59 -0
- package/node_modules/@aws-sdk/credential-provider-login/package.json +68 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js +56 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +439 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.browser.js +39 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.js +54 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.native.js +15 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js +42 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +10 -9
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js +50 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js +50 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +16 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/EndpointParameters.js +13 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +14 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/ruleset.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/extensionConfiguration.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/index.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +8 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +8 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js +57 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/models_0.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.browser.js +34 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +49 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.native.js +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +221 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/enums.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js +181 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js +1 -190
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +85 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js +1 -85
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +198 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +157 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/endpointResolver.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/ruleset.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/extensionConfiguration.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +16 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +14 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +34 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +102 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +142 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +59 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +59 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +58 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.shared.d.ts +33 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeExtensions.d.ts +17 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/schemas/schemas_0.d.ts +14 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/index.d.ts +3 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/enums.d.ts +25 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +279 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/models_0.d.ts +0 -303
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +108 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +0 -108
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +22 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/SigninClient.d.ts +127 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +51 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/endpointResolver.d.ts +8 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/ruleset.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/extensionConfiguration.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/index.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +35 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/models_0.d.ts +26 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +121 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +114 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +125 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.shared.d.ts +53 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeExtensions.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/schemas/schemas_0.d.ts +19 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/index.d.ts +3 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/enums.d.ts +13 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +105 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/models_0.d.ts +0 -114
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/index.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +54 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +0 -54
- package/node_modules/@aws-sdk/nested-clients/package.json +29 -18
- package/node_modules/@aws-sdk/nested-clients/signin.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/signin.js +5 -0
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +2 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +2 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +3 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpBindingProtocol.d.ts +6 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts +6 -2
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/smithy-client/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/package.json +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/index.js +0 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_1.js +0 -81
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/index.d.ts +0 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_1.d.ts +0 -2571
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/index.d.ts +0 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_1.d.ts +0 -433
- package/node_modules/@aws-sdk/client-sso/dist-es/models/index.js +0 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/models/index.d.ts +0 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/index.d.ts +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/index.d.ts +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/index.d.ts +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/index.d.ts +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/index.d.ts +0 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var sharedIniFileLoader = require('@smithy/shared-ini-file-loader');
|
|
4
4
|
var propertyProvider = require('@smithy/property-provider');
|
|
5
5
|
var client = require('@aws-sdk/core/client');
|
|
6
|
+
var credentialProviderLogin = require('@aws-sdk/credential-provider-login');
|
|
6
7
|
|
|
7
8
|
const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
8
9
|
const sourceProvidersMap = {
|
|
@@ -109,6 +110,17 @@ const isCredentialSourceWithoutRoleArn = (section) => {
|
|
|
109
110
|
return !section.role_arn && !!section.credential_source;
|
|
110
111
|
};
|
|
111
112
|
|
|
113
|
+
const isLoginProfile = (data) => {
|
|
114
|
+
return Boolean(data && data.login_session);
|
|
115
|
+
};
|
|
116
|
+
const resolveLoginCredentials = async (profileName, options) => {
|
|
117
|
+
const credentials = await credentialProviderLogin.fromLoginCredentials({
|
|
118
|
+
...options,
|
|
119
|
+
profile: profileName,
|
|
120
|
+
})();
|
|
121
|
+
return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
|
122
|
+
};
|
|
123
|
+
|
|
112
124
|
const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
|
113
125
|
const resolveProcessCredentials = async (options, profile) => import('@aws-sdk/credential-provider-process').then(({ fromProcess }) => fromProcess({
|
|
114
126
|
...options,
|
|
@@ -190,6 +202,9 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile
|
|
|
190
202
|
if (isSsoProfile(data)) {
|
|
191
203
|
return await resolveSsoCredentials(profileName, data, options);
|
|
192
204
|
}
|
|
205
|
+
if (isLoginProfile(data)) {
|
|
206
|
+
return resolveLoginCredentials(profileName, options);
|
|
207
|
+
}
|
|
193
208
|
throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
|
194
209
|
};
|
|
195
210
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
2
|
+
import { fromLoginCredentials } from "@aws-sdk/credential-provider-login";
|
|
3
|
+
export const isLoginProfile = (data) => {
|
|
4
|
+
return Boolean(data && data.login_session);
|
|
5
|
+
};
|
|
6
|
+
export const resolveLoginCredentials = async (profileName, options) => {
|
|
7
|
+
const credentials = await fromLoginCredentials({
|
|
8
|
+
...options,
|
|
9
|
+
profile: profileName,
|
|
10
|
+
})();
|
|
11
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
|
12
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
2
2
|
import { isAssumeRoleProfile, resolveAssumeRoleCredentials } from "./resolveAssumeRoleCredentials";
|
|
3
|
+
import { isLoginProfile, resolveLoginCredentials } from "./resolveLoginCredentials";
|
|
3
4
|
import { isProcessProfile, resolveProcessCredentials } from "./resolveProcessCredentials";
|
|
4
5
|
import { isSsoProfile, resolveSsoCredentials } from "./resolveSsoCredentials";
|
|
5
6
|
import { isStaticCredsProfile, resolveStaticCredentials } from "./resolveStaticCredentials";
|
|
@@ -24,5 +25,8 @@ export const resolveProfileData = async (profileName, profiles, options, visited
|
|
|
24
25
|
if (isSsoProfile(data)) {
|
|
25
26
|
return await resolveSsoCredentials(profileName, data, options);
|
|
26
27
|
}
|
|
28
|
+
if (isLoginProfile(data)) {
|
|
29
|
+
return resolveLoginCredentials(profileName, options);
|
|
30
|
+
}
|
|
27
31
|
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
|
28
32
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FromLoginCredentialsInit } from "@aws-sdk/credential-provider-login";
|
|
1
2
|
import type { AssumeRoleWithWebIdentityParams } from "@aws-sdk/credential-provider-web-identity";
|
|
2
3
|
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
|
3
4
|
import type { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
|
|
@@ -7,7 +8,7 @@ import { AssumeRoleParams } from "./resolveAssumeRoleCredentials";
|
|
|
7
8
|
/**
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
|
-
export interface FromIniInit extends SourceProfileInit, CredentialProviderOptions {
|
|
11
|
+
export interface FromIniInit extends SourceProfileInit, CredentialProviderOptions, FromLoginCredentialsInit {
|
|
11
12
|
/**
|
|
12
13
|
* A function that returns a promise fulfilled with an MFA token code for
|
|
13
14
|
* the provided MFA Serial code. If a profile requires an MFA code and
|
|
@@ -34,8 +35,8 @@ export interface FromIniInit extends SourceProfileInit, CredentialProviderOption
|
|
|
34
35
|
*/
|
|
35
36
|
roleAssumerWithWebIdentity?: (params: AssumeRoleWithWebIdentityParams) => Promise<AwsCredentialIdentity>;
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
-
* for auth operations.
|
|
38
|
+
* AWS SDK Client configuration to be used for creating inner client
|
|
39
|
+
* for auth operations. Inner clients include STS, SSO, and Signin clients.
|
|
39
40
|
* @internal
|
|
40
41
|
*/
|
|
41
42
|
clientConfig?: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
|
2
|
+
import type { FromIniInit } from "./fromIni";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const isLoginProfile: (data: ParsedIniData[string]) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const resolveLoginCredentials: (profileName: string, options: FromIniInit) => Promise<AwsCredentialIdentity>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FromLoginCredentialsInit } from "@aws-sdk/credential-provider-login";
|
|
1
2
|
import { AssumeRoleWithWebIdentityParams } from "@aws-sdk/credential-provider-web-identity";
|
|
2
3
|
import { CredentialProviderOptions } from "@aws-sdk/types";
|
|
3
4
|
import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
|
|
@@ -6,7 +7,8 @@ import { AwsCredentialIdentity, Pluggable } from "@smithy/types";
|
|
|
6
7
|
import { AssumeRoleParams } from "./resolveAssumeRoleCredentials";
|
|
7
8
|
export interface FromIniInit
|
|
8
9
|
extends SourceProfileInit,
|
|
9
|
-
CredentialProviderOptions
|
|
10
|
+
CredentialProviderOptions,
|
|
11
|
+
FromLoginCredentialsInit {
|
|
10
12
|
mfaCodeProvider?: (mfaSerial: string) => Promise<string>;
|
|
11
13
|
roleAssumer?: (
|
|
12
14
|
sourceCreds: AwsCredentialIdentity,
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveLoginCredentials.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
|
2
|
+
import { FromIniInit } from "./fromIni";
|
|
3
|
+
export declare const isLoginProfile: (data: ParsedIniData[string]) => boolean;
|
|
4
|
+
export declare const resolveLoginCredentials: (
|
|
5
|
+
profileName: string,
|
|
6
|
+
options: FromIniInit
|
|
7
|
+
) => Promise<AwsCredentialIdentity>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.936.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aws-sdk/core": "3.
|
|
32
|
-
"@aws-sdk/credential-provider-env": "3.
|
|
33
|
-
"@aws-sdk/credential-provider-http": "3.
|
|
34
|
-
"@aws-sdk/credential-provider-
|
|
35
|
-
"@aws-sdk/credential-provider-
|
|
36
|
-
"@aws-sdk/credential-provider-
|
|
37
|
-
"@aws-sdk/
|
|
38
|
-
"@aws-sdk/
|
|
31
|
+
"@aws-sdk/core": "3.936.0",
|
|
32
|
+
"@aws-sdk/credential-provider-env": "3.936.0",
|
|
33
|
+
"@aws-sdk/credential-provider-http": "3.936.0",
|
|
34
|
+
"@aws-sdk/credential-provider-login": "3.936.0",
|
|
35
|
+
"@aws-sdk/credential-provider-process": "3.936.0",
|
|
36
|
+
"@aws-sdk/credential-provider-sso": "3.936.0",
|
|
37
|
+
"@aws-sdk/credential-provider-web-identity": "3.936.0",
|
|
38
|
+
"@aws-sdk/nested-clients": "3.936.0",
|
|
39
|
+
"@aws-sdk/types": "3.936.0",
|
|
39
40
|
"@smithy/credential-provider-imds": "^4.2.5",
|
|
40
41
|
"@smithy/property-provider": "^4.2.5",
|
|
41
42
|
"@smithy/shared-ini-file-loader": "^4.4.0",
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('@aws-sdk/core/client');
|
|
4
|
+
var propertyProvider = require('@smithy/property-provider');
|
|
5
|
+
var sharedIniFileLoader = require('@smithy/shared-ini-file-loader');
|
|
6
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
7
|
+
var node_crypto = require('node:crypto');
|
|
8
|
+
var node_fs = require('node:fs');
|
|
9
|
+
var node_os = require('node:os');
|
|
10
|
+
var node_path = require('node:path');
|
|
11
|
+
|
|
12
|
+
class LoginCredentialsFetcher {
|
|
13
|
+
profileData;
|
|
14
|
+
init;
|
|
15
|
+
callerClientConfig;
|
|
16
|
+
static REFRESH_THRESHOLD = 5 * 60 * 1000;
|
|
17
|
+
constructor(profileData, init, callerClientConfig) {
|
|
18
|
+
this.profileData = profileData;
|
|
19
|
+
this.init = init;
|
|
20
|
+
this.callerClientConfig = callerClientConfig;
|
|
21
|
+
}
|
|
22
|
+
async loadCredentials() {
|
|
23
|
+
const token = await this.loadToken();
|
|
24
|
+
if (!token) {
|
|
25
|
+
throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
|
|
26
|
+
}
|
|
27
|
+
const accessToken = token.accessToken;
|
|
28
|
+
const now = Date.now();
|
|
29
|
+
const expiryTime = new Date(accessToken.expiresAt).getTime();
|
|
30
|
+
const timeUntilExpiry = expiryTime - now;
|
|
31
|
+
if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {
|
|
32
|
+
return this.refresh(token);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
accessKeyId: accessToken.accessKeyId,
|
|
36
|
+
secretAccessKey: accessToken.secretAccessKey,
|
|
37
|
+
sessionToken: accessToken.sessionToken,
|
|
38
|
+
accountId: accessToken.accountId,
|
|
39
|
+
expiration: new Date(accessToken.expiresAt),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
get logger() {
|
|
43
|
+
return this.init?.logger;
|
|
44
|
+
}
|
|
45
|
+
get loginSession() {
|
|
46
|
+
return this.profileData.login_session;
|
|
47
|
+
}
|
|
48
|
+
async refresh(token) {
|
|
49
|
+
const { SigninClient, CreateOAuth2TokenCommand } = await import('@aws-sdk/nested-clients/signin');
|
|
50
|
+
const { logger, userAgentAppId } = this.callerClientConfig ?? {};
|
|
51
|
+
const isH2 = (requestHandler) => {
|
|
52
|
+
return requestHandler?.metadata?.handlerProtocol === "h2";
|
|
53
|
+
};
|
|
54
|
+
const requestHandler = isH2(this.callerClientConfig?.requestHandler)
|
|
55
|
+
? undefined
|
|
56
|
+
: this.callerClientConfig?.requestHandler;
|
|
57
|
+
const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;
|
|
58
|
+
const client = new SigninClient({
|
|
59
|
+
credentials: {
|
|
60
|
+
accessKeyId: "",
|
|
61
|
+
secretAccessKey: "",
|
|
62
|
+
},
|
|
63
|
+
region,
|
|
64
|
+
requestHandler,
|
|
65
|
+
logger,
|
|
66
|
+
userAgentAppId,
|
|
67
|
+
...this.init?.clientConfig,
|
|
68
|
+
});
|
|
69
|
+
this.createDPoPInterceptor(client.middlewareStack);
|
|
70
|
+
const commandInput = {
|
|
71
|
+
tokenInput: {
|
|
72
|
+
clientId: token.clientId,
|
|
73
|
+
refreshToken: token.refreshToken,
|
|
74
|
+
grantType: "refresh_token",
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
try {
|
|
78
|
+
const response = await client.send(new CreateOAuth2TokenCommand(commandInput));
|
|
79
|
+
const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
|
|
80
|
+
const { refreshToken, expiresIn } = response.tokenOutput ?? {};
|
|
81
|
+
if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
|
|
82
|
+
throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", {
|
|
83
|
+
logger: this.logger,
|
|
84
|
+
tryNextLink: false,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const expiresInMs = (expiresIn ?? 900) * 1000;
|
|
88
|
+
const expiration = new Date(Date.now() + expiresInMs);
|
|
89
|
+
const updatedToken = {
|
|
90
|
+
...token,
|
|
91
|
+
accessToken: {
|
|
92
|
+
...token.accessToken,
|
|
93
|
+
accessKeyId: accessKeyId,
|
|
94
|
+
secretAccessKey: secretAccessKey,
|
|
95
|
+
sessionToken: sessionToken,
|
|
96
|
+
expiresAt: expiration.toISOString(),
|
|
97
|
+
},
|
|
98
|
+
refreshToken: refreshToken,
|
|
99
|
+
};
|
|
100
|
+
await this.saveToken(updatedToken);
|
|
101
|
+
const newAccessToken = updatedToken.accessToken;
|
|
102
|
+
return {
|
|
103
|
+
accessKeyId: newAccessToken.accessKeyId,
|
|
104
|
+
secretAccessKey: newAccessToken.secretAccessKey,
|
|
105
|
+
sessionToken: newAccessToken.sessionToken,
|
|
106
|
+
accountId: newAccessToken.accountId,
|
|
107
|
+
expiration,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (error.name === "AccessDeniedException") {
|
|
112
|
+
const errorType = error.error;
|
|
113
|
+
let message;
|
|
114
|
+
switch (errorType) {
|
|
115
|
+
case "TOKEN_EXPIRED":
|
|
116
|
+
message = "Your session has expired. Please reauthenticate.";
|
|
117
|
+
break;
|
|
118
|
+
case "USER_CREDENTIALS_CHANGED":
|
|
119
|
+
message =
|
|
120
|
+
"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";
|
|
121
|
+
break;
|
|
122
|
+
case "INSUFFICIENT_PERMISSIONS":
|
|
123
|
+
message =
|
|
124
|
+
"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";
|
|
125
|
+
break;
|
|
126
|
+
default:
|
|
127
|
+
message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
|
|
128
|
+
}
|
|
129
|
+
throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
|
|
130
|
+
}
|
|
131
|
+
throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async loadToken() {
|
|
135
|
+
const tokenFilePath = this.getTokenFilePath();
|
|
136
|
+
try {
|
|
137
|
+
let tokenData;
|
|
138
|
+
try {
|
|
139
|
+
tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8");
|
|
143
|
+
}
|
|
144
|
+
const token = JSON.parse(tokenData);
|
|
145
|
+
const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]);
|
|
146
|
+
if (!token.accessToken?.accountId) {
|
|
147
|
+
missingFields.push("accountId");
|
|
148
|
+
}
|
|
149
|
+
if (missingFields.length > 0) {
|
|
150
|
+
throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
|
|
151
|
+
logger: this.logger,
|
|
152
|
+
tryNextLink: false,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return token;
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
|
|
159
|
+
logger: this.logger,
|
|
160
|
+
tryNextLink: false,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
async saveToken(token) {
|
|
165
|
+
const tokenFilePath = this.getTokenFilePath();
|
|
166
|
+
const directory = node_path.dirname(tokenFilePath);
|
|
167
|
+
try {
|
|
168
|
+
await node_fs.promises.mkdir(directory, { recursive: true });
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
}
|
|
172
|
+
await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
173
|
+
}
|
|
174
|
+
getTokenFilePath() {
|
|
175
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), ".aws", "login", "cache");
|
|
176
|
+
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
177
|
+
const loginSessionSha256 = node_crypto.createHash("sha256").update(loginSessionBytes).digest("hex");
|
|
178
|
+
return node_path.join(directory, `${loginSessionSha256}.json`);
|
|
179
|
+
}
|
|
180
|
+
derToRawSignature(derSignature) {
|
|
181
|
+
let offset = 2;
|
|
182
|
+
if (derSignature[offset] !== 0x02) {
|
|
183
|
+
throw new Error("Invalid DER signature");
|
|
184
|
+
}
|
|
185
|
+
offset++;
|
|
186
|
+
const rLength = derSignature[offset++];
|
|
187
|
+
let r = derSignature.subarray(offset, offset + rLength);
|
|
188
|
+
offset += rLength;
|
|
189
|
+
if (derSignature[offset] !== 0x02) {
|
|
190
|
+
throw new Error("Invalid DER signature");
|
|
191
|
+
}
|
|
192
|
+
offset++;
|
|
193
|
+
const sLength = derSignature[offset++];
|
|
194
|
+
let s = derSignature.subarray(offset, offset + sLength);
|
|
195
|
+
r = r[0] === 0x00 ? r.subarray(1) : r;
|
|
196
|
+
s = s[0] === 0x00 ? s.subarray(1) : s;
|
|
197
|
+
const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);
|
|
198
|
+
const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);
|
|
199
|
+
return Buffer.concat([rPadded, sPadded]);
|
|
200
|
+
}
|
|
201
|
+
createDPoPInterceptor(middlewareStack) {
|
|
202
|
+
middlewareStack.add((next) => async (args) => {
|
|
203
|
+
if (protocolHttp.HttpRequest.isInstance(args.request)) {
|
|
204
|
+
const request = args.request;
|
|
205
|
+
const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`;
|
|
206
|
+
const dpop = await this.generateDpop(request.method, actualEndpoint);
|
|
207
|
+
request.headers = {
|
|
208
|
+
...request.headers,
|
|
209
|
+
DPoP: dpop,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
return next(args);
|
|
213
|
+
}, {
|
|
214
|
+
step: "finalizeRequest",
|
|
215
|
+
name: "dpopInterceptor",
|
|
216
|
+
override: true,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
async generateDpop(method = "POST", endpoint) {
|
|
220
|
+
const token = await this.loadToken();
|
|
221
|
+
try {
|
|
222
|
+
const privateKey = node_crypto.createPrivateKey({
|
|
223
|
+
key: token.dpopKey,
|
|
224
|
+
format: "pem",
|
|
225
|
+
type: "sec1",
|
|
226
|
+
});
|
|
227
|
+
const publicKey = node_crypto.createPublicKey(privateKey);
|
|
228
|
+
const publicDer = publicKey.export({ format: "der", type: "spki" });
|
|
229
|
+
let pointStart = -1;
|
|
230
|
+
for (let i = 0; i < publicDer.length; i++) {
|
|
231
|
+
if (publicDer[i] === 0x04) {
|
|
232
|
+
pointStart = i;
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
const x = publicDer.slice(pointStart + 1, pointStart + 33);
|
|
237
|
+
const y = publicDer.slice(pointStart + 33, pointStart + 65);
|
|
238
|
+
const header = {
|
|
239
|
+
alg: "ES256",
|
|
240
|
+
typ: "dpop+jwt",
|
|
241
|
+
jwk: {
|
|
242
|
+
kty: "EC",
|
|
243
|
+
crv: "P-256",
|
|
244
|
+
x: x.toString("base64url"),
|
|
245
|
+
y: y.toString("base64url"),
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
const payload = {
|
|
249
|
+
jti: crypto.randomUUID(),
|
|
250
|
+
htm: method,
|
|
251
|
+
htu: endpoint,
|
|
252
|
+
iat: Math.floor(Date.now() / 1000),
|
|
253
|
+
};
|
|
254
|
+
const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url");
|
|
255
|
+
const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url");
|
|
256
|
+
const message = `${headerB64}.${payloadB64}`;
|
|
257
|
+
const asn1Signature = node_crypto.sign("sha256", Buffer.from(message), privateKey);
|
|
258
|
+
const rawSignature = this.derToRawSignature(asn1Signature);
|
|
259
|
+
const signatureB64 = rawSignature.toString("base64url");
|
|
260
|
+
return `${message}.${signatureB64}`;
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
|
|
269
|
+
init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
|
|
270
|
+
const profiles = await sharedIniFileLoader.parseKnownFiles(init || {});
|
|
271
|
+
const profileName = sharedIniFileLoader.getProfileName({
|
|
272
|
+
profile: init?.profile ?? callerClientConfig?.profile,
|
|
273
|
+
});
|
|
274
|
+
const profile = profiles[profileName];
|
|
275
|
+
if (!profile?.login_session) {
|
|
276
|
+
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
|
|
277
|
+
tryNextLink: true,
|
|
278
|
+
logger: init?.logger,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
|
|
282
|
+
const credentials = await fetcher.loadCredentials();
|
|
283
|
+
return client.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
exports.fromLoginCredentials = fromLoginCredentials;
|