Socket
Socket
Sign inDemoInstall

@aws-sdk/signature-v4-crt

Package Overview
Dependencies
Maintainers
5
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/signature-v4-crt - npm Package Compare versions

Comparing version 3.168.0 to 3.170.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13)
**Note:** Version bump only for package @aws-sdk/signature-v4-crt
# [3.168.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.167.0...v3.168.0) (2022-09-09)

@@ -8,0 +16,0 @@

30

dist-types/ts3.4/constants.d.ts

@@ -18,17 +18,17 @@ export declare const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";

export declare const ALWAYS_UNSIGNABLE_HEADERS: {
authorization: boolean;
"cache-control": boolean;
connection: boolean;
expect: boolean;
from: boolean;
"keep-alive": boolean;
"max-forwards": boolean;
pragma: boolean;
referer: boolean;
te: boolean;
trailer: boolean;
"transfer-encoding": boolean;
upgrade: boolean;
"user-agent": boolean;
"x-amzn-trace-id": boolean;
authorization: boolean;
"cache-control": boolean;
connection: boolean;
expect: boolean;
from: boolean;
"keep-alive": boolean;
"max-forwards": boolean;
pragma: boolean;
referer: boolean;
te: boolean;
trailer: boolean;
"transfer-encoding": boolean;
upgrade: boolean;
"user-agent": boolean;
"x-amzn-trace-id": boolean;
};

@@ -35,0 +35,0 @@ export declare const PROXY_HEADER_PATTERN: RegExp;

import { SignatureV4CryptoInit, SignatureV4Init } from "@aws-sdk/signature-v4";
import { HttpRequest, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments } from "@aws-sdk/types";
import {
HttpRequest,
RequestPresigner,
RequestPresigningArguments,
RequestSigner,
RequestSigningArguments,
} from "@aws-sdk/types";
import { auth as crtAuth } from "aws-crt";
export declare type AwsSigningAlgorithm = crtAuth.AwsSigningAlgorithm;
export interface CrtSignerV4Init extends SignatureV4Init {
signingAlgorithm?: AwsSigningAlgorithm;
signingAlgorithm?: AwsSigningAlgorithm;
}
export declare class CrtSignerV4 implements RequestPresigner, RequestSigner {
private readonly service;
private readonly regionProvider;
private readonly credentialProvider;
private readonly sha256;
private readonly uriEscapePath;
private readonly applyChecksum;
private readonly signingAlgorithm;
constructor({ credentials, region, service, sha256, applyChecksum, uriEscapePath, signingAlgorithm, }: CrtSignerV4Init & SignatureV4CryptoInit);
private options2crtConfigure;
presign(originalRequest: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
sign(toSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
private getQueryParam;
private signRequest;
verifySigv4aSigning(request: HttpRequest, signature: string, expectedCanonicalRequest: string, eccPubKeyX: string, eccPubKeyY: string, options?: RequestSigningArguments): Promise<boolean>;
verifySigv4aPreSigning(request: HttpRequest, signature: string | Array<string> | null, expectedCanonicalRequest: string, eccPubKeyX: string, eccPubKeyY: string, options?: RequestPresigningArguments): Promise<boolean>;
private readonly service;
private readonly regionProvider;
private readonly credentialProvider;
private readonly sha256;
private readonly uriEscapePath;
private readonly applyChecksum;
private readonly signingAlgorithm;
constructor({
credentials,
region,
service,
sha256,
applyChecksum,
uriEscapePath,
signingAlgorithm,
}: CrtSignerV4Init & SignatureV4CryptoInit);
private options2crtConfigure;
presign(
originalRequest: HttpRequest,
options?: RequestPresigningArguments
): Promise<HttpRequest>;
sign(
toSign: HttpRequest,
options?: RequestSigningArguments
): Promise<HttpRequest>;
private getQueryParam;
private signRequest;
verifySigv4aSigning(
request: HttpRequest,
signature: string,
expectedCanonicalRequest: string,
eccPubKeyX: string,
eccPubKeyY: string,
options?: RequestSigningArguments
): Promise<boolean>;
verifySigv4aPreSigning(
request: HttpRequest,
signature: string | Array<string> | null,
expectedCanonicalRequest: string,
eccPubKeyX: string,
eccPubKeyY: string,
options?: RequestPresigningArguments
): Promise<boolean>;
}
import { HeaderBag } from "@aws-sdk/types";
export declare function hasHeader(soughtHeader: string, headers: HeaderBag): boolean;
export declare function getHeaderValue(soughtHeader: string, headers: HeaderBag): string | undefined;
export declare function deleteHeader(soughtHeader: string, headers: HeaderBag): void;
export declare function hasHeader(
soughtHeader: string,
headers: HeaderBag
): boolean;
export declare function getHeaderValue(
soughtHeader: string,
headers: HeaderBag
): string | undefined;
export declare function deleteHeader(
soughtHeader: string,
headers: HeaderBag
): void;
export * from "./CrtSignerV4";
import { HttpRequest } from "@aws-sdk/types";
export interface TestCase {
name: string;
request: HttpRequest;
authorization: string;
name: string;
request: HttpRequest;
authorization: string;
}

@@ -10,6 +10,6 @@ export declare const region = "us-east-1";

export declare const credentials: {
accessKeyId: string;
secretAccessKey: string;
accessKeyId: string;
secretAccessKey: string;
};
export declare const signingDate: Date;
export declare const requests: Array<TestCase>;
{
"name": "@aws-sdk/signature-v4-crt",
"version": "3.168.0",
"version": "3.170.0",
"description": "A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs",

@@ -24,8 +24,8 @@ "main": "./dist-cjs/index.js",

"dependencies": {
"@aws-sdk/is-array-buffer": "3.168.0",
"@aws-sdk/querystring-parser": "3.168.0",
"@aws-sdk/signature-v4": "3.168.0",
"@aws-sdk/util-hex-encoding": "3.168.0",
"@aws-sdk/util-middleware": "3.168.0",
"@aws-sdk/util-uri-escape": "3.168.0",
"@aws-sdk/is-array-buffer": "3.170.0",
"@aws-sdk/querystring-parser": "3.170.0",
"@aws-sdk/signature-v4": "3.170.0",
"@aws-sdk/util-hex-encoding": "3.170.0",
"@aws-sdk/util-middleware": "3.170.0",
"@aws-sdk/util-uri-escape": "3.170.0",
"aws-crt": "^1.12.5",

@@ -36,8 +36,8 @@ "tslib": "^2.3.1"

"@aws-crypto/sha256-js": "2.0.0",
"@aws-sdk/protocol-http": "3.168.0",
"@aws-sdk/types": "3.168.0",
"@aws-sdk/util-buffer-from": "3.168.0",
"@aws-sdk/protocol-http": "3.170.0",
"@aws-sdk/types": "3.170.0",
"@aws-sdk/util-buffer-from": "3.170.0",
"@tsconfig/recommended": "1.0.1",
"concurrently": "7.0.0",
"downlevel-dts": "0.7.0",
"downlevel-dts": "0.10.1",
"rimraf": "3.0.2",

@@ -44,0 +44,0 @@ "typedoc": "0.19.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc