Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@aws-sdk/signature-v4-crt
Advanced tools
A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs
@aws-sdk/signature-v4-crt is a package that provides AWS Signature Version 4 signing for requests made to AWS services. It is part of the AWS SDK for JavaScript and leverages the AWS Common Runtime (CRT) for enhanced performance and security.
Sign HTTP Requests
This feature allows you to sign HTTP requests to AWS services using AWS Signature Version 4. The code sample demonstrates how to sign a GET request to an S3 bucket using the SignatureV4Crt class.
const { SignatureV4Crt } = require('@aws-sdk/signature-v4-crt');
const { HttpRequest } = require('@aws-sdk/protocol-http');
const { defaultProvider } = require('@aws-sdk/credential-provider-node');
const signRequest = async () => {
const signer = new SignatureV4Crt({
service: 's3',
region: 'us-east-1',
credentials: defaultProvider(),
});
const request = new HttpRequest({
method: 'GET',
hostname: 'examplebucket.s3.amazonaws.com',
path: '/exampleobject',
});
const signedRequest = await signer.sign(request);
console.log(signedRequest);
};
signRequest();
Sign WebSocket Requests
This feature allows you to sign WebSocket requests to AWS services using AWS Signature Version 4. The code sample demonstrates how to sign a WebSocket request to an AWS IoT endpoint using the SignatureV4Crt class.
const { SignatureV4Crt } = require('@aws-sdk/signature-v4-crt');
const { WebSocketRequest } = require('@aws-sdk/protocol-websocket');
const { defaultProvider } = require('@aws-sdk/credential-provider-node');
const signWebSocketRequest = async () => {
const signer = new SignatureV4Crt({
service: 'iot',
region: 'us-east-1',
credentials: defaultProvider(),
});
const request = new WebSocketRequest({
hostname: 'example.iot.us-east-1.amazonaws.com',
path: '/mqtt',
});
const signedRequest = await signer.sign(request);
console.log(signedRequest);
};
signWebSocketRequest();
@aws-sdk/signature-v4 is another package from the AWS SDK for JavaScript that provides AWS Signature Version 4 signing. Unlike @aws-sdk/signature-v4-crt, it does not leverage the AWS Common Runtime (CRT) and may have different performance characteristics.
aws4 is a lightweight library for signing AWS requests with Signature Version 4. It is not part of the AWS SDK for JavaScript and is often used in environments where a smaller dependency footprint is desired.
This package contains native modules that only executable in Node.js runtime. Please refer to this issue for more information.
See also https://github.com/aws/aws-sdk-js-v3/tree/main#functionality-requiring-aws-common-runtime-crt.
FAQs
A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs
We found that @aws-sdk/signature-v4-crt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.