@cdk8s/awscdk-resolver 0.0.32 → 0.0.33

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.
Files changed (121) hide show
  1. package/.jsii +2 -2
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/README.md +1 -1
  4. package/node_modules/@aws-sdk/client-cloudformation/package.json +36 -36
  5. package/node_modules/@aws-sdk/client-sso/README.md +1 -1
  6. package/node_modules/@aws-sdk/client-sso/package.json +32 -32
  7. package/node_modules/@aws-sdk/client-sts/README.md +1 -1
  8. package/node_modules/@aws-sdk/client-sts/package.json +35 -35
  9. package/node_modules/@aws-sdk/core/CHANGELOG.md +8 -0
  10. package/node_modules/@aws-sdk/core/package.json +2 -2
  11. package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
  12. package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
  13. package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
  14. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  15. package/node_modules/@aws-sdk/credential-provider-ini/package.json +7 -7
  16. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  17. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  18. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  19. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  20. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  21. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  22. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  23. package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +4 -4
  24. package/node_modules/@aws-sdk/middleware-signing/package.json +5 -5
  25. package/node_modules/@aws-sdk/middleware-user-agent/package.json +5 -5
  26. package/node_modules/@aws-sdk/region-config-resolver/package.json +4 -4
  27. package/node_modules/@aws-sdk/token-providers/package.json +31 -31
  28. package/node_modules/@aws-sdk/types/package.json +2 -2
  29. package/node_modules/@aws-sdk/util-endpoints/package.json +3 -3
  30. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  31. package/node_modules/@aws-sdk/util-user-agent-node/package.json +4 -4
  32. package/node_modules/@smithy/abort-controller/package.json +2 -2
  33. package/node_modules/@smithy/config-resolver/package.json +4 -4
  34. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  35. package/node_modules/@smithy/eventstream-codec/package.json +3 -3
  36. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  37. package/node_modules/@smithy/hash-node/package.json +2 -2
  38. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  39. package/node_modules/@smithy/middleware-content-length/package.json +4 -4
  40. package/node_modules/@smithy/middleware-endpoint/dist-cjs/endpointMiddleware.js +13 -1
  41. package/node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +12 -0
  42. package/node_modules/@smithy/middleware-endpoint/package.json +7 -7
  43. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  44. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  45. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  46. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  47. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  48. package/node_modules/@smithy/property-provider/package.json +2 -2
  49. package/node_modules/@smithy/protocol-http/package.json +2 -2
  50. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  51. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  52. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  53. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  54. package/node_modules/@smithy/signature-v4/package.json +5 -5
  55. package/node_modules/@smithy/smithy-client/package.json +4 -4
  56. package/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +8 -0
  57. package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +2 -0
  58. package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +2 -0
  59. package/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +2 -0
  60. package/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +2 -0
  61. package/node_modules/@smithy/types/dist-cjs/auth/index.js +9 -0
  62. package/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +2 -0
  63. package/node_modules/@smithy/types/dist-cjs/identity/index.js +2 -0
  64. package/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +2 -0
  65. package/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
  66. package/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
  67. package/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
  68. package/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
  69. package/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
  70. package/node_modules/@smithy/types/dist-es/auth/index.js +6 -0
  71. package/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
  72. package/node_modules/@smithy/types/dist-es/identity/index.js +2 -0
  73. package/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
  74. package/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
  75. package/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
  76. package/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
  77. package/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +16 -0
  78. package/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
  79. package/node_modules/@smithy/types/dist-types/{auth.d.ts → auth/auth.d.ts} +2 -0
  80. package/node_modules/@smithy/types/dist-types/auth/index.d.ts +6 -0
  81. package/node_modules/@smithy/types/dist-types/endpoint.d.ts +1 -1
  82. package/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
  83. package/node_modules/@smithy/types/dist-types/identity/index.d.ts +2 -0
  84. package/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
  85. package/node_modules/@smithy/types/dist-types/middleware.d.ts +1 -1
  86. package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
  87. package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
  88. package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
  89. package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +16 -0
  90. package/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
  91. package/node_modules/@smithy/types/dist-types/ts3.4/{auth.d.ts → auth/auth.d.ts} +2 -0
  92. package/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +6 -0
  93. package/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +1 -1
  94. package/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
  95. package/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +2 -0
  96. package/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
  97. package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +1 -1
  98. package/node_modules/@smithy/types/package.json +1 -1
  99. package/node_modules/@smithy/url-parser/package.json +3 -3
  100. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  101. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  102. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  103. package/node_modules/@smithy/util-middleware/package.json +2 -2
  104. package/node_modules/@smithy/util-retry/package.json +3 -3
  105. package/node_modules/@smithy/util-stream/package.json +5 -5
  106. package/node_modules/@smithy/util-waiter/package.json +3 -3
  107. package/package.json +6 -6
  108. package/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js +0 -9
  109. package/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js +0 -47
  110. package/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js +0 -11
  111. package/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js +0 -4
  112. package/node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js +0 -42
  113. package/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js +0 -6
  114. package/node_modules/@aws-sdk/util-utf8-browser/dist-types/index.d.ts +0 -2
  115. package/node_modules/@aws-sdk/util-utf8-browser/dist-types/pureJs.d.ts +0 -17
  116. package/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/index.d.ts +0 -2
  117. package/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/pureJs.d.ts +0 -2
  118. package/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/whatwgEncodingApi.d.ts +0 -2
  119. package/node_modules/@aws-sdk/util-utf8-browser/dist-types/whatwgEncodingApi.d.ts +0 -2
  120. /package/node_modules/@smithy/types/dist-cjs/{auth.js → auth/auth.js} +0 -0
  121. /package/node_modules/@smithy/types/dist-es/{auth.js → auth/auth.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@smithy/shared-ini-file-loader",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "dependencies": {
5
- "@smithy/types": "^2.4.0",
5
+ "@smithy/types": "^2.5.0",
6
6
  "tslib": "^2.5.0"
7
7
  },
