Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@aws-sdk/middleware-signing
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-signing/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-signing) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-signing.svg)](https://www.npmjs.com/packag
The @aws-sdk/middleware-signing package is part of the AWS SDK for JavaScript (v3). It provides middleware for signing requests made to AWS services. This is crucial for authenticating requests by automatically including secure signatures in API calls. The package ensures that AWS service requests are transmitted securely and are authenticated using the appropriate AWS credentials.
Request Signing
This code demonstrates how to add the AWS authentication middleware to an S3 client instance in the AWS SDK. It ensures that the PutObjectCommand is signed correctly before being sent to AWS.
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3';
import { awsAuthMiddleware } from '@aws-sdk/middleware-signing';
const client = new S3Client({});
client.middlewareStack.add(awsAuthMiddleware(), {
step: 'finalizeRequest',
name: 'awsAuthMiddleware',
tags: { SET_CONTEXT: true },
override: true
});
const command = new PutObjectCommand({ Bucket: 'example-bucket', Key: 'example-object', Body: 'Hello, world!' });
client.send(command);
The aws4 package is a lightweight utility that signs requests using AWS Signature Version 4. It can be used independently of the AWS SDK. Unlike @aws-sdk/middleware-signing, which is integrated within the AWS SDK v3, aws4 can be used with any HTTP request tool, providing more flexibility but requiring manual integration.
This package includes functionality for signing in users and handling tokens with Amazon Cognito. While it is focused on authentication like @aws-sdk/middleware-signing, its scope is specifically tied to Amazon Cognito and does not provide general request signing capabilities for other AWS services.
3.179.0 (2022-09-26)
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-signing/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-signing) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-signing.svg)](https://www.npmjs.com/packag
The npm package @aws-sdk/middleware-signing receives a total of 7,718,250 weekly downloads. As such, @aws-sdk/middleware-signing popularity was classified as popular.
We found that @aws-sdk/middleware-signing 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
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.