Socket
Socket
Sign inDemoInstall

aws4-axios

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws4-axios - npm Package Compare versions

Comparing version 3.2.24 to 3.3.0

2

dist/credentials/assumeRoleCredentialsProvider.d.ts

@@ -17,2 +17,3 @@ import { CredentialsProvider } from "./credentialsProvider";

expirationMarginSec?: number;
roleSessionName?: string;
}

@@ -23,2 +24,3 @@ export interface ResolvedAssumeRoleCredentialsProviderOptions {

expirationMarginSec: number;
roleSessionName: string;
}

4

dist/credentials/assumeRoleCredentialsProvider.js

@@ -16,3 +16,3 @@ "use strict";

constructor(options) {
this.options = Object.assign(Object.assign({}, options), { region: options.region || process.env.AWS_REGION, expirationMarginSec: options.expirationMarginSec || 5 });
this.options = Object.assign(Object.assign({}, options), { region: options.region || process.env.AWS_REGION, expirationMarginSec: options.expirationMarginSec || 5, roleSessionName: options.roleSessionName || "axios" });
this.sts = new client_sts_1.STSClient({ region: this.options.region });

@@ -43,3 +43,3 @@ }

RoleArn: this.options.roleArn,
RoleSessionName: "axios",
RoleSessionName: this.options.roleSessionName,
}));

@@ -46,0 +46,0 @@ if (!res.Credentials) {

@@ -28,2 +28,10 @@ import { AxiosInstance, AxiosRequestHeaders, InternalAxiosRequestConfig, Method } from "axios";

assumedRoleExpirationMarginSec?: number;
/**
* An identifier for the assumed role session.
* Use the role session name to uniquely identify a session when the same role is
* assumed by different principals or for different reasons.
* In cross-account scenarios, the role session name is visible to,
* and can be logged by the account that owns the role.
*/
assumeRoleSessionName?: string;
}

@@ -30,0 +38,0 @@ export interface SigningOptions {

@@ -63,2 +63,3 @@ "use strict";

expirationMarginSec: options.assumedRoleExpirationMarginSec,
roleSessionName: options.assumeRoleSessionName,
});

@@ -65,0 +66,0 @@ }

{
"name": "aws4-axios",
"version": "3.2.24",
"version": "3.3.0",
"description": "Axios request interceptor for signing requests with AWSv4",

@@ -49,6 +49,6 @@ "author": "James Bourne",

"eslint": "^8.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^9.0.0",
"husky": "^8.0.0",
"jest": "^26.6.3",
"lint-staged": "^13.0.0",
"lint-staged": "^14.0.0",
"nock": "^13.3.0",

@@ -55,0 +55,0 @@ "npm-run-all": "^4.1.5",

@@ -177,2 +177,3 @@ # aws4-axios

assumeRoleArn: "arn:aws:iam::111111111111:role/MyRole",
assumeRoleSessionName: "MyApiClient", // optional, default value is "axios"
},

@@ -179,0 +180,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc