serverless-spy 0.0.28 → 0.0.29
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 +15 -15
- package/dist/releasetag.txt +1 -1
- package/lib/extension/dist/layer/nodejs/node_modules/interceptor.js +144 -92
- package/lib/extension/dist/layer/nodejs/node_modules/interceptor.js.map +3 -3
- package/lib/src/ServerlessSpy.js +1 -1
- package/node_modules/@aws-sdk/abort-controller/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/abort-controller/package.json +2 -2
- package/node_modules/@aws-sdk/client-apigatewaymanagementapi/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-apigatewaymanagementapi/package.json +26 -26
- package/node_modules/@aws-sdk/client-cognito-identity/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-cognito-identity/package.json +27 -27
- package/node_modules/@aws-sdk/client-dynamodb/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-dynamodb/package.json +28 -28
- package/node_modules/@aws-sdk/client-eventbridge/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-eventbridge/package.json +28 -28
- package/node_modules/@aws-sdk/client-lambda/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-lambda/package.json +27 -27
- package/node_modules/@aws-sdk/client-s3/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-s3/package.json +42 -42
- package/node_modules/@aws-sdk/client-sns/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-sns/package.json +26 -26
- package/node_modules/@aws-sdk/client-sqs/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-sqs/package.json +28 -28
- package/node_modules/@aws-sdk/client-sso/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-sso/package.json +23 -23
- package/node_modules/@aws-sdk/client-sts/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/client-sts/package.json +26 -26
- package/node_modules/@aws-sdk/config-resolver/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-cognito-identity/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-env/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-imds/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-imds/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-process/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/credential-providers/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/credential-providers/package.json +15 -15
- package/node_modules/@aws-sdk/eventstream-codec/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/eventstream-codec/package.json +2 -2
- package/node_modules/@aws-sdk/eventstream-serde-browser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/eventstream-serde-browser/package.json +3 -3
- package/node_modules/@aws-sdk/eventstream-serde-config-resolver/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/eventstream-serde-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/eventstream-serde-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/eventstream-serde-node/package.json +3 -3
- package/node_modules/@aws-sdk/eventstream-serde-universal/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/eventstream-serde-universal/package.json +3 -3
- package/node_modules/@aws-sdk/fetch-http-handler/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/fetch-http-handler/package.json +5 -5
- package/node_modules/@aws-sdk/hash-blob-browser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/hash-blob-browser/package.json +2 -2
- package/node_modules/@aws-sdk/hash-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/hash-node/package.json +2 -2
- package/node_modules/@aws-sdk/hash-stream-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/hash-stream-node/package.json +2 -2
- package/node_modules/@aws-sdk/invalid-dependency/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/invalid-dependency/package.json +2 -2
- package/node_modules/@aws-sdk/lib-dynamodb/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/lib-dynamodb/package.json +5 -5
- package/node_modules/@aws-sdk/md5-js/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/md5-js/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-bucket-endpoint/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-content-length/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-content-length/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-endpoint-discovery/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-endpoint-discovery/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-expect-continue/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-expect-continue/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-flexible-checksums/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-host-header/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-host-header/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-location-constraint/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-location-constraint/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-retry/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-retry/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-sdk-eventbridge/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-sdk-eventbridge/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-sqs/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-sdk-sts/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-serde/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-serde/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-signing/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-signing/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-ssec/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-ssec/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-stack/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-stack/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -4
- package/node_modules/@aws-sdk/node-config-provider/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/node-config-provider/package.json +4 -4
- package/node_modules/@aws-sdk/node-http-handler/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/node-http-handler/package.json +5 -5
- package/node_modules/@aws-sdk/property-provider/CHANGELOG.md +11 -0
- package/node_modules/@aws-sdk/property-provider/dist-cjs/TokenProviderError.js +13 -0
- package/node_modules/@aws-sdk/property-provider/dist-cjs/index.js +1 -0
- package/node_modules/@aws-sdk/property-provider/dist-es/TokenProviderError.js +15 -0
- package/node_modules/@aws-sdk/property-provider/dist-es/index.js +1 -0
- package/node_modules/@aws-sdk/property-provider/dist-types/TokenProviderError.d.ts +15 -0
- package/node_modules/@aws-sdk/property-provider/dist-types/index.d.ts +1 -0
- package/node_modules/@aws-sdk/property-provider/dist-types/ts3.4/TokenProviderError.d.ts +7 -0
- package/node_modules/@aws-sdk/property-provider/dist-types/ts3.4/index.d.ts +1 -0
- package/node_modules/@aws-sdk/property-provider/package.json +2 -2
- package/node_modules/@aws-sdk/protocol-http/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/protocol-http/package.json +2 -2
- package/node_modules/@aws-sdk/querystring-builder/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/querystring-builder/package.json +2 -2
- package/node_modules/@aws-sdk/querystring-parser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/querystring-parser/package.json +2 -2
- package/node_modules/@aws-sdk/service-error-classification/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/service-error-classification/package.json +2 -2
- package/node_modules/@aws-sdk/shared-ini-file-loader/CHANGELOG.md +11 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/getSsoSessionData.js +8 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/index.js +1 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js +16 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-es/getSsoSessionData.js +14 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-es/index.js +1 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-es/loadSsoSessionData.js +18 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts +6 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/index.d.ts +1 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts +10 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts +3 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/ts3.4/index.d.ts +1 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts +6 -0
- package/node_modules/@aws-sdk/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@aws-sdk/signature-v4/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/signature-v4/package.json +4 -4
- package/node_modules/@aws-sdk/signature-v4-multi-region/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
- package/node_modules/@aws-sdk/smithy-client/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/smithy-client/package.json +3 -3
- package/node_modules/@aws-sdk/types/CHANGELOG.md +12 -0
- package/node_modules/@aws-sdk/types/dist-cjs/endpoint.js +8 -0
- package/node_modules/@aws-sdk/types/dist-cjs/index.js +2 -0
- package/node_modules/@aws-sdk/types/dist-cjs/token.js +2 -0
- package/node_modules/@aws-sdk/types/dist-es/endpoint.js +5 -0
- package/node_modules/@aws-sdk/types/dist-es/index.js +2 -0
- package/node_modules/@aws-sdk/types/dist-es/token.js +1 -0
- package/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts +23 -0
- package/node_modules/@aws-sdk/types/dist-types/index.d.ts +2 -0
- package/node_modules/@aws-sdk/types/dist-types/token.d.ts +16 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts +14 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +2 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts +9 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/url-parser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/url-parser/package.json +3 -3
- package/node_modules/@aws-sdk/util-defaults-mode-browser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@aws-sdk/util-defaults-mode-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@aws-sdk/util-dynamodb/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-dynamodb/package.json +2 -2
- package/node_modules/@aws-sdk/util-middleware/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-middleware/package.json +2 -2
- package/node_modules/@aws-sdk/util-stream-browser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-stream-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-stream-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-stream-node/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +4 -4
- package/node_modules/@aws-sdk/util-waiter/CHANGELOG.md +8 -0
- package/node_modules/@aws-sdk/util-waiter/package.json +3 -3
- package/node_modules/@serverless-stack/node/.turbo/turbo-build.log +1 -1
- package/node_modules/@serverless-stack/node/CHANGELOG.md +6 -0
- package/node_modules/@serverless-stack/node/package.json +1 -1
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/CHANGELOG.md +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/LICENSE +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/README.md +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/index.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/append/constant.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/append.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/count.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/help.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/store/constant.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/store/false.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/store/true.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/store.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/subparsers.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action/version.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/action_container.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/argparse.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/argument/error.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/argument/exclusive.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/argument/group.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/argument_parser.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/const.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/help/added_formatters.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/help/formatter.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/namespace.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/lib/utils.js +0 -0
- package/node_modules/{aws-lambda/node_modules/argparse → argparse}/package.json +0 -0
- package/node_modules/aws-sdk/CHANGELOG.md +18 -1
- package/node_modules/aws-sdk/README.md +1 -1
- package/node_modules/aws-sdk/apis/cloudfront-2020-05-31.min.json +350 -82
- package/node_modules/aws-sdk/apis/config-2014-11-12.min.json +107 -91
- package/node_modules/aws-sdk/apis/iotwireless-2020-11-22.min.json +123 -79
- package/node_modules/aws-sdk/apis/mediapackage-2017-10-12.min.json +7 -0
- package/node_modules/aws-sdk/apis/panorama-2019-07-24.min.json +47 -10
- package/node_modules/aws-sdk/apis/quicksight-2018-04-01.min.json +64 -29
- package/node_modules/aws-sdk/apis/sso-oidc-2019-06-10.min.json +1 -2
- package/node_modules/aws-sdk/clients/cloudfront.d.ts +246 -4
- package/node_modules/aws-sdk/clients/configservice.d.ts +27 -7
- package/node_modules/aws-sdk/clients/elbv2.d.ts +1 -1
- package/node_modules/aws-sdk/clients/gamelift.d.ts +1 -1
- package/node_modules/aws-sdk/clients/iam.d.ts +6 -6
- package/node_modules/aws-sdk/clients/iotwireless.d.ts +60 -11
- package/node_modules/aws-sdk/clients/ivs.d.ts +3 -3
- package/node_modules/aws-sdk/clients/mediapackage.d.ts +2 -0
- package/node_modules/aws-sdk/clients/panorama.d.ts +62 -0
- package/node_modules/aws-sdk/clients/quicksight.d.ts +38 -4
- package/node_modules/aws-sdk/clients/rds.d.ts +5 -5
- package/node_modules/aws-sdk/clients/ssooidc.d.ts +12 -12
- package/node_modules/aws-sdk/clients/transfer.d.ts +20 -20
- package/node_modules/aws-sdk/dist/aws-sdk-core-react-native.js +151 -31
- package/node_modules/aws-sdk/dist/aws-sdk-react-native.js +160 -40
- package/node_modules/aws-sdk/dist/aws-sdk.js +687 -287
- package/node_modules/aws-sdk/dist/aws-sdk.min.js +85 -85
- package/node_modules/aws-sdk/lib/config-base.d.ts +14 -0
- package/node_modules/aws-sdk/lib/config.js +78 -1
- package/node_modules/aws-sdk/lib/core.js +1 -1
- package/node_modules/aws-sdk/lib/event_listeners.js +49 -30
- package/node_modules/aws-sdk/lib/node_loader.js +17 -1
- package/node_modules/aws-sdk/lib/service.js +2 -0
- package/node_modules/aws-sdk/lib/shared-ini/ini-loader.d.ts +1 -12
- package/node_modules/aws-sdk/lib/shared-ini/ini-loader.js +68 -30
- package/node_modules/aws-sdk/lib/signers/bearer.js +14 -0
- package/node_modules/aws-sdk/lib/signers/request_signer.js +2 -0
- package/node_modules/aws-sdk/lib/token/sso_token_provider.d.ts +12 -0
- package/node_modules/aws-sdk/lib/token/sso_token_provider.js +245 -0
- package/node_modules/aws-sdk/lib/token/static_token_provider.d.ts +8 -0
- package/node_modules/aws-sdk/lib/token/static_token_provider.js +27 -0
- package/node_modules/aws-sdk/lib/token/token_provider_chain.d.ts +24 -0
- package/node_modules/aws-sdk/lib/token/token_provider_chain.js +165 -0
- package/node_modules/aws-sdk/lib/token.d.ts +101 -0
- package/node_modules/aws-sdk/lib/token.js +219 -0
- package/node_modules/aws-sdk/package.json +1 -1
- package/node_modules/aws-sdk/scripts/region-checker/allowlist.js +4 -1
- package/node_modules/{aws-lambda/node_modules/commander → commander}/CHANGELOG.md +0 -0
- package/node_modules/{aws-lambda/node_modules/commander → commander}/LICENSE +0 -0
- package/node_modules/{aws-lambda/node_modules/commander → commander}/Readme.md +0 -0
- package/node_modules/{aws-lambda/node_modules/commander → commander}/index.js +0 -0
- package/node_modules/{aws-lambda/node_modules/commander → commander}/package.json +0 -0
- package/node_modules/{aws-lambda/node_modules/commander → commander}/typings/index.d.ts +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/LICENSE +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/decode.d.ts +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/decode.d.ts.map +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/decode.js +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/decode_codepoint.d.ts +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/decode_codepoint.d.ts.map +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/decode_codepoint.js +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/encode.d.ts +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/encode.d.ts.map +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/encode.js +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/index.d.ts +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/index.d.ts.map +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/index.js +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/maps/decode.json +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/maps/entities.json +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/maps/legacy.json +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/lib/maps/xml.json +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/package.json +0 -0
- package/node_modules/{@aws-sdk/client-s3/node_modules/entities → entities}/readme.md +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/CHANGELOG.md +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/LICENSE +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/README.md +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/bin/js-yaml.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/dist/js-yaml.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/dist/js-yaml.min.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/index.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/common.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/dumper.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/exception.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/loader.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/mark.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/core.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/default_full.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/default_safe.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/failsafe.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/json.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/binary.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/bool.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/float.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/int.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/function.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/regexp.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/undefined.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/map.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/merge.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/null.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/omap.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/pairs.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/seq.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/set.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/str.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/timestamp.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml.js +0 -0
- package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/package.json +0 -0
- package/node_modules/object.assign/CHANGELOG.md +4 -0
- package/node_modules/object.assign/dist/browser.js +944 -0
- package/node_modules/object.assign/package.json +3 -2
- package/package.json +17 -17
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/LICENSE +0 -11
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/decode.d.ts +0 -5
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/decode.js +0 -53
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/decode_codepoint.d.ts +0 -2
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/decode_codepoint.js +0 -30
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/encode.d.ts +0 -47
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/encode.js +0 -136
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/index.d.ts +0 -27
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/index.js +0 -57
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/maps/decode.json +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/maps/entities.json +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/maps/legacy.json +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/lib/maps/xml.json +0 -1
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/package.json +0 -64
- package/node_modules/@aws-sdk/client-sns/node_modules/entities/readme.md +0 -57
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/LICENSE +0 -11
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/decode.d.ts +0 -5
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/decode.js +0 -53
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/decode_codepoint.d.ts +0 -2
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/decode_codepoint.js +0 -30
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/encode.d.ts +0 -47
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/encode.js +0 -136
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/index.d.ts +0 -27
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/index.js +0 -57
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/maps/decode.json +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/maps/entities.json +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/maps/legacy.json +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/lib/maps/xml.json +0 -1
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/package.json +0 -64
- package/node_modules/@aws-sdk/client-sqs/node_modules/entities/readme.md +0 -57
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/LICENSE +0 -11
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/decode.d.ts +0 -5
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/decode.js +0 -53
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/decode_codepoint.d.ts +0 -2
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/decode_codepoint.js +0 -30
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/encode.d.ts +0 -47
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/encode.js +0 -136
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/index.d.ts +0 -27
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/index.js +0 -57
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/maps/decode.json +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/maps/entities.json +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/maps/legacy.json +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/lib/maps/xml.json +0 -1
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/package.json +0 -64
- package/node_modules/@aws-sdk/client-ssm/node_modules/entities/readme.md +0 -57
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/LICENSE +0 -11
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/decode.d.ts +0 -5
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/decode.js +0 -53
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/decode_codepoint.d.ts +0 -2
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/decode_codepoint.js +0 -30
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/encode.d.ts +0 -47
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/encode.js +0 -136
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/index.d.ts +0 -27
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/index.js +0 -57
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/maps/decode.json +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/maps/entities.json +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/maps/legacy.json +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/lib/maps/xml.json +0 -1
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/package.json +0 -64
- package/node_modules/@aws-sdk/client-sts/node_modules/entities/readme.md +0 -57
|
@@ -3,6 +3,8 @@ import {Agent as httpsAgent} from 'https';
|
|
|
3
3
|
import {AWSError} from './error';
|
|
4
4
|
import {Credentials, CredentialsOptions} from './credentials';
|
|
5
5
|
import {CredentialProviderChain} from './credentials/credential_provider_chain';
|
|
6
|
+
import {Token} from './token';
|
|
7
|
+
import {TokenProviderChain} from './token/token_provider_chain';
|
|
6
8
|
|
|
7
9
|
export class ConfigBase extends ConfigurationOptions{
|
|
8
10
|
constructor(options?: ConfigurationOptions);
|
|
@@ -10,6 +12,10 @@ export class ConfigBase extends ConfigurationOptions{
|
|
|
10
12
|
* Loads credentials from the configuration object.
|
|
11
13
|
*/
|
|
12
14
|
getCredentials(callback: (err: AWSError|null, credentials: Credentials|CredentialsOptions|null) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* Loads token from the token object.
|
|
17
|
+
*/
|
|
18
|
+
getToken(callback: (err: AWSError|null, token: Token|null) => void): void;
|
|
13
19
|
/**
|
|
14
20
|
* Loads configuration data from a JSON file into this config object.
|
|
15
21
|
* Loading configuration will reset all existing configuration on the object.
|
|
@@ -149,6 +155,14 @@ export abstract class ConfigurationOptions {
|
|
|
149
155
|
* The provider chain used to resolve credentials if no static credentials property is set.
|
|
150
156
|
*/
|
|
151
157
|
credentialProvider?: CredentialProviderChain
|
|
158
|
+
/**
|
|
159
|
+
* The Token to authenticate requests with.
|
|
160
|
+
*/
|
|
161
|
+
token?: Token|null
|
|
162
|
+
/**
|
|
163
|
+
* The provider chain used to resolve token if no static token property is set.
|
|
164
|
+
*/
|
|
165
|
+
tokenProvider?: TokenProviderChain
|
|
152
166
|
/**
|
|
153
167
|
* AWS access key ID.
|
|
154
168
|
*
|
|
@@ -442,6 +442,82 @@ AWS.Config = AWS.util.inherit({
|
|
|
442
442
|
}
|
|
443
443
|
},
|
|
444
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Loads token from the configuration object. This is used internally
|
|
447
|
+
* by the SDK to ensure that refreshable {Token} objects are properly
|
|
448
|
+
* refreshed and loaded when sending a request. If you want to ensure that
|
|
449
|
+
* your token is loaded prior to a request, you can use this method
|
|
450
|
+
* directly to provide accurate token data stored in the object.
|
|
451
|
+
*
|
|
452
|
+
* @note If you configure the SDK with static token, the token data should
|
|
453
|
+
* already be present in {token} attribute. This method is primarily necessary
|
|
454
|
+
* to load token from asynchronous sources, or sources that can refresh
|
|
455
|
+
* token periodically.
|
|
456
|
+
* @example Getting your access token
|
|
457
|
+
* AWS.config.getToken(function(err) {
|
|
458
|
+
* if (err) console.log(err.stack); // token not loaded
|
|
459
|
+
* else console.log("Token:", AWS.config.token.token);
|
|
460
|
+
* })
|
|
461
|
+
* @callback callback function(err)
|
|
462
|
+
* Called when the {token} have been properly set on the configuration object.
|
|
463
|
+
*
|
|
464
|
+
* @param err [Error] if this is set, token was not successfully loaded and
|
|
465
|
+
* this error provides information why.
|
|
466
|
+
* @see token
|
|
467
|
+
*/
|
|
468
|
+
getToken: function getToken(callback) {
|
|
469
|
+
var self = this;
|
|
470
|
+
|
|
471
|
+
function finish(err) {
|
|
472
|
+
callback(err, err ? null : self.token);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function tokenError(msg, err) {
|
|
476
|
+
return new AWS.util.error(err || new Error(), {
|
|
477
|
+
code: 'TokenError',
|
|
478
|
+
message: msg,
|
|
479
|
+
name: 'TokenError'
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function getAsyncToken() {
|
|
484
|
+
self.token.get(function(err) {
|
|
485
|
+
if (err) {
|
|
486
|
+
var msg = 'Could not load token from ' +
|
|
487
|
+
self.token.constructor.name;
|
|
488
|
+
err = tokenError(msg, err);
|
|
489
|
+
}
|
|
490
|
+
finish(err);
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
function getStaticToken() {
|
|
495
|
+
var err = null;
|
|
496
|
+
if (!self.token.token) {
|
|
497
|
+
err = tokenError('Missing token');
|
|
498
|
+
}
|
|
499
|
+
finish(err);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if (self.token) {
|
|
503
|
+
if (typeof self.token.get === 'function') {
|
|
504
|
+
getAsyncToken();
|
|
505
|
+
} else { // static token
|
|
506
|
+
getStaticToken();
|
|
507
|
+
}
|
|
508
|
+
} else if (self.tokenProvider) {
|
|
509
|
+
self.tokenProvider.resolve(function(err, token) {
|
|
510
|
+
if (err) {
|
|
511
|
+
err = tokenError('Could not load token from any providers', err);
|
|
512
|
+
}
|
|
513
|
+
self.token = token;
|
|
514
|
+
finish(err);
|
|
515
|
+
});
|
|
516
|
+
} else {
|
|
517
|
+
finish(tokenError('No token to load'));
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
|
|
445
521
|
/**
|
|
446
522
|
* @!group Loading and Setting Configuration Options
|
|
447
523
|
*/
|
|
@@ -575,7 +651,8 @@ AWS.Config = AWS.util.inherit({
|
|
|
575
651
|
hostPrefixEnabled: true,
|
|
576
652
|
stsRegionalEndpoints: 'legacy',
|
|
577
653
|
useFipsEndpoint: false,
|
|
578
|
-
useDualstackEndpoint: false
|
|
654
|
+
useDualstackEndpoint: false,
|
|
655
|
+
token: null
|
|
579
656
|
},
|
|
580
657
|
|
|
581
658
|
/**
|
|
@@ -255,37 +255,56 @@ AWS.EventListeners = {
|
|
|
255
255
|
var authtype = operation ? operation.authtype : '';
|
|
256
256
|
if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none
|
|
257
257
|
|
|
258
|
-
service.config.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
258
|
+
if (authtype === 'bearer' || service.config.signatureVersion === 'bearer') {
|
|
259
|
+
service.config.getToken(function (err, token) {
|
|
260
|
+
if (err) {
|
|
261
|
+
req.response.error = err;
|
|
262
|
+
return done();
|
|
263
|
+
}
|
|
263
264
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
265
|
+
try {
|
|
266
|
+
var SignerClass = service.getSignerClass(req);
|
|
267
|
+
var signer = new SignerClass(req.httpRequest);
|
|
268
|
+
signer.addAuthorization(token);
|
|
269
|
+
} catch (e) {
|
|
270
|
+
req.response.error = e;
|
|
271
|
+
}
|
|
272
|
+
done();
|
|
273
|
+
});
|
|
274
|
+
} else {
|
|
275
|
+
service.config.getCredentials(function (err, credentials) {
|
|
276
|
+
if (err) {
|
|
277
|
+
req.response.error = err;
|
|
278
|
+
return done();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
try {
|
|
282
|
+
var date = service.getSkewCorrectedDate();
|
|
283
|
+
var SignerClass = service.getSignerClass(req);
|
|
284
|
+
var signer = new SignerClass(req.httpRequest,
|
|
285
|
+
service.getSigningName(req),
|
|
286
|
+
{
|
|
287
|
+
signatureCache: service.config.signatureCache,
|
|
288
|
+
operation: operation,
|
|
289
|
+
signatureVersion: service.api.signatureVersion
|
|
290
|
+
});
|
|
291
|
+
signer.setServiceClientId(service._clientId);
|
|
292
|
+
|
|
293
|
+
// clear old authorization headers
|
|
294
|
+
delete req.httpRequest.headers['Authorization'];
|
|
295
|
+
delete req.httpRequest.headers['Date'];
|
|
296
|
+
delete req.httpRequest.headers['X-Amz-Date'];
|
|
297
|
+
|
|
298
|
+
// add new authorization
|
|
299
|
+
signer.addAuthorization(credentials, date);
|
|
300
|
+
req.signedAt = date;
|
|
301
|
+
} catch (e) {
|
|
302
|
+
req.response.error = e;
|
|
303
|
+
}
|
|
304
|
+
done();
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
}
|
|
289
308
|
});
|
|
290
309
|
|
|
291
310
|
add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {
|
|
@@ -87,7 +87,7 @@ require('./credentials/shared_ini_file_credentials');
|
|
|
87
87
|
require('./credentials/process_credentials');
|
|
88
88
|
require('./credentials/sso_credentials');
|
|
89
89
|
|
|
90
|
-
// Setup default chain
|
|
90
|
+
// Setup default providers for credentials chain
|
|
91
91
|
// If this changes, please update documentation for
|
|
92
92
|
// AWS.CredentialProviderChain.defaultProviders in
|
|
93
93
|
// credentials/credential_provider_chain.js
|
|
@@ -102,6 +102,19 @@ AWS.CredentialProviderChain.defaultProviders = [
|
|
|
102
102
|
function () { return new AWS.EC2MetadataCredentials(); }
|
|
103
103
|
];
|
|
104
104
|
|
|
105
|
+
// Load custom token providers
|
|
106
|
+
require('./token');
|
|
107
|
+
require('./token/token_provider_chain');
|
|
108
|
+
require('./token/sso_token_provider');
|
|
109
|
+
|
|
110
|
+
// Setup default providers for token chain
|
|
111
|
+
// If this changes, please update documentation for
|
|
112
|
+
// AWS.TokenProviderChain.defaultProviders in
|
|
113
|
+
// token/token_provider_chain.js
|
|
114
|
+
AWS.TokenProviderChain.defaultProviders = [
|
|
115
|
+
function () { return new AWS.SSOTokenProvider(); },
|
|
116
|
+
];
|
|
117
|
+
|
|
105
118
|
var getRegion = function() {
|
|
106
119
|
var env = process.env;
|
|
107
120
|
var region = env.AWS_REGION || env.AMAZON_REGION;
|
|
@@ -173,6 +186,9 @@ AWS.util.update(AWS.Config.prototype.keys, {
|
|
|
173
186
|
var region = getRegion();
|
|
174
187
|
return region ? getRealRegion(region): undefined;
|
|
175
188
|
},
|
|
189
|
+
tokenProvider: function() {
|
|
190
|
+
return new AWS.TokenProviderChain();
|
|
191
|
+
},
|
|
176
192
|
useFipsEndpoint: function() {
|
|
177
193
|
var region = getRegion();
|
|
178
194
|
return isFipsRegion(region)
|
|
@@ -499,6 +499,8 @@ AWS.Service = inherit({
|
|
|
499
499
|
version = this.config.signatureVersion;
|
|
500
500
|
} else if (authtype === 'v4' || authtype === 'v4-unsigned-body') {
|
|
501
501
|
version = 'v4';
|
|
502
|
+
} else if (authtype === 'bearer') {
|
|
503
|
+
version = 'bearer';
|
|
502
504
|
} else {
|
|
503
505
|
version = this.api.signatureVersion;
|
|
504
506
|
}
|
|
@@ -27,15 +27,4 @@ export class IniLoader{
|
|
|
27
27
|
* @returns {object} object of all profile information in the file
|
|
28
28
|
*/
|
|
29
29
|
loadFrom(options: LoadFileOptions): IniFileContent;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Read specified file and return parsed config object. This method will always
|
|
34
|
-
* read from disk and won't update cache. This is a lower level function of
|
|
35
|
-
* loadFrom().
|
|
36
|
-
* @param filename [string] valid readable file path containing aws credentials
|
|
37
|
-
* or aws configs
|
|
38
|
-
* @param isConfig [boolean] true if specified file is an aws config file; false
|
|
39
|
-
* if the file is an aws credentials file
|
|
40
|
-
*/
|
|
41
|
-
export function parseFile(filename: string, isConfig: boolean): IniFileContent;
|
|
30
|
+
}
|
|
@@ -2,18 +2,32 @@ var AWS = require('../core');
|
|
|
2
2
|
var os = require('os');
|
|
3
3
|
var path = require('path');
|
|
4
4
|
|
|
5
|
-
function parseFile(filename
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
function parseFile(filename) {
|
|
6
|
+
return AWS.util.ini.parse(AWS.util.readFileSync(filename));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function getProfiles(fileContent) {
|
|
10
|
+
var tmpContent = {};
|
|
11
|
+
Object.keys(fileContent).forEach(function(sectionName) {
|
|
12
|
+
if (/^sso-session\s/.test(sectionName)) return;
|
|
13
|
+
Object.defineProperty(tmpContent, sectionName.replace(/^profile\s/, ''), {
|
|
14
|
+
value: fileContent[sectionName],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
return tmpContent;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getSsoSessions(fileContent) {
|
|
22
|
+
var tmpContent = {};
|
|
23
|
+
Object.keys(fileContent).forEach(function(sectionName) {
|
|
24
|
+
if (!/^sso-session\s/.test(sectionName)) return;
|
|
25
|
+
Object.defineProperty(tmpContent, sectionName.replace(/^sso-session\s/, ''), {
|
|
26
|
+
value: fileContent[sectionName],
|
|
27
|
+
enumerable: true
|
|
15
28
|
});
|
|
16
|
-
|
|
29
|
+
});
|
|
30
|
+
return tmpContent;
|
|
17
31
|
}
|
|
18
32
|
|
|
19
33
|
/**
|
|
@@ -28,41 +42,66 @@ function parseFile(filename, isConfig) {
|
|
|
28
42
|
AWS.IniLoader = AWS.util.inherit({
|
|
29
43
|
constructor: function IniLoader() {
|
|
30
44
|
this.resolvedProfiles = {};
|
|
45
|
+
this.resolvedSsoSessions = {};
|
|
31
46
|
},
|
|
32
47
|
|
|
33
48
|
/** Remove all cached files. Used after config files are updated. */
|
|
34
49
|
clearCachedFiles: function clearCachedFiles() {
|
|
35
50
|
this.resolvedProfiles = {};
|
|
51
|
+
this.resolvedSsoSessions = {};
|
|
36
52
|
},
|
|
37
53
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Load configurations from config/credentials files and cache them
|
|
56
|
+
* for later use. If no file is specified it will try to load default files.
|
|
57
|
+
*
|
|
58
|
+
* @param options [map] information describing the file
|
|
59
|
+
* @option options filename [String] ('~/.aws/credentials' or defined by
|
|
60
|
+
* AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if
|
|
61
|
+
* isConfig is set to true)
|
|
62
|
+
* path to the file to be read.
|
|
63
|
+
* @option options isConfig [Boolean] (false) True to read config file.
|
|
64
|
+
* @return [map<String,String>] object containing contents from file in key-value
|
|
65
|
+
* pairs.
|
|
66
|
+
*/
|
|
51
67
|
loadFrom: function loadFrom(options) {
|
|
52
68
|
options = options || {};
|
|
53
69
|
var isConfig = options.isConfig === true;
|
|
54
70
|
var filename = options.filename || this.getDefaultFilePath(isConfig);
|
|
55
71
|
if (!this.resolvedProfiles[filename]) {
|
|
56
|
-
var fileContent =
|
|
57
|
-
|
|
72
|
+
var fileContent = parseFile(filename);
|
|
73
|
+
if (isConfig) {
|
|
74
|
+
Object.defineProperty(this.resolvedProfiles, filename, {
|
|
75
|
+
value: getProfiles(fileContent)
|
|
76
|
+
});
|
|
77
|
+
} else {
|
|
78
|
+
Object.defineProperty(this.resolvedProfiles, filename, { value: fileContent });
|
|
79
|
+
}
|
|
58
80
|
}
|
|
59
81
|
return this.resolvedProfiles[filename];
|
|
60
82
|
},
|
|
61
83
|
|
|
62
84
|
/**
|
|
63
|
-
*
|
|
85
|
+
* Load sso sessions from config/credentials files and cache them
|
|
86
|
+
* for later use. If no file is specified it will try to load default file.
|
|
87
|
+
*
|
|
88
|
+
* @param options [map] information describing the file
|
|
89
|
+
* @option options filename [String] ('~/.aws/config' or defined by
|
|
90
|
+
* AWS_CONFIG_FILE process env var)
|
|
91
|
+
* @return [map<String,String>] object containing contents from file in key-value
|
|
92
|
+
* pairs.
|
|
64
93
|
*/
|
|
65
|
-
|
|
94
|
+
loadSsoSessionsFrom: function loadSsoSessionsFrom(options) {
|
|
95
|
+
options = options || {};
|
|
96
|
+
var filename = options.filename || this.getDefaultFilePath(true);
|
|
97
|
+
if (!this.resolvedSsoSessions[filename]) {
|
|
98
|
+
var fileContent = parseFile(filename);
|
|
99
|
+
Object.defineProperty(this.resolvedSsoSessions, filename, {
|
|
100
|
+
value: getSsoSessions(fileContent)
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return this.resolvedSsoSessions[filename];
|
|
104
|
+
},
|
|
66
105
|
|
|
67
106
|
/**
|
|
68
107
|
* @api private
|
|
@@ -101,6 +140,5 @@ AWS.IniLoader = AWS.util.inherit({
|
|
|
101
140
|
var IniLoader = AWS.IniLoader;
|
|
102
141
|
|
|
103
142
|
module.exports = {
|
|
104
|
-
IniLoader: IniLoader
|
|
105
|
-
parseFile: parseFile,
|
|
143
|
+
IniLoader: IniLoader
|
|
106
144
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var AWS = require('../core');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @api private
|
|
5
|
+
*/
|
|
6
|
+
AWS.Signers.Bearer = AWS.util.inherit(AWS.Signers.RequestSigner, {
|
|
7
|
+
constructor: function Bearer(request) {
|
|
8
|
+
AWS.Signers.RequestSigner.call(this, request);
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
addAuthorization: function addAuthorization(token) {
|
|
12
|
+
this.request.httpRequest.headers['Authorization'] = 'Bearer ' + token.token;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -27,6 +27,7 @@ AWS.Signers.RequestSigner.getVersion = function getVersion(version) {
|
|
|
27
27
|
case 'v4': return AWS.Signers.V4;
|
|
28
28
|
case 's3': return AWS.Signers.S3;
|
|
29
29
|
case 'v3https': return AWS.Signers.V3Https;
|
|
30
|
+
case 'bearer': return AWS.Signers.Bearer;
|
|
30
31
|
}
|
|
31
32
|
throw new Error('Unknown signing version ' + version);
|
|
32
33
|
};
|
|
@@ -37,3 +38,4 @@ require('./v3https');
|
|
|
37
38
|
require('./v4');
|
|
38
39
|
require('./s3');
|
|
39
40
|
require('./presign');
|
|
41
|
+
require('./bearer');
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {Token} from '../token';
|
|
2
|
+
|
|
3
|
+
export class SSOTokenProvider extends Token {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new SSOTokenProvider object.
|
|
6
|
+
*/
|
|
7
|
+
constructor(options?: SSOTokenProviderOptions);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface SSOTokenProviderOptions {
|
|
11
|
+
profile?: string
|
|
12
|
+
}
|