@smithy/signature-v4a 3.1.11 → 3.1.13
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/dist-cjs/index.js +183 -183
- package/package.json +10 -11
- package/dist-types/ts3.4/SignatureV4a.d.ts +0 -41
- package/dist-types/ts3.4/constants.d.ts +0 -16
- package/dist-types/ts3.4/credentialDerivation.d.ts +0 -32
- package/dist-types/ts3.4/elliptic/Ec.d.ts +0 -2
- package/dist-types/ts3.4/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4a",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.13",
|
|
4
4
|
"description": "Asymmetric addon for the @smithy/signature-v4 package",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
7
7
|
"types": "./dist-types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "concurrently 'yarn:build:
|
|
10
|
-
"build:
|
|
11
|
-
"build:es": "yarn g:tsc -p tsconfig.es.json",
|
|
9
|
+
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
10
|
+
"build:elliptic": "node ./scripts/esbuild.mjs",
|
|
11
|
+
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline signature-v4a",
|
|
12
12
|
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
13
13
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
14
|
-
"build:elliptic": "node ./scripts/esbuild.mjs",
|
|
15
|
-
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
16
14
|
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
17
|
-
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
18
|
-
"format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
19
15
|
"extract:docs": "api-extractor run --local",
|
|
16
|
+
"format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
17
|
+
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
18
|
+
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
20
19
|
"test": "yarn g:vitest run"
|
|
21
20
|
},
|
|
22
21
|
"author": {
|
|
@@ -26,15 +25,15 @@
|
|
|
26
25
|
"license": "Apache-2.0",
|
|
27
26
|
"sideEffects": true,
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@smithy/signature-v4": "^5.3.
|
|
30
|
-
"@smithy/types": "^4.
|
|
28
|
+
"@smithy/signature-v4": "^5.3.13",
|
|
29
|
+
"@smithy/types": "^4.14.0",
|
|
31
30
|
"@smithy/util-hex-encoding": "^4.2.2",
|
|
32
31
|
"@smithy/util-utf8": "^4.2.2",
|
|
33
32
|
"tslib": "^2.6.2"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
37
|
-
"@smithy/protocol-http": "^5.3.
|
|
36
|
+
"@smithy/protocol-http": "^5.3.13",
|
|
38
37
|
"concurrently": "7.0.0",
|
|
39
38
|
"downlevel-dts": "0.10.1",
|
|
40
39
|
"elliptic": "6.5.5",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4";
|
|
2
|
-
import { SignatureV4Base } from "@smithy/signature-v4";
|
|
3
|
-
import { HttpRequest, RequestSigner } from "@smithy/types";
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare class SignatureV4a extends SignatureV4Base implements RequestSigner {
|
|
8
|
-
/**
|
|
9
|
-
* Creates a SigV4a signer
|
|
10
|
-
* @param applyChecksum Apply checksum header
|
|
11
|
-
* @param credentials Credentials to use when signing
|
|
12
|
-
* @param region Region to sign for, Wildcard (*) also accepted
|
|
13
|
-
* @param service Service to sign for
|
|
14
|
-
* @param uriEscapePath Defaults to true. Used for non s3 services.
|
|
15
|
-
*/
|
|
16
|
-
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath, }: SignatureV4Init & SignatureV4CryptoInit);
|
|
17
|
-
/**
|
|
18
|
-
* Sign a request using SigV4a
|
|
19
|
-
* @param toSign HttpRequest to sign
|
|
20
|
-
* @param options Additional options
|
|
21
|
-
*/
|
|
22
|
-
sign(toSign: HttpRequest, options: any): Promise<any>;
|
|
23
|
-
/**
|
|
24
|
-
* Sign a SigV4a request and return its modified HttpRequest. See SigV4a wiki for implementation details
|
|
25
|
-
* @param requestToSign HttpRequest to sign
|
|
26
|
-
* @param signingDate Signing date (uses UTC now if not specified)
|
|
27
|
-
* @param signableHeaders Headers to include in the signing process
|
|
28
|
-
* @param unsignableHeaders Headers to not include in the signing process
|
|
29
|
-
* @param signingRegion Region to sign the request for. '*' can be used as a wildcard. Falls back to constructor value
|
|
30
|
-
* @param signingService Service to sign for
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
private signRequest;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @param privateKey Calculated private key
|
|
37
|
-
* @param stringToSign String to sign using private key
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private getSignature;
|
|
41
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
export declare const REGION_HEADER: string;
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare const ONE_AS_4_BYTES: number[];
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare const TWOFIFTYSIX_AS_4_BYTES: number[];
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
export declare const N_MINUS_TWO: number[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ChecksumConstructor, HashConstructor } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* Create a string describing the scope of credentials used to sign a request. * @param shortDate
|
|
4
|
-
* @param shortDate The current calendar date in the form YYYYMMDD.
|
|
5
|
-
* @param service The service to which the signed request is being sent.
|
|
6
|
-
*/
|
|
7
|
-
export declare const createSigV4aScope: (shortDate: string, service: string) => string;
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
export declare const clearCredentialCache: () => void;
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare const getSigV4aSigningKey: (sha256: ChecksumConstructor | HashConstructor, accessKey: string, secretKey: string) => Promise<Uint8Array>;
|
|
16
|
-
/**
|
|
17
|
-
* Build the signing key request. Implementation copied from .NET implementation
|
|
18
|
-
* @param bufferInput Input string. Will append values and return as new string
|
|
19
|
-
* @param accessKey Access key used for signing
|
|
20
|
-
* @param counter Trial number
|
|
21
|
-
*/
|
|
22
|
-
export declare const buildFixedInputBuffer: (bufferInput: string, accessKey: string, counter: number) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Check if calculated value is larger than NMinus2 constant
|
|
25
|
-
* @param value Array in Big-Endian format
|
|
26
|
-
*/
|
|
27
|
-
export declare const isBiggerThanNMinus2: (value: Uint8Array) => boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Adds one to a big-endian number
|
|
30
|
-
* @param value Big-endian formatted number
|
|
31
|
-
*/
|
|
32
|
-
export declare const addOneToArray: (value: Uint8Array) => Uint8Array;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SignatureV4a";
|