Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@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.686.0 (2024-11-06)
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 2,451,955 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.