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/credential-provider-http
Advanced tools
AWS credential provider for containers and HTTP sources
The @aws-sdk/credential-provider-http package is designed to retrieve AWS credentials from a remote endpoint, such as the Amazon EC2 Instance Metadata Service (IMDS) or a custom HTTP endpoint. It is part of the AWS SDK for JavaScript (v3), which is a modular collection of software for interacting with AWS services. This package is particularly useful for applications running on AWS infrastructure that need to securely obtain temporary credentials without hardcoding them.
Retrieving credentials from EC2 Instance Metadata Service (IMDS)
This feature allows applications running on an Amazon EC2 instance to automatically retrieve temporary AWS credentials. The credentials are provided by the EC2 Instance Metadata Service without requiring manual credential management.
const { fromInstanceMetadata } = require('@aws-sdk/credential-provider-http');
const credentials = fromInstanceMetadata();
Retrieving credentials from a custom HTTP endpoint
This feature enables the retrieval of AWS credentials from a custom HTTP endpoint. It is useful for scenarios where credentials are centrally managed and distributed via an internal HTTP service.
const { fromHttp } = require('@aws-sdk/credential-provider-http');
const credentials = fromHttp({
url: 'http://my-custom-credential-provider/',
requestOptions: { // Optional HTTP request options
method: 'GET'
}
});
Similar to @aws-sdk/credential-provider-http, this package is used to load AWS credentials. However, it loads credentials from local INI-formatted files (e.g., ~/.aws/credentials). It's useful for development environments but less suited for production environments compared to @aws-sdk/credential-provider-http, which can dynamically fetch credentials.
This package specifically targets the retrieval of AWS credentials from the EC2 Instance Metadata Service (IMDS). It offers functionality similar to one aspect of @aws-sdk/credential-provider-http but is exclusively focused on EC2 instances. The @aws-sdk/credential-provider-http package is more versatile as it also supports custom HTTP endpoints.
This package retrieves AWS credentials set in environment variables. It's a simpler approach compared to @aws-sdk/credential-provider-http, suitable for scenarios where credentials are statically defined in the environment. However, it lacks the dynamic credential retrieval capabilities of @aws-sdk/credential-provider-http.
An internal transitively required package.
See https://www.npmjs.com/package/@aws-sdk/credential-providers
3.709.0 (2024-12-10)
FAQs
AWS credential provider for containers and HTTP sources
The npm package @aws-sdk/credential-provider-http receives a total of 13,218,488 weekly downloads. As such, @aws-sdk/credential-provider-http popularity was classified as popular.
We found that @aws-sdk/credential-provider-http 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.