@aws-sdk/credential-provider-ini
Advanced tools
Comparing version 3.12.0 to 3.13.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.13.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.12.0...v3.13.0) (2021-04-15) | ||
### Features | ||
* **credential-provider-ini:** support credential_source in shared file ([#2237](https://github.com/aws/aws-sdk-js-v3/issues/2237)) ([135a12c](https://github.com/aws/aws-sdk-js-v3/commit/135a12c5554ef75cef21a6b5e4b496b55afedfe2)) | ||
# [3.12.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.11.0...v3.12.0) (2021-04-09) | ||
@@ -8,0 +19,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMasterProfileName = exports.parseKnownFiles = exports.fromIni = exports.ENV_PROFILE = void 0; | ||
const credential_provider_env_1 = require("@aws-sdk/credential-provider-env"); | ||
const credential_provider_imds_1 = require("@aws-sdk/credential-provider-imds"); | ||
const credential_provider_web_identity_1 = require("@aws-sdk/credential-provider-web-identity"); | ||
@@ -19,9 +21,10 @@ const property_provider_1 = require("@aws-sdk/property-provider"); | ||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; | ||
const isAssumeRoleWithSourceProfile = (arg) => Boolean(arg) && | ||
const isAssumeRoleProfile = (arg) => Boolean(arg) && | ||
typeof arg === "object" && | ||
typeof arg.role_arn === "string" && | ||
typeof arg.source_profile === "string" && | ||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && | ||
["undefined", "string"].indexOf(typeof arg.external_id) > -1 && | ||
["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1; | ||
const isAssumeRoleWithSourceProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; | ||
const isAssumeRoleWithProviderProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; | ||
/** | ||
@@ -66,8 +69,8 @@ * Creates a credential provider that will read from ini files and supports | ||
// given precedence over static credentials. | ||
if (isAssumeRoleWithSourceProfile(data)) { | ||
const { external_id: ExternalId, mfa_serial, role_arn: RoleArn, role_session_name: RoleSessionName = "aws-sdk-js-" + Date.now(), source_profile, } = data; | ||
if (isAssumeRoleWithSourceProfile(data) || isAssumeRoleWithProviderProfile(data)) { | ||
const { external_id: ExternalId, mfa_serial, role_arn: RoleArn, role_session_name: RoleSessionName = "aws-sdk-js-" + Date.now(), source_profile, credential_source, } = data; | ||
if (!options.roleAssumer) { | ||
throw new property_provider_1.ProviderError(`Profile ${profileName} requires a role to be assumed, but no` + ` role assumption callback was provided.`, false); | ||
} | ||
if (source_profile in visitedProfiles) { | ||
if (source_profile && source_profile in visitedProfiles) { | ||
throw new property_provider_1.ProviderError(`Detected a cycle attempting to resolve credentials for profile` + | ||
@@ -77,6 +80,8 @@ ` ${exports.getMasterProfileName(options)}. Profiles visited: ` + | ||
} | ||
const sourceCreds = resolveProfileData(source_profile, profiles, options, { | ||
...visitedProfiles, | ||
[source_profile]: true, | ||
}); | ||
const sourceCreds = source_profile | ||
? resolveProfileData(source_profile, profiles, options, { | ||
...visitedProfiles, | ||
[source_profile]: true, | ||
}) | ||
: resolveCredentialSource(credential_source, profileName)(); | ||
const params = { RoleArn, RoleSessionName, ExternalId }; | ||
@@ -109,2 +114,23 @@ if (mfa_serial) { | ||
}; | ||
/** | ||
* Resolve the `credential_source` entry from the profile, and return the | ||
* credential providers respectively. No memoization is needed for the | ||
* credential source providers because memoization should be added outside the | ||
* fromIni() provider. The source credential needs to be refreshed every time | ||
* fromIni() is called. | ||
*/ | ||
const resolveCredentialSource = (credentialSource, profileName) => { | ||
const sourceProvidersMap = { | ||
EcsContainer: credential_provider_imds_1.fromContainerMetadata, | ||
Ec2InstanceMetadata: credential_provider_imds_1.fromInstanceMetadata, | ||
Environment: credential_provider_env_1.fromEnv, | ||
}; | ||
if (credentialSource in sourceProvidersMap) { | ||
return sourceProvidersMap[credentialSource](); | ||
} | ||
else { | ||
throw new property_provider_1.ProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + | ||
`expected EcsContainer or Ec2InstanceMetadata or Environment.`); | ||
} | ||
}; | ||
const resolveStaticCredentials = (profile) => Promise.resolve({ | ||
@@ -121,2 +147,2 @@ accessKeyId: profile.aws_access_key_id, | ||
})(); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0dBQTJHO0FBQzNHLGtFQUEyRDtBQUMzRCw0RUFNeUM7QUFHekMsTUFBTSxlQUFlLEdBQUcsU0FBUyxDQUFDO0FBQ3JCLFFBQUEsV0FBVyxHQUFHLGFBQWEsQ0FBQztBQXNGekMsTUFBTSxvQkFBb0IsR0FBRyxDQUFDLEdBQVEsRUFBNkIsRUFBRSxDQUNuRSxPQUFPLENBQUMsR0FBRyxDQUFDO0lBQ1osT0FBTyxHQUFHLEtBQUssUUFBUTtJQUN2QixPQUFPLEdBQUcsQ0FBQyxpQkFBaUIsS0FBSyxRQUFRO0lBQ3pDLE9BQU8sR0FBRyxDQUFDLHFCQUFxQixLQUFLLFFBQVE7SUFDN0MsQ0FBQyxXQUFXLEVBQUUsUUFBUSxDQUFDLENBQUMsT0FBTyxDQUFDLE9BQU8sR0FBRyxDQUFDLGlCQUFpQixDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7QUFRckUsTUFBTSxvQkFBb0IsR0FBRyxDQUFDLEdBQVEsRUFBNkIsRUFBRSxDQUNuRSxPQUFPLENBQUMsR0FBRyxDQUFDO0lBQ1osT0FBTyxHQUFHLEtBQUssUUFBUTtJQUN2QixPQUFPLEdBQUcsQ0FBQyx1QkFBdUIsS0FBSyxRQUFRO0lBQy9DLE9BQU8sR0FBRyxDQUFDLFFBQVEsS0FBS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c2lvblRva2VuOiBwcm9maWxlLmF3c19zZXNzaW9uX3Rva2VuLFxuICB9KTtcblxuY29uc3QgcmVzb2x2ZVdlYklkZW50aXR5Q3JlZGVudGlhbHMgPSBhc3luYyAocHJvZmlsZTogV2ViSWRlbnRpdHlQcm9maWxlLCBvcHRpb25zOiBGcm9tSW5pSW5pdCk6IFByb21pc2U8Q3JlZGVudGlhbHM+ID0+XG4gIGZyb21Ub2tlbkZpbGUoe1xuICAgIHdlYklkZW50aXR5VG9rZW5GaWxlOiBwcm9maWxlLndlYl9pZGVudGl0eV90b2tlbl9maWxlLFxuICAgIHJvbGVBcm46IHByb2ZpbGUucm9sZV9hcm4sXG4gICAgcm9sZVNlc3Npb25OYW1lOiBwcm9maWxlLnJvbGVfc2Vzc2lvbl9uYW1lLFxuICAgIHJvbGVBc3N1bWVyV2l0aFdlYklkZW50aXR5OiBvcHRpb25zLnJvbGVBc3N1bWVyV2l0aFdlYklkZW50aXR5LFxuICB9KSgpO1xuIl19 |
import { __assign, __awaiter, __generator } from "tslib"; | ||
import { fromEnv } from "@aws-sdk/credential-provider-env"; | ||
import { fromContainerMetadata, fromInstanceMetadata } from "@aws-sdk/credential-provider-imds"; | ||
import { fromTokenFile } from "@aws-sdk/credential-provider-web-identity"; | ||
@@ -21,7 +23,6 @@ import { ProviderError } from "@aws-sdk/property-provider"; | ||
}; | ||
var isAssumeRoleWithSourceProfile = function (arg) { | ||
var isAssumeRoleProfile = function (arg) { | ||
return Boolean(arg) && | ||
typeof arg === "object" && | ||
typeof arg.role_arn === "string" && | ||
typeof arg.source_profile === "string" && | ||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && | ||
@@ -31,2 +32,8 @@ ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && | ||
}; | ||
var isAssumeRoleWithSourceProfile = function (arg) { | ||
return isAssumeRoleProfile(arg) && typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; | ||
}; | ||
var isAssumeRoleWithProviderProfile = function (arg) { | ||
return isAssumeRoleProfile(arg) && typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; | ||
}; | ||
/** | ||
@@ -78,3 +85,3 @@ * Creates a credential provider that will read from ini files and supports | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var data, ExternalId, mfa_serial, RoleArn, _a, RoleSessionName, source_profile, sourceCreds, params, _b, _c, _d; | ||
var data, ExternalId, mfa_serial, RoleArn, _a, RoleSessionName, source_profile, credential_source, sourceCreds, params, _b, _c, _d; | ||
var _e; | ||
@@ -91,8 +98,8 @@ return __generator(this, function (_f) { | ||
} | ||
if (!isAssumeRoleWithSourceProfile(data)) return [3 /*break*/, 4]; | ||
ExternalId = data.external_id, mfa_serial = data.mfa_serial, RoleArn = data.role_arn, _a = data.role_session_name, RoleSessionName = _a === void 0 ? "aws-sdk-js-" + Date.now() : _a, source_profile = data.source_profile; | ||
if (!(isAssumeRoleWithSourceProfile(data) || isAssumeRoleWithProviderProfile(data))) return [3 /*break*/, 4]; | ||
ExternalId = data.external_id, mfa_serial = data.mfa_serial, RoleArn = data.role_arn, _a = data.role_session_name, RoleSessionName = _a === void 0 ? "aws-sdk-js-" + Date.now() : _a, source_profile = data.source_profile, credential_source = data.credential_source; | ||
if (!options.roleAssumer) { | ||
throw new ProviderError("Profile " + profileName + " requires a role to be assumed, but no" + " role assumption callback was provided.", false); | ||
} | ||
if (source_profile in visitedProfiles) { | ||
if (source_profile && source_profile in visitedProfiles) { | ||
throw new ProviderError("Detected a cycle attempting to resolve credentials for profile" + | ||
@@ -102,3 +109,5 @@ (" " + getMasterProfileName(options) + ". Profiles visited: ") + | ||
} | ||
sourceCreds = resolveProfileData(source_profile, profiles, options, __assign(__assign({}, visitedProfiles), (_e = {}, _e[source_profile] = true, _e))); | ||
sourceCreds = source_profile | ||
? resolveProfileData(source_profile, profiles, options, __assign(__assign({}, visitedProfiles), (_e = {}, _e[source_profile] = true, _e))) | ||
: resolveCredentialSource(credential_source, profileName)(); | ||
params = { RoleArn: RoleArn, RoleSessionName: RoleSessionName, ExternalId: ExternalId }; | ||
@@ -140,2 +149,23 @@ if (!mfa_serial) return [3 /*break*/, 2]; | ||
}; | ||
/** | ||
* Resolve the `credential_source` entry from the profile, and return the | ||
* credential providers respectively. No memoization is needed for the | ||
* credential source providers because memoization should be added outside the | ||
* fromIni() provider. The source credential needs to be refreshed every time | ||
* fromIni() is called. | ||
*/ | ||
var resolveCredentialSource = function (credentialSource, profileName) { | ||
var sourceProvidersMap = { | ||
EcsContainer: fromContainerMetadata, | ||
Ec2InstanceMetadata: fromInstanceMetadata, | ||
Environment: fromEnv, | ||
}; | ||
if (credentialSource in sourceProvidersMap) { | ||
return sourceProvidersMap[credentialSource](); | ||
} | ||
else { | ||
throw new ProviderError("Unsupported credential source in profile " + profileName + ". Got " + credentialSource + ", " + | ||
"expected EcsContainer or Ec2InstanceMetadata or Environment."); | ||
} | ||
}; | ||
var resolveStaticCredentials = function (profile) { | ||
@@ -158,2 +188,2 @@ return Promise.resolve({ | ||
}); }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBbUMsYUFBYSxFQUFFLE1BQU0sMkNBQTJDLENBQUM7QUFDM0csT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzNELE9BQU8sRUFDTCxxQkFBcUIsR0FLdEIsTUFBTSxpQ0FBaUMsQ0FBQztBQUd6QyxJQUFNLGVBQWUsR0FBRyxTQUFTLENBQUM7QUFDbEMsTUFBTSxDQUFDLElBQU0sV0FBVyxHQUFHLGFBQWEsQ0FBQztBQXNGekMsSUFBTSxvQkFBb0IsR0FBRyxVQUFDLEdBQVE7SUFDcEMsT0FBQSxPQUFPLENBQUMsR0FBRyxDQ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XRfYWNjZXNzX2tleSxcbiAgICBzZXNzaW9uVG9rZW46IHByb2ZpbGUuYXdzX3Nlc3Npb25fdG9rZW4sXG4gIH0pO1xuXG5jb25zdCByZXNvbHZlV2ViSWRlbnRpdHlDcmVkZW50aWFscyA9IGFzeW5jIChwcm9maWxlOiBXZWJJZGVudGl0eVByb2ZpbGUsIG9wdGlvbnM6IEZyb21JbmlJbml0KTogUHJvbWlzZTxDcmVkZW50aWFscz4gPT5cbiAgZnJvbVRva2VuRmlsZSh7XG4gICAgd2ViSWRlbnRpdHlUb2tlbkZpbGU6IHByb2ZpbGUud2ViX2lkZW50aXR5X3Rva2VuX2ZpbGUsXG4gICAgcm9sZUFybjogcHJvZmlsZS5yb2xlX2FybixcbiAgICByb2xlU2Vzc2lvbk5hbWU6IHByb2ZpbGUucm9sZV9zZXNzaW9uX25hbWUsXG4gICAgcm9sZUFzc3VtZXJXaXRoV2ViSWRlbnRpdHk6IG9wdGlvbnMucm9sZUFzc3VtZXJXaXRoV2ViSWRlbnRpdHksXG4gIH0pKCk7XG4iXX0= |
{ | ||
"name": "@aws-sdk/credential-provider-ini", | ||
"version": "3.12.0", | ||
"version": "3.13.0", | ||
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config", | ||
@@ -24,2 +24,4 @@ "main": "./dist/cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/credential-provider-env": "3.12.0", | ||
"@aws-sdk/credential-provider-imds": "3.12.0", | ||
"@aws-sdk/credential-provider-web-identity": "3.12.0", | ||
@@ -26,0 +28,0 @@ "@aws-sdk/property-provider": "3.12.0", |
@@ -85,3 +85,3 @@ # @aws-sdk/credential-provider-ini | ||
### source profile with static credentials | ||
### profile with source profile | ||
@@ -98,2 +98,26 @@ ```ini | ||
### profile with source provider | ||
You can supply `credential_source` options to tell the SDK where to source | ||
credentials for the call to `AssumeRole`. The supported credential providers are | ||
listed bellow: | ||
```ini | ||
[default] | ||
role_arn=arn:aws:iam::123456789012:role/example-role-arn | ||
credential_source = Ec2InstanceMetadata | ||
``` | ||
```ini | ||
[default] | ||
role_arn=arn:aws:iam::123456789012:role/example-role-arn | ||
credential_source = Environment | ||
``` | ||
```ini | ||
[default] | ||
role_arn=arn:aws:iam::123456789012:role/example-role-arn | ||
credential_source = EcsContainer | ||
``` | ||
### profile with web_identity_token_file | ||
@@ -100,0 +124,0 @@ |
@@ -0,1 +1,3 @@ | ||
import { fromEnv } from "@aws-sdk/credential-provider-env"; | ||
import { fromContainerMetadata, fromInstanceMetadata } from "@aws-sdk/credential-provider-imds"; | ||
import { AssumeRoleWithWebIdentityParams, fromTokenFile } from "@aws-sdk/credential-provider-web-identity"; | ||
@@ -118,3 +120,4 @@ import { ProviderError } from "@aws-sdk/property-provider"; | ||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; | ||
interface AssumeRoleProfile extends Profile { | ||
interface AssumeRoleWithSourceProfile extends Profile { | ||
role_arn: string; | ||
@@ -124,7 +127,11 @@ source_profile: string; | ||
const isAssumeRoleWithSourceProfile = (arg: any): arg is AssumeRoleProfile => | ||
interface AssumeRoleWithProviderProfile extends Profile { | ||
role_arn: string; | ||
credential_source: string; | ||
} | ||
const isAssumeRoleProfile = (arg: any) => | ||
Boolean(arg) && | ||
typeof arg === "object" && | ||
typeof arg.role_arn === "string" && | ||
typeof arg.source_profile === "string" && | ||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && | ||
@@ -134,2 +141,8 @@ ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && | ||
const isAssumeRoleWithSourceProfile = (arg: any): arg is AssumeRoleWithSourceProfile => | ||
isAssumeRoleProfile(arg) && typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; | ||
const isAssumeRoleWithProviderProfile = (arg: any): arg is AssumeRoleWithProviderProfile => | ||
isAssumeRoleProfile(arg) && typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; | ||
/** | ||
@@ -183,3 +196,3 @@ * Creates a credential provider that will read from ini files and supports | ||
// given precedence over static credentials. | ||
if (isAssumeRoleWithSourceProfile(data)) { | ||
if (isAssumeRoleWithSourceProfile(data) || isAssumeRoleWithProviderProfile(data)) { | ||
const { | ||
@@ -191,2 +204,3 @@ external_id: ExternalId, | ||
source_profile, | ||
credential_source, | ||
} = data; | ||
@@ -201,3 +215,3 @@ | ||
if (source_profile in visitedProfiles) { | ||
if (source_profile && source_profile in visitedProfiles) { | ||
throw new ProviderError( | ||
@@ -211,6 +225,9 @@ `Detected a cycle attempting to resolve credentials for profile` + | ||
const sourceCreds = resolveProfileData(source_profile, profiles, options, { | ||
...visitedProfiles, | ||
[source_profile]: true, | ||
}); | ||
const sourceCreds = source_profile | ||
? resolveProfileData(source_profile, profiles, options, { | ||
...visitedProfiles, | ||
[source_profile]: true, | ||
}) | ||
: resolveCredentialSource(credential_source!, profileName)(); | ||
const params: AssumeRoleParams = { RoleArn, RoleSessionName, ExternalId }; | ||
@@ -251,2 +268,25 @@ if (mfa_serial) { | ||
/** | ||
* Resolve the `credential_source` entry from the profile, and return the | ||
* credential providers respectively. No memoization is needed for the | ||
* credential source providers because memoization should be added outside the | ||
* fromIni() provider. The source credential needs to be refreshed every time | ||
* fromIni() is called. | ||
*/ | ||
const resolveCredentialSource = (credentialSource: string, profileName: string): CredentialProvider => { | ||
const sourceProvidersMap: { [name: string]: () => CredentialProvider } = { | ||
EcsContainer: fromContainerMetadata, | ||
Ec2InstanceMetadata: fromInstanceMetadata, | ||
Environment: fromEnv, | ||
}; | ||
if (credentialSource in sourceProvidersMap) { | ||
return sourceProvidersMap[credentialSource](); | ||
} else { | ||
throw new ProviderError( | ||
`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + | ||
`expected EcsContainer or Ec2InstanceMetadata or Environment.` | ||
); | ||
} | ||
}; | ||
const resolveStaticCredentials = (profile: StaticCredsProfile): Promise<Credentials> => | ||
@@ -253,0 +293,0 @@ Promise.resolve({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114315
693
128
7
+ Added@aws-sdk/credential-provider-env@3.12.0(transitive)
+ Added@aws-sdk/credential-provider-imds@3.12.0(transitive)