Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@aws-sdk/middleware-sdk-sts
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-sdk-sts/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-sdk-sts) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-sdk-sts.svg)](https://www.npmjs.com/packag
@aws-sdk/middleware-sdk-sts is a middleware package for the AWS SDK for JavaScript. It provides functionality to interact with AWS Security Token Service (STS), which allows you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or federated users.
AssumeRole
This feature allows you to assume a role and obtain temporary security credentials. The code sample demonstrates how to use the AssumeRoleCommand to assume a role and log the temporary credentials.
const { STSClient, AssumeRoleCommand } = require('@aws-sdk/client-sts');
const client = new STSClient({ region: 'us-west-2' });
const command = new AssumeRoleCommand({
RoleArn: 'arn:aws:iam::123456789012:role/demo',
RoleSessionName: 'demoSession'
});
client.send(command).then((data) => {
console.log(data.Credentials);
}).catch((error) => {
console.error(error);
});
GetCallerIdentity
This feature allows you to retrieve details about the IAM user or role whose credentials are used to call the operation. The code sample demonstrates how to use the GetCallerIdentityCommand to get the caller's identity.
const { STSClient, GetCallerIdentityCommand } = require('@aws-sdk/client-sts');
const client = new STSClient({ region: 'us-west-2' });
const command = new GetCallerIdentityCommand({});
client.send(command).then((data) => {
console.log(data);
}).catch((error) => {
console.error(error);
});
@aws-sdk/client-iam is another AWS SDK package that provides functionalities to interact with AWS Identity and Access Management (IAM). While @aws-sdk/middleware-sdk-sts focuses on temporary security credentials, @aws-sdk/client-iam provides broader IAM functionalities such as managing users, groups, roles, and policies.
aws-sdk is the official AWS SDK for JavaScript, which includes a wide range of AWS services, including STS. It provides a more comprehensive set of features compared to @aws-sdk/middleware-sdk-sts, which is specialized for STS-related operations.
3.696.0 (2024-11-19)
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-sdk-sts/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-sdk-sts) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-sdk-sts.svg)](https://www.npmjs.com/packag
The npm package @aws-sdk/middleware-sdk-sts receives a total of 3,105,745 weekly downloads. As such, @aws-sdk/middleware-sdk-sts popularity was classified as popular.
We found that @aws-sdk/middleware-sdk-sts 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.