Socket
Socket
Sign inDemoInstall

@aws-sdk/credential-provider-process

Package Overview
Dependencies
Maintainers
5
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/credential-provider-process - npm Package Compare versions

Comparing version 3.614.0 to 3.620.1

12

dist-cjs/index.js

@@ -37,3 +37,4 @@ "use strict";

// src/getValidatedProcessCredentials.ts
var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {
var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {
var _a;
if (data.Version !== 1) {

@@ -52,2 +53,6 @@ throw Error(`Profile ${profileName} credential_process did not return Version 1.`);

}
let accountId = data.AccountId;
if (!accountId && ((_a = profiles == null ? void 0 : profiles[profileName]) == null ? void 0 : _a.aws_account_id)) {
accountId = profiles[profileName].aws_account_id;
}
return {

@@ -58,3 +63,4 @@ accessKeyId: data.AccessKeyId,

...data.Expiration && { expiration: new Date(data.Expiration) },
...data.CredentialScope && { credentialScope: data.CredentialScope }
...data.CredentialScope && { credentialScope: data.CredentialScope },
...accountId && { accountId }
};

@@ -78,3 +84,3 @@ }, "getValidatedProcessCredentials");

}
return getValidatedProcessCredentials(profileName, data);
return getValidatedProcessCredentials(profileName, data, profiles);
} catch (error) {

@@ -81,0 +87,0 @@ throw new import_property_provider.CredentialsProviderError(error.message, { logger });

@@ -1,2 +0,2 @@

export const getValidatedProcessCredentials = (profileName, data) => {
export const getValidatedProcessCredentials = (profileName, data, profiles) => {
if (data.Version !== 1) {

@@ -15,2 +15,6 @@ throw Error(`Profile ${profileName} credential_process did not return Version 1.`);

}
let accountId = data.AccountId;
if (!accountId && profiles?.[profileName]?.aws_account_id) {
accountId = profiles[profileName].aws_account_id;
}
return {

@@ -22,3 +26,4 @@ accessKeyId: data.AccessKeyId,

...(data.CredentialScope && { credentialScope: data.CredentialScope }),
...(accountId && { accountId }),
};
};

@@ -20,3 +20,3 @@ import { CredentialsProviderError } from "@smithy/property-provider";

}
return getValidatedProcessCredentials(profileName, data);
return getValidatedProcessCredentials(profileName, data, profiles);
}

@@ -23,0 +23,0 @@ catch (error) {

@@ -1,2 +0,2 @@

import { AwsCredentialIdentity } from "@smithy/types";
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
import { ProcessCredentials } from "./ProcessCredentials";

@@ -6,2 +6,2 @@ /**

*/
export declare const getValidatedProcessCredentials: (profileName: string, data: ProcessCredentials) => AwsCredentialIdentity;
export declare const getValidatedProcessCredentials: (profileName: string, data: ProcessCredentials, profiles: ParsedIniData) => AwsCredentialIdentity;

@@ -11,2 +11,3 @@ /**

CredentialScope?: string;
AccountId?: string;
};

@@ -1,6 +0,7 @@

import { AwsCredentialIdentity } from "@smithy/types";
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
import { ProcessCredentials } from "./ProcessCredentials";
export declare const getValidatedProcessCredentials: (
profileName: string,
data: ProcessCredentials
data: ProcessCredentials,
profiles: ParsedIniData
) => AwsCredentialIdentity;

@@ -8,2 +8,3 @@ export type ProcessCredentials = {

CredentialScope?: string;
AccountId?: string;
};
{
"name": "@aws-sdk/credential-provider-process",
"version": "3.614.0",
"version": "3.620.1",
"description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",

@@ -5,0 +5,0 @@ "main": "./dist-cjs/index.js",

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