8
8
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -24,18 +24,18 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/eventstream-codec": "^2.0.12",
27
+ "@smithy/eventstream-codec": "^2.0.13",
28
28
  "@smithy/is-array-buffer": "^2.0.0",
29
- "@smithy/types": "^2.4.0",
29
+ "@smithy/types": "^2.5.0",
30
30
  "@smithy/util-hex-encoding": "^2.0.0",
31
- "@smithy/util-middleware": "^2.0.5",
31
+ "@smithy/util-middleware": "^2.0.6",
32
32
  "@smithy/util-uri-escape": "^2.0.0",
33
33
  "@smithy/util-utf8": "^2.0.2",
34
34
  "tslib": "^2.5.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@aws-crypto/sha256-js": "3.0.0",
38
- "@smithy/protocol-http": "^3.0.8",
38
+ "@smithy/protocol-http": "^3.0.9",
39
39
  "@tsconfig/recommended": "1.0.1",
40
40
  "concurrently": "7.0.0",
41
41
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "2.1.14",
3
+ "version": "2.1.15",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/middleware-stack": "^2.0.6",
27
- "@smithy/types": "^2.4.0",
28
- "@smithy/util-stream": "^2.0.19",
26
+ "@smithy/middleware-stack": "^2.0.7",
27
+ "@smithy/types": "^2.5.0",
28
+ "@smithy/util-stream": "^2.0.20",
29
29
  "tslib": "^2.5.0"
30
30
  },
31
31
  "engines": {
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpApiKeyAuthLocation = void 0;
4
+ var HttpApiKeyAuthLocation;
5
+ (function (HttpApiKeyAuthLocation) {
6
+ HttpApiKeyAuthLocation["HEADER"] = "header";
7
+ HttpApiKeyAuthLocation["QUERY"] = "query";
8
+ })(HttpApiKeyAuthLocation = exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./auth"), exports);
5
+ tslib_1.__exportStar(require("./HttpApiKeyAuth"), exports);
6
+ tslib_1.__exportStar(require("./HttpAuthScheme"), exports);
7
+ tslib_1.__exportStar(require("./HttpAuthSchemeProvider"), exports);
8
+ tslib_1.__exportStar(require("./HttpSigner"), exports);
9
+ tslib_1.__exportStar(require("./IdentityProviderConfig"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./apiKeyIdentity"), exports);
4
5
  tslib_1.__exportStar(require("./awsCredentialIdentity"), exports);
5
6
  tslib_1.__exportStar(require("./identity"), exports);
7
+ tslib_1.__exportStar(require("./tokenIdentity"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export var HttpApiKeyAuthLocation;
2
+ (function (HttpApiKeyAuthLocation) {
3
+ HttpApiKeyAuthLocation["HEADER"] = "header";
4
+ HttpApiKeyAuthLocation["QUERY"] = "query";
5
+ })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));
@@ -0,0 +1,6 @@
1
+ export * from "./auth";
2
+ export * from "./HttpApiKeyAuth";
3
+ export * from "./HttpAuthScheme";
4
+ export * from "./HttpAuthSchemeProvider";
5
+ export * from "./HttpSigner";
6
+ export * from "./IdentityProviderConfig";
@@ -1,2 +1,4 @@
1
+ export * from "./apiKeyIdentity";
1
2
  export * from "./awsCredentialIdentity";
2
3
  export * from "./identity";
4
+ export * from "./tokenIdentity";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare enum HttpApiKeyAuthLocation {
5
+ HEADER = "header",
6
+ QUERY = "query"
7
+ }
@@ -0,0 +1,49 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ import { HandlerExecutionContext } from "../middleware";
3
+ import { HttpSigner } from "./HttpSigner";
4
+ import { IdentityProviderConfig } from "./IdentityProviderConfig";
5
+ /**
6
+ * ID for {@link HttpAuthScheme}
7
+ * @internal
8
+ */
9
+ export type HttpAuthSchemeId = string;
10
+ /**
11
+ * Interface that defines an HttpAuthScheme
12
+ * @internal
13
+ */
14
+ export interface HttpAuthScheme {
15
+ /**
16
+ * ID for an HttpAuthScheme, typically the absolute shape ID of a Smithy auth trait.
17
+ */
18
+ schemeId: HttpAuthSchemeId;
19
+ /**
20
+ * Gets the IdentityProvider corresponding to an HttpAuthScheme.
21
+ */
22
+ identityProvider(config: IdentityProviderConfig): IdentityProvider<Identity> | undefined;
23
+ /**
24
+ * HttpSigner corresponding to an HttpAuthScheme.
25
+ */
26
+ signer: HttpSigner;
27
+ }
28
+ /**
29
+ * Interface that defines the identity and signing properties when selecting
30
+ * an HttpAuthScheme.
31
+ * @internal
32
+ */
33
+ export interface HttpAuthOption {
34
+ schemeId: HttpAuthSchemeId;
35
+ identityProperties?: Record<string, unknown>;
36
+ signingProperties?: Record<string, unknown>;
37
+ propertiesExtractor?: <TConfig extends object, TContext extends HandlerExecutionContext>(config: TConfig, context: TContext) => {
38
+ identityProperties?: Record<string, unknown>;
39
+ signingProperties?: Record<string, unknown>;
40
+ };
41
+ }
42
+ /**
43
+ * @internal
44
+ */
45
+ export interface SelectedHttpAuthScheme {
46
+ httpAuthOption: HttpAuthOption;
47
+ identity: Identity;
48
+ signer: HttpSigner;
49
+ }
@@ -0,0 +1,20 @@
1
+ import { HandlerExecutionContext } from "../middleware";
2
+ import { HttpAuthOption } from "./HttpAuthScheme";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface HttpAuthSchemeParameters {
7
+ operation?: string;
8
+ }
9
+ /**
10
+ * @internal
11
+ */
12
+ export interface HttpAuthSchemeProvider<TParameters extends HttpAuthSchemeParameters> {
13
+ (authParameters: TParameters): HttpAuthOption[];
14
+ }
15
+ /**
16
+ * @internal
17
+ */
18
+ export interface HttpAuthSchemeParametersProvider<TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object> {
19
+ (config: TConfig, context: TContext, input: TInput): Promise<TParameters>;
20
+ }
@@ -0,0 +1,16 @@
1
+ import { HttpRequest } from "../http";
2
+ import { Identity } from "../identity/identity";
3
+ /**
4
+ * Interface to sign identity and signing properties.
5
+ * @internal
6
+ */
7
+ export interface HttpSigner {
8
+ /**
9
+ * Signs an HttpRequest with an identity and signing properties.
10
+ * @param httpRequest request to sign
11
+ * @param identity identity to sing the request with
12
+ * @param signingProperties property bag for signing
13
+ * @returns signed request in a promise
14
+ */
15
+ sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record<string, unknown>): Promise<HttpRequest>;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ import { HttpAuthSchemeId } from "./HttpAuthScheme";
3
+ /**
4
+ * Interface to get an IdentityProvider for a specified HttpAuthScheme
5
+ * @internal
6
+ */
7
+ export interface IdentityProviderConfig {
8
+ /**
9
+ * Get the IdentityProvider for a specified HttpAuthScheme.
10
+ * @param schemeId schemeId of the HttpAuthScheme
11
+ * @returns IdentityProvider or undefined if HttpAuthScheme is not found
12
+ */
13
+ getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider<Identity> | undefined;
14
+ }
@@ -29,6 +29,7 @@ export interface AuthScheme {
29
29
  }
30
30
  /**
31
31
  * @internal
32
+ * @deprecated
32
33
  */
33
34
  export interface HttpAuthDefinition {
34
35
  /**
@@ -48,6 +49,7 @@ export interface HttpAuthDefinition {
48
49
  }
49
50
  /**
50
51
  * @internal
52
+ * @deprecated
51
53
  */
52
54
  export declare enum HttpAuthLocation {
53
55
  HEADER = "header",
@@ -0,0 +1,6 @@
1
+ export * from "./auth";
2
+ export * from "./HttpApiKeyAuth";
3
+ export * from "./HttpAuthScheme";
4
+ export * from "./HttpAuthSchemeProvider";
5
+ export * from "./HttpSigner";
6
+ export * from "./IdentityProviderConfig";
@@ -1,4 +1,4 @@
1
- import { AuthScheme } from "./auth";
1
+ import { AuthScheme } from "./auth/auth";
2
2
  /**
3
3
  * @public
4
4
  */
@@ -0,0 +1,14 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ /**
3
+ * @public
4
+ */
5
+ export interface ApiKeyIdentity extends Identity {
6
+ /**
7
+ * The literal API Key
8
+ */
9
+ readonly apiKey: string;
10
+ }
11
+ /**
12
+ * @public
13
+ */
14
+ export type ApiKeyIdentityProvider = IdentityProvider<ApiKeyIdentity>;
@@ -1,2 +1,4 @@
1
+ export * from "./apiKeyIdentity";
1
2
  export * from "./awsCredentialIdentity";
2
3
  export * from "./identity";
4
+ export * from "./tokenIdentity";
@@ -0,0 +1,14 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface TokenIdentity extends Identity {
6
+ /**
7
+ * The literal token string
8
+ */
9
+ readonly token: string;
10
+ }
11
+ /**
12
+ * @internal
13
+ */
14
+ export type TokenIdentityProvider = IdentityProvider<TokenIdentity>;
@@ -1,4 +1,4 @@
1
- import { AuthScheme, HttpAuthDefinition } from "./auth";
1
+ import { AuthScheme, HttpAuthDefinition } from "./auth/auth";
2
2
  import { EndpointV2 } from "./endpoint";
3
3
  import { Logger } from "./logger";
4
4
  import { UserAgent } from "./util";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare enum HttpApiKeyAuthLocation {
5
+ HEADER = "header",
6
+ QUERY = "query"
7
+ }
@@ -0,0 +1,49 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ import { HandlerExecutionContext } from "../middleware";
3
+ import { HttpSigner } from "./HttpSigner";
4
+ import { IdentityProviderConfig } from "./IdentityProviderConfig";
5
+ /**
6
+ * ID for {@link HttpAuthScheme}
7
+ * @internal
8
+ */
9
+ export type HttpAuthSchemeId = string;
10
+ /**
11
+ * Interface that defines an HttpAuthScheme
12
+ * @internal
13
+ */
14
+ export interface HttpAuthScheme {
15
+ /**
16
+ * ID for an HttpAuthScheme, typically the absolute shape ID of a Smithy auth trait.
17
+ */
18
+ schemeId: HttpAuthSchemeId;
19
+ /**
20
+ * Gets the IdentityProvider corresponding to an HttpAuthScheme.
21
+ */
22
+ identityProvider(config: IdentityProviderConfig): IdentityProvider<Identity> | undefined;
23
+ /**
24
+ * HttpSigner corresponding to an HttpAuthScheme.
25
+ */
26
+ signer: HttpSigner;
27
+ }
28
+ /**
29
+ * Interface that defines the identity and signing properties when selecting
30
+ * an HttpAuthScheme.
31
+ * @internal
32
+ */
33
+ export interface HttpAuthOption {
34
+ schemeId: HttpAuthSchemeId;
35
+ identityProperties?: Record<string, unknown>;
36
+ signingProperties?: Record<string, unknown>;
37
+ propertiesExtractor?: <TConfig extends object, TContext extends HandlerExecutionContext>(config: TConfig, context: TContext) => {
38
+ identityProperties?: Record<string, unknown>;
39
+ signingProperties?: Record<string, unknown>;
40
+ };
41
+ }
42
+ /**
43
+ * @internal
44
+ */
45
+ export interface SelectedHttpAuthScheme {
46
+ httpAuthOption: HttpAuthOption;
47
+ identity: Identity;
48
+ signer: HttpSigner;
49
+ }
@@ -0,0 +1,20 @@
1
+ import { HandlerExecutionContext } from "../middleware";
2
+ import { HttpAuthOption } from "./HttpAuthScheme";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface HttpAuthSchemeParameters {
7
+ operation?: string;
8
+ }
9
+ /**
10
+ * @internal
11
+ */
12
+ export interface HttpAuthSchemeProvider<TParameters extends HttpAuthSchemeParameters> {
13
+ (authParameters: TParameters): HttpAuthOption[];
14
+ }
15
+ /**
16
+ * @internal
17
+ */
18
+ export interface HttpAuthSchemeParametersProvider<TConfig extends object, TContext extends HandlerExecutionContext, TParameters extends HttpAuthSchemeParameters, TInput extends object> {
19
+ (config: TConfig, context: TContext, input: TInput): Promise<TParameters>;
20
+ }
@@ -0,0 +1,16 @@
1
+ import { HttpRequest } from "../http";
2
+ import { Identity } from "../identity/identity";
3
+ /**
4
+ * Interface to sign identity and signing properties.
5
+ * @internal
6
+ */
7
+ export interface HttpSigner {
8
+ /**
9
+ * Signs an HttpRequest with an identity and signing properties.
10
+ * @param httpRequest request to sign
11
+ * @param identity identity to sing the request with
12
+ * @param signingProperties property bag for signing
13
+ * @returns signed request in a promise
14
+ */
15
+ sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record<string, unknown>): Promise<HttpRequest>;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ import { HttpAuthSchemeId } from "./HttpAuthScheme";
3
+ /**
4
+ * Interface to get an IdentityProvider for a specified HttpAuthScheme
5
+ * @internal
6
+ */
7
+ export interface IdentityProviderConfig {
8
+ /**
9
+ * Get the IdentityProvider for a specified HttpAuthScheme.
10
+ * @param schemeId schemeId of the HttpAuthScheme
11
+ * @returns IdentityProvider or undefined if HttpAuthScheme is not found
12
+ */
13
+ getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider<Identity> | undefined;
14
+ }
@@ -29,6 +29,7 @@ export interface AuthScheme {
29
29
  }
30
30
  /**
31
31
  * @internal
32
+ * @deprecated
32
33
  */
33
34
  export interface HttpAuthDefinition {
34
35
  /**
@@ -48,6 +49,7 @@ export interface HttpAuthDefinition {
48
49
  }
49
50
  /**
50
51
  * @internal
52
+ * @deprecated
51
53
  */
52
54
  export declare enum HttpAuthLocation {
53
55
  HEADER = "header",
@@ -0,0 +1,6 @@
1
+ export * from "./auth";
2
+ export * from "./HttpApiKeyAuth";
3
+ export * from "./HttpAuthScheme";
4
+ export * from "./HttpAuthSchemeProvider";
5
+ export * from "./HttpSigner";
6
+ export * from "./IdentityProviderConfig";
@@ -1,4 +1,4 @@
1
- import { AuthScheme } from "./auth";
1
+ import { AuthScheme } from "./auth/auth";
2
2
  /**
3
3
  * @public
4
4
  */
@@ -0,0 +1,14 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ /**
3
+ * @public
4
+ */
5
+ export interface ApiKeyIdentity extends Identity {
6
+ /**
7
+ * The literal API Key
8
+ */
9
+ readonly apiKey: string;
10
+ }
11
+ /**
12
+ * @public
13
+ */
14
+ export type ApiKeyIdentityProvider = IdentityProvider<ApiKeyIdentity>;
@@ -1,2 +1,4 @@
1
+ export * from "./apiKeyIdentity";
1
2
  export * from "./awsCredentialIdentity";
2
3
  export * from "./identity";
4
+ export * from "./tokenIdentity";
@@ -0,0 +1,14 @@
1
+ import { Identity, IdentityProvider } from "../identity/identity";
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface TokenIdentity extends Identity {
6
+ /**
7
+ * The literal token string
8
+ */
9
+ readonly token: string;
10
+ }
11
+ /**
12
+ * @internal
13
+ */
14
+ export type TokenIdentityProvider = IdentityProvider<TokenIdentity>;
@@ -1,4 +1,4 @@
1
- import { AuthScheme, HttpAuthDefinition } from "./auth";
1
+ import { AuthScheme, HttpAuthDefinition } from "./auth/auth";
2
2
  import { EndpointV2 } from "./endpoint";
3
3
  import { Logger } from "./logger";
4
4
  import { UserAgent } from "./util";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/url-parser",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/querystring-parser": "^2.0.12",
26
- "@smithy/types": "^2.4.0",
25
+ "@smithy/querystring-parser": "^2.0.13",
26
+ "@smithy/types": "^2.5.0",
27
27
  "tslib": "^2.5.0"
28
28
  },
29
29
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "2.0.18",
3
+ "version": "2.0.19",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/property-provider": "^2.0.13",
26
- "@smithy/smithy-client": "^2.1.14",
27
- "@smithy/types": "^2.4.0",
25
+ "@smithy/property-provider": "^2.0.14",
26
+ "@smithy/smithy-client": "^2.1.15",
27
+ "@smithy/types": "^2.5.0",
28
28
  "bowser": "^2.11.0",
29
29
  "tslib": "^2.5.0"
30
30
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "yarn g:tsc -p tsconfig.cjs.json",
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/config-resolver": "^2.0.17",
26
- "@smithy/credential-provider-imds": "^2.1.0",
27
- "@smithy/node-config-provider": "^2.1.4",
28
- "@smithy/property-provider": "^2.0.13",
29
- "@smithy/smithy-client": "^2.1.14",
30
- "@smithy/types": "^2.4.0",
25
+ "@smithy/config-resolver": "^2.0.18",
26
+ "@smithy/credential-provider-imds": "^2.1.1",
27
+ "@smithy/node-config-provider": "^2.1.5",
28
+ "@smithy/property-provider": "^2.0.14",
29
+ "@smithy/smithy-client": "^2.1.15",
30
+ "@smithy/types": "^2.5.0",
31
31
  "tslib": "^2.5.0"
32
32
  },
33
33
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-endpoints",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Utilities to help with endpoint resolution.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@smithy/node-config-provider": "^2.1.4",
30
- "@smithy/types": "^2.4.0",
29
+ "@smithy/node-config-provider": "^2.1.5",
30
+ "@smithy/types": "^2.5.0",
31
31
  "tslib": "^2.5.0"
32
32
  },
33
33
  "devDependencies": {