fix: 修复配额说明重复和undefined问题
- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
201
backend/node_modules/@aws-sdk/credential-provider-ini/LICENSE
generated
vendored
Normal file
201
backend/node_modules/@aws-sdk/credential-provider-ini/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
11
backend/node_modules/@aws-sdk/credential-provider-ini/README.md
generated
vendored
Normal file
11
backend/node_modules/@aws-sdk/credential-provider-ini/README.md
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# @aws-sdk/credential-provider-ini
|
||||
|
||||
[](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini)
|
||||
[](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini)
|
||||
|
||||
> An internal package
|
||||
|
||||
## Usage
|
||||
|
||||
You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
|
||||
instead.
|
||||
224
backend/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
generated
vendored
Normal file
224
backend/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
'use strict';
|
||||
|
||||
var sharedIniFileLoader = require('@smithy/shared-ini-file-loader');
|
||||
var propertyProvider = require('@smithy/property-provider');
|
||||
var client = require('@aws-sdk/core/client');
|
||||
var credentialProviderLogin = require('@aws-sdk/credential-provider-login');
|
||||
|
||||
const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
||||
const sourceProvidersMap = {
|
||||
EcsContainer: async (options) => {
|
||||
const { fromHttp } = await import('@aws-sdk/credential-provider-http');
|
||||
const { fromContainerMetadata } = await import('@smithy/credential-provider-imds');
|
||||
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
||||
return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
||||
},
|
||||
Ec2InstanceMetadata: async (options) => {
|
||||
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
||||
const { fromInstanceMetadata } = await import('@smithy/credential-provider-imds');
|
||||
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
||||
},
|
||||
Environment: async (options) => {
|
||||
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
||||
const { fromEnv } = await import('@aws-sdk/credential-provider-env');
|
||||
return async () => fromEnv(options)().then(setNamedProvider);
|
||||
},
|
||||
};
|
||||
if (credentialSource in sourceProvidersMap) {
|
||||
return sourceProvidersMap[credentialSource];
|
||||
}
|
||||
else {
|
||||
throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +
|
||||
`expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
|
||||
}
|
||||
};
|
||||
const setNamedProvider = (creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
||||
|
||||
const isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
||||
return (Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.role_arn === "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 &&
|
||||
(isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));
|
||||
};
|
||||
const isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
|
||||
const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
|
||||
if (withSourceProfile) {
|
||||
logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
|
||||
}
|
||||
return withSourceProfile;
|
||||
};
|
||||
const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
||||
const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
|
||||
if (withProviderProfile) {
|
||||
logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
|
||||
}
|
||||
return withProviderProfile;
|
||||
};
|
||||
const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {
|
||||
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
||||
const profileData = profiles[profileName];
|
||||
const { source_profile, region } = profileData;
|
||||
if (!options.roleAssumer) {
|
||||
const { getDefaultRoleAssumer } = await import('@aws-sdk/nested-clients/sts');
|
||||
options.roleAssumer = getDefaultRoleAssumer({
|
||||
...options.clientConfig,
|
||||
credentialProviderLogger: options.logger,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
...options?.parentClientConfig,
|
||||
region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,
|
||||
},
|
||||
}, options.clientPlugins);
|
||||
}
|
||||
if (source_profile && source_profile in visitedProfiles) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +
|
||||
` ${sharedIniFileLoader.getProfileName(options)}. Profiles visited: ` +
|
||||
Object.keys(visitedProfiles).join(", "), { logger: options.logger });
|
||||
}
|
||||
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
||||
const sourceCredsProvider = source_profile
|
||||
? resolveProfileData(source_profile, profiles, options, callerClientConfig, {
|
||||
...visitedProfiles,
|
||||
[source_profile]: true,
|
||||
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
|
||||
: (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
|
||||
if (isCredentialSourceWithoutRoleArn(profileData)) {
|
||||
return sourceCredsProvider.then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
||||
}
|
||||
else {
|
||||
const params = {
|
||||
RoleArn: profileData.role_arn,
|
||||
RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
|
||||
ExternalId: profileData.external_id,
|
||||
DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10),
|
||||
};
|
||||
const { mfa_serial } = profileData;
|
||||
if (mfa_serial) {
|
||||
if (!options.mfaCodeProvider) {
|
||||
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
|
||||
}
|
||||
params.SerialNumber = mfa_serial;
|
||||
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
||||
}
|
||||
const sourceCreds = await sourceCredsProvider;
|
||||
return options.roleAssumer(sourceCreds, params).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
||||
}
|
||||
};
|
||||
const isCredentialSourceWithoutRoleArn = (section) => {
|
||||
return !section.role_arn && !!section.credential_source;
|
||||
};
|
||||
|
||||
const isLoginProfile = (data) => {
|
||||
return Boolean(data && data.login_session);
|
||||
};
|
||||
const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
||||
const credentials = await credentialProviderLogin.fromLoginCredentials({
|
||||
...options,
|
||||
profile: profileName,
|
||||
})({ callerClientConfig });
|
||||
return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
||||
};
|
||||
|
||||
const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
||||
const resolveProcessCredentials = async (options, profile) => import('@aws-sdk/credential-provider-process').then(({ fromProcess }) => fromProcess({
|
||||
...options,
|
||||
profile,
|
||||
})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
||||
|
||||
const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
||||
const { fromSSO } = await import('@aws-sdk/credential-provider-sso');
|
||||
return fromSSO({
|
||||
profile,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
clientConfig: options.clientConfig,
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => {
|
||||
if (profileData.sso_session) {
|
||||
return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
||||
}
|
||||
else {
|
||||
return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
|
||||
}
|
||||
});
|
||||
};
|
||||
const isSsoProfile = (arg) => arg &&
|
||||
(typeof arg.sso_start_url === "string" ||
|
||||
typeof arg.sso_account_id === "string" ||
|
||||
typeof arg.sso_session === "string" ||
|
||||
typeof arg.sso_region === "string" ||
|
||||
typeof arg.sso_role_name === "string");
|
||||
|
||||
const isStaticCredsProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.aws_access_key_id === "string" &&
|
||||
typeof arg.aws_secret_access_key === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
|
||||
["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
|
||||
const resolveStaticCredentials = async (profile, options) => {
|
||||
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
||||
const credentials = {
|
||||
accessKeyId: profile.aws_access_key_id,
|
||||
secretAccessKey: profile.aws_secret_access_key,
|
||||
sessionToken: profile.aws_session_token,
|
||||
...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
|
||||
...(profile.aws_account_id && { accountId: profile.aws_account_id }),
|
||||
};
|
||||
return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
||||
};
|
||||
|
||||
const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.web_identity_token_file === "string" &&
|
||||
typeof arg.role_arn === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
||||
const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import('@aws-sdk/credential-provider-web-identity').then(({ fromTokenFile }) => fromTokenFile({
|
||||
webIdentityTokenFile: profile.web_identity_token_file,
|
||||
roleArn: profile.role_arn,
|
||||
roleSessionName: profile.role_session_name,
|
||||
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
||||
|
||||
const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
||||
const data = profiles[profileName];
|
||||
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
||||
return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
|
||||
}
|
||||
if (isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isWebIdentityProfile(data)) {
|
||||
return resolveWebIdentityCredentials(data, options, callerClientConfig);
|
||||
}
|
||||
if (isProcessProfile(data)) {
|
||||
return resolveProcessCredentials(options, profileName);
|
||||
}
|
||||
if (isSsoProfile(data)) {
|
||||
return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
|
||||
}
|
||||
if (isLoginProfile(data)) {
|
||||
return resolveLoginCredentials(profileName, options, callerClientConfig);
|
||||
}
|
||||
throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
||||
};
|
||||
|
||||
const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
||||
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
|
||||
return resolveProfileData(sharedIniFileLoader.getProfileName({
|
||||
profile: init.profile ?? callerClientConfig?.profile,
|
||||
}), profiles, init, callerClientConfig);
|
||||
};
|
||||
|
||||
exports.fromIni = fromIni;
|
||||
9
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
generated
vendored
Normal file
9
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader";
|
||||
import { resolveProfileData } from "./resolveProfileData";
|
||||
export const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
||||
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
||||
const profiles = await parseKnownFiles(init);
|
||||
return resolveProfileData(getProfileName({
|
||||
profile: init.profile ?? callerClientConfig?.profile,
|
||||
}), profiles, init, callerClientConfig);
|
||||
};
|
||||
1
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./fromIni";
|
||||
80
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
generated
vendored
Normal file
80
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
import { CredentialsProviderError } from "@smithy/property-provider";
|
||||
import { getProfileName } from "@smithy/shared-ini-file-loader";
|
||||
import { resolveCredentialSource } from "./resolveCredentialSource";
|
||||
export const isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
||||
return (Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.role_arn === "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 &&
|
||||
(isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));
|
||||
};
|
||||
const isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
|
||||
const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
|
||||
if (withSourceProfile) {
|
||||
logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
|
||||
}
|
||||
return withSourceProfile;
|
||||
};
|
||||
const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
||||
const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
|
||||
if (withProviderProfile) {
|
||||
logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
|
||||
}
|
||||
return withProviderProfile;
|
||||
};
|
||||
export const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {
|
||||
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
||||
const profileData = profiles[profileName];
|
||||
const { source_profile, region } = profileData;
|
||||
if (!options.roleAssumer) {
|
||||
const { getDefaultRoleAssumer } = await import("@aws-sdk/nested-clients/sts");
|
||||
options.roleAssumer = getDefaultRoleAssumer({
|
||||
...options.clientConfig,
|
||||
credentialProviderLogger: options.logger,
|
||||
parentClientConfig: {
|
||||
...callerClientConfig,
|
||||
...options?.parentClientConfig,
|
||||
region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,
|
||||
},
|
||||
}, options.clientPlugins);
|
||||
}
|
||||
if (source_profile && source_profile in visitedProfiles) {
|
||||
throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +
|
||||
` ${getProfileName(options)}. Profiles visited: ` +
|
||||
Object.keys(visitedProfiles).join(", "), { logger: options.logger });
|
||||
}
|
||||
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
||||
const sourceCredsProvider = source_profile
|
||||
? resolveProfileData(source_profile, profiles, options, callerClientConfig, {
|
||||
...visitedProfiles,
|
||||
[source_profile]: true,
|
||||
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
|
||||
: (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
|
||||
if (isCredentialSourceWithoutRoleArn(profileData)) {
|
||||
return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
||||
}
|
||||
else {
|
||||
const params = {
|
||||
RoleArn: profileData.role_arn,
|
||||
RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
|
||||
ExternalId: profileData.external_id,
|
||||
DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10),
|
||||
};
|
||||
const { mfa_serial } = profileData;
|
||||
if (mfa_serial) {
|
||||
if (!options.mfaCodeProvider) {
|
||||
throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
|
||||
}
|
||||
params.SerialNumber = mfa_serial;
|
||||
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
||||
}
|
||||
const sourceCreds = await sourceCredsProvider;
|
||||
return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
||||
}
|
||||
};
|
||||
const isCredentialSourceWithoutRoleArn = (section) => {
|
||||
return !section.role_arn && !!section.credential_source;
|
||||
};
|
||||
30
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
generated
vendored
Normal file
30
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
import { chain, CredentialsProviderError } from "@smithy/property-provider";
|
||||
export const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
||||
const sourceProvidersMap = {
|
||||
EcsContainer: async (options) => {
|
||||
const { fromHttp } = await import("@aws-sdk/credential-provider-http");
|
||||
const { fromContainerMetadata } = await import("@smithy/credential-provider-imds");
|
||||
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
||||
return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
||||
},
|
||||
Ec2InstanceMetadata: async (options) => {
|
||||
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
||||
const { fromInstanceMetadata } = await import("@smithy/credential-provider-imds");
|
||||
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
||||
},
|
||||
Environment: async (options) => {
|
||||
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
||||
const { fromEnv } = await import("@aws-sdk/credential-provider-env");
|
||||
return async () => fromEnv(options)().then(setNamedProvider);
|
||||
},
|
||||
};
|
||||
if (credentialSource in sourceProvidersMap) {
|
||||
return sourceProvidersMap[credentialSource];
|
||||
}
|
||||
else {
|
||||
throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +
|
||||
`expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
|
||||
}
|
||||
};
|
||||
const setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
||||
12
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
generated
vendored
Normal file
12
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
import { fromLoginCredentials } from "@aws-sdk/credential-provider-login";
|
||||
export const isLoginProfile = (data) => {
|
||||
return Boolean(data && data.login_session);
|
||||
};
|
||||
export const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
||||
const credentials = await fromLoginCredentials({
|
||||
...options,
|
||||
profile: profileName,
|
||||
})({ callerClientConfig });
|
||||
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
||||
};
|
||||
6
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
generated
vendored
Normal file
6
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
export const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
||||
export const resolveProcessCredentials = async (options, profile) => import("@aws-sdk/credential-provider-process").then(({ fromProcess }) => fromProcess({
|
||||
...options,
|
||||
profile,
|
||||
})().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
||||
32
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
generated
vendored
Normal file
32
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { CredentialsProviderError } from "@smithy/property-provider";
|
||||
import { isAssumeRoleProfile, resolveAssumeRoleCredentials } from "./resolveAssumeRoleCredentials";
|
||||
import { isLoginProfile, resolveLoginCredentials } from "./resolveLoginCredentials";
|
||||
import { isProcessProfile, resolveProcessCredentials } from "./resolveProcessCredentials";
|
||||
import { isSsoProfile, resolveSsoCredentials } from "./resolveSsoCredentials";
|
||||
import { isStaticCredsProfile, resolveStaticCredentials } from "./resolveStaticCredentials";
|
||||
import { isWebIdentityProfile, resolveWebIdentityCredentials } from "./resolveWebIdentityCredentials";
|
||||
export const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
||||
const data = profiles[profileName];
|
||||
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
||||
return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
|
||||
}
|
||||
if (isStaticCredsProfile(data)) {
|
||||
return resolveStaticCredentials(data, options);
|
||||
}
|
||||
if (isWebIdentityProfile(data)) {
|
||||
return resolveWebIdentityCredentials(data, options, callerClientConfig);
|
||||
}
|
||||
if (isProcessProfile(data)) {
|
||||
return resolveProcessCredentials(options, profileName);
|
||||
}
|
||||
if (isSsoProfile(data)) {
|
||||
return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
|
||||
}
|
||||
if (isLoginProfile(data)) {
|
||||
return resolveLoginCredentials(profileName, options, callerClientConfig);
|
||||
}
|
||||
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
||||
};
|
||||
25
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
generated
vendored
Normal file
25
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
export const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
||||
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
||||
return fromSSO({
|
||||
profile,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
clientConfig: options.clientConfig,
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => {
|
||||
if (profileData.sso_session) {
|
||||
return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
||||
}
|
||||
else {
|
||||
return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
|
||||
}
|
||||
});
|
||||
};
|
||||
export const isSsoProfile = (arg) => arg &&
|
||||
(typeof arg.sso_start_url === "string" ||
|
||||
typeof arg.sso_account_id === "string" ||
|
||||
typeof arg.sso_session === "string" ||
|
||||
typeof arg.sso_region === "string" ||
|
||||
typeof arg.sso_role_name === "string");
|
||||
18
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
generated
vendored
Normal file
18
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
export const isStaticCredsProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.aws_access_key_id === "string" &&
|
||||
typeof arg.aws_secret_access_key === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
|
||||
["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
|
||||
export const resolveStaticCredentials = async (profile, options) => {
|
||||
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
||||
const credentials = {
|
||||
accessKeyId: profile.aws_access_key_id,
|
||||
secretAccessKey: profile.aws_secret_access_key,
|
||||
sessionToken: profile.aws_session_token,
|
||||
...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
|
||||
...(profile.aws_account_id && { accountId: profile.aws_account_id }),
|
||||
};
|
||||
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
||||
};
|
||||
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
generated
vendored
Normal file
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
export const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.web_identity_token_file === "string" &&
|
||||
typeof arg.role_arn === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
||||
export const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import("@aws-sdk/credential-provider-web-identity").then(({ fromTokenFile }) => fromTokenFile({
|
||||
webIdentityTokenFile: profile.web_identity_token_file,
|
||||
roleArn: profile.role_arn,
|
||||
roleSessionName: profile.role_session_name,
|
||||
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
||||
logger: options.logger,
|
||||
parentClientConfig: options.parentClientConfig,
|
||||
})({
|
||||
callerClientConfig,
|
||||
}).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
||||
55
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts
generated
vendored
Normal file
55
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { FromLoginCredentialsInit } from "@aws-sdk/credential-provider-login";
|
||||
import type { AssumeRoleWithWebIdentityParams } from "@aws-sdk/credential-provider-web-identity";
|
||||
import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
|
||||
import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
|
||||
import type { AwsCredentialIdentity, Pluggable } from "@smithy/types";
|
||||
import { AssumeRoleParams } from "./resolveAssumeRoleCredentials";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface FromIniInit extends SourceProfileInit, CredentialProviderOptions, FromLoginCredentialsInit {
|
||||
/**
|
||||
* A function that returns a promise fulfilled with an MFA token code for
|
||||
* the provided MFA Serial code. If a profile requires an MFA code and
|
||||
* `mfaCodeProvider` is not a valid function, the credential provider
|
||||
* promise will be rejected.
|
||||
*
|
||||
* @param mfaSerial The serial code of the MFA device specified.
|
||||
*/
|
||||
mfaCodeProvider?: (mfaSerial: string) => Promise<string>;
|
||||
/**
|
||||
* A function that assumes a role and returns a promise fulfilled with
|
||||
* credentials for the assumed role.
|
||||
*
|
||||
* @param sourceCreds The credentials with which to assume a role.
|
||||
* @param params
|
||||
*/
|
||||
roleAssumer?: (sourceCreds: AwsCredentialIdentity, params: AssumeRoleParams) => Promise<AwsCredentialIdentity>;
|
||||
/**
|
||||
* A function that assumes a role with web identity and returns a promise fulfilled with
|
||||
* credentials for the assumed role.
|
||||
*
|
||||
* @param sourceCreds The credentials with which to assume a role.
|
||||
* @param params
|
||||
*/
|
||||
roleAssumerWithWebIdentity?: (params: AssumeRoleWithWebIdentityParams) => Promise<AwsCredentialIdentity>;
|
||||
/**
|
||||
* AWS SDK Client configuration to be used for creating inner client
|
||||
* for auth operations. Inner clients include STS, SSO, and Signin clients.
|
||||
* @internal
|
||||
*/
|
||||
clientConfig?: any;
|
||||
clientPlugins?: Pluggable<any, any>[];
|
||||
/**
|
||||
* When true, always reload credentials from the file system instead of using cached values.
|
||||
* This is useful when you need to detect changes to the credentials file.
|
||||
*/
|
||||
ignoreCache?: boolean;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* Creates a credential provider that will read from ini files and supports
|
||||
* role assumption and multi-factor authentication.
|
||||
*/
|
||||
export declare const fromIni: (init?: FromIniInit) => RuntimeConfigAwsCredentialIdentityProvider;
|
||||
4
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/index.d.ts
generated
vendored
Normal file
4
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export * from "./fromIni";
|
||||
48
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts
generated
vendored
Normal file
48
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { Logger, ParsedIniData } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
import type { ResolveProfileData } from "./resolveProfileData";
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleCommand/
|
||||
*/
|
||||
export interface AssumeRoleParams {
|
||||
/**
|
||||
* The identifier of the role to be assumed.
|
||||
*/
|
||||
RoleArn: string;
|
||||
/**
|
||||
* A name for the assumed role session.
|
||||
*/
|
||||
RoleSessionName: string;
|
||||
/**
|
||||
* A unique identifier that is used by third parties when assuming roles in
|
||||
* their customers' accounts.
|
||||
*/
|
||||
ExternalId?: string;
|
||||
/**
|
||||
* The identification number of the MFA device that is associated with the
|
||||
* user who is making the `AssumeRole` call.
|
||||
*/
|
||||
SerialNumber?: string;
|
||||
/**
|
||||
* The value provided by the MFA device.
|
||||
*/
|
||||
TokenCode?: string;
|
||||
/**
|
||||
* The duration, in seconds, of the role session.
|
||||
*/
|
||||
DurationSeconds?: number;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const isAssumeRoleProfile: (arg: any, { profile, logger }?: {
|
||||
profile?: string;
|
||||
logger?: Logger;
|
||||
}) => boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, callerClientConfig: AwsIdentityProperties["callerClientConfig"] | undefined, visitedProfiles: Record<string, true> | undefined, resolveProfileData: ResolveProfileData) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
||||
12
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts
generated
vendored
Normal file
12
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
||||
import { AwsCredentialIdentityProvider, Logger } from "@smithy/types";
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
export declare const resolveCredentialSource: (credentialSource: string, profileName: string, logger?: Logger) => ((options?: CredentialProviderOptions) => Promise<AwsCredentialIdentityProvider>);
|
||||
11
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveLoginCredentials.d.ts
generated
vendored
Normal file
11
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveLoginCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import type { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
||||
import type { FromIniInit } from "./fromIni";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const isLoginProfile: (data: ParsedIniData[string]) => boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveLoginCredentials: (profileName: string, options: FromIniInit, callerClientConfig?: AwsIdentityProperties["callerClientConfig"]) => Promise<AwsCredentialIdentity>;
|
||||
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProcessCredentials.d.ts
generated
vendored
Normal file
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProcessCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Credentials, Profile } from "@aws-sdk/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface ProcessProfile extends Profile {
|
||||
credential_process: string;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const isProcessProfile: (arg: any) => arg is ProcessProfile;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveProcessCredentials: (options: FromIniInit, profile: string) => Promise<Credentials>;
|
||||
19
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts
generated
vendored
Normal file
19
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import type { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export type ResolveProfileData = typeof resolveProfileData;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveProfileData: (profileName: string, profiles: ParsedIniData, options: FromIniInit, callerClientConfig?: AwsIdentityProperties["callerClientConfig"], visitedProfiles?: Record<string, true>,
|
||||
/**
|
||||
* This override comes from recursive calls only.
|
||||
* It is used to flag a recursive profile section
|
||||
* that does not have a role_arn, e.g. a credential_source
|
||||
* with no role_arn, as part of a larger recursive assume-role
|
||||
* call stack, and to re-enter the assume-role resolver function.
|
||||
*/
|
||||
isAssumeRoleRecursiveCall?: boolean) => Promise<AwsCredentialIdentity>;
|
||||
13
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts
generated
vendored
Normal file
13
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
||||
import type { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import type { IniSection, Profile } from "@smithy/types";
|
||||
import type { FromIniInit } from "./fromIni";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveSsoCredentials: (profile: string, profileData: IniSection, options?: FromIniInit, callerClientConfig?: AwsIdentityProperties["callerClientConfig"]) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
||||
/**
|
||||
* @internal
|
||||
* duplicated from \@aws-sdk/credential-provider-sso to defer import.
|
||||
*/
|
||||
export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
|
||||
20
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts
generated
vendored
Normal file
20
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { AwsCredentialIdentity, Profile } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface StaticCredsProfile extends Profile {
|
||||
aws_access_key_id: string;
|
||||
aws_secret_access_key: string;
|
||||
aws_session_token?: string;
|
||||
aws_credential_scope?: string;
|
||||
aws_account_id?: string;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const isStaticCredsProfile: (arg: any) => arg is StaticCredsProfile;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveStaticCredentials: (profile: StaticCredsProfile, options?: FromIniInit) => Promise<AwsCredentialIdentity>;
|
||||
19
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts
generated
vendored
Normal file
19
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { AwsCredentialIdentity, Profile } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface WebIdentityProfile extends Profile {
|
||||
web_identity_token_file: string;
|
||||
role_arn: string;
|
||||
role_session_name?: string;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const isWebIdentityProfile: (arg: any) => arg is WebIdentityProfile;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveWebIdentityCredentials: (profile: WebIdentityProfile, options: FromIniInit, callerClientConfig?: AwsIdentityProperties["callerClientConfig"]) => Promise<AwsCredentialIdentity>;
|
||||
28
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts
generated
vendored
Normal file
28
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { FromLoginCredentialsInit } from "@aws-sdk/credential-provider-login";
|
||||
import { AssumeRoleWithWebIdentityParams } from "@aws-sdk/credential-provider-web-identity";
|
||||
import {
|
||||
CredentialProviderOptions,
|
||||
RuntimeConfigAwsCredentialIdentityProvider,
|
||||
} from "@aws-sdk/types";
|
||||
import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
|
||||
import { AwsCredentialIdentity, Pluggable } from "@smithy/types";
|
||||
import { AssumeRoleParams } from "./resolveAssumeRoleCredentials";
|
||||
export interface FromIniInit
|
||||
extends SourceProfileInit,
|
||||
CredentialProviderOptions,
|
||||
FromLoginCredentialsInit {
|
||||
mfaCodeProvider?: (mfaSerial: string) => Promise<string>;
|
||||
roleAssumer?: (
|
||||
sourceCreds: AwsCredentialIdentity,
|
||||
params: AssumeRoleParams
|
||||
) => Promise<AwsCredentialIdentity>;
|
||||
roleAssumerWithWebIdentity?: (
|
||||
params: AssumeRoleWithWebIdentityParams
|
||||
) => Promise<AwsCredentialIdentity>;
|
||||
clientConfig?: any;
|
||||
clientPlugins?: Pluggable<any, any>[];
|
||||
ignoreCache?: boolean;
|
||||
}
|
||||
export declare const fromIni: (
|
||||
init?: FromIniInit
|
||||
) => RuntimeConfigAwsCredentialIdentityProvider;
|
||||
1
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/index.d.ts
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./fromIni";
|
||||
30
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts
generated
vendored
Normal file
30
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { Logger, ParsedIniData } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
import { ResolveProfileData } from "./resolveProfileData";
|
||||
export interface AssumeRoleParams {
|
||||
RoleArn: string;
|
||||
RoleSessionName: string;
|
||||
ExternalId?: string;
|
||||
SerialNumber?: string;
|
||||
TokenCode?: string;
|
||||
DurationSeconds?: number;
|
||||
}
|
||||
export declare const isAssumeRoleProfile: (
|
||||
arg: any,
|
||||
{
|
||||
profile,
|
||||
logger,
|
||||
}?: {
|
||||
profile?: string;
|
||||
logger?: Logger;
|
||||
}
|
||||
) => boolean;
|
||||
export declare const resolveAssumeRoleCredentials: (
|
||||
profileName: string,
|
||||
profiles: ParsedIniData,
|
||||
options: FromIniInit,
|
||||
callerClientConfig: AwsIdentityProperties["callerClientConfig"] | undefined,
|
||||
visitedProfiles: Record<string, true> | undefined,
|
||||
resolveProfileData: ResolveProfileData
|
||||
) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
||||
9
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveCredentialSource.d.ts
generated
vendored
Normal file
9
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveCredentialSource.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { CredentialProviderOptions } from "@aws-sdk/types";
|
||||
import { AwsCredentialIdentityProvider, Logger } from "@smithy/types";
|
||||
export declare const resolveCredentialSource: (
|
||||
credentialSource: string,
|
||||
profileName: string,
|
||||
logger?: Logger
|
||||
) => (
|
||||
options?: CredentialProviderOptions
|
||||
) => Promise<AwsCredentialIdentityProvider>;
|
||||
9
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveLoginCredentials.d.ts
generated
vendored
Normal file
9
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveLoginCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
export declare const isLoginProfile: (data: ParsedIniData[string]) => boolean;
|
||||
export declare const resolveLoginCredentials: (
|
||||
profileName: string,
|
||||
options: FromIniInit,
|
||||
callerClientConfig?: AwsIdentityProperties["callerClientConfig"]
|
||||
) => Promise<AwsCredentialIdentity>;
|
||||
10
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProcessCredentials.d.ts
generated
vendored
Normal file
10
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProcessCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Credentials, Profile } from "@aws-sdk/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
export interface ProcessProfile extends Profile {
|
||||
credential_process: string;
|
||||
}
|
||||
export declare const isProcessProfile: (arg: any) => arg is ProcessProfile;
|
||||
export declare const resolveProcessCredentials: (
|
||||
options: FromIniInit,
|
||||
profile: string
|
||||
) => Promise<Credentials>;
|
||||
12
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts
generated
vendored
Normal file
12
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
export type ResolveProfileData = typeof resolveProfileData;
|
||||
export declare const resolveProfileData: (
|
||||
profileName: string,
|
||||
profiles: ParsedIniData,
|
||||
options: FromIniInit,
|
||||
callerClientConfig?: AwsIdentityProperties["callerClientConfig"],
|
||||
visitedProfiles?: Record<string, true>,
|
||||
isAssumeRoleRecursiveCall?: boolean
|
||||
) => Promise<AwsCredentialIdentity>;
|
||||
11
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts
generated
vendored
Normal file
11
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
||||
import { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { IniSection, Profile } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
export declare const resolveSsoCredentials: (
|
||||
profile: string,
|
||||
profileData: IniSection,
|
||||
options?: FromIniInit,
|
||||
callerClientConfig?: AwsIdentityProperties["callerClientConfig"]
|
||||
) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
||||
export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
|
||||
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts
generated
vendored
Normal file
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { AwsCredentialIdentity, Profile } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
export interface StaticCredsProfile extends Profile {
|
||||
aws_access_key_id: string;
|
||||
aws_secret_access_key: string;
|
||||
aws_session_token?: string;
|
||||
aws_credential_scope?: string;
|
||||
aws_account_id?: string;
|
||||
}
|
||||
export declare const isStaticCredsProfile: (
|
||||
arg: any
|
||||
) => arg is StaticCredsProfile;
|
||||
export declare const resolveStaticCredentials: (
|
||||
profile: StaticCredsProfile,
|
||||
options?: FromIniInit
|
||||
) => Promise<AwsCredentialIdentity>;
|
||||
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveWebIdentityCredentials.d.ts
generated
vendored
Normal file
16
backend/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveWebIdentityCredentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { AwsIdentityProperties } from "@aws-sdk/types";
|
||||
import { AwsCredentialIdentity, Profile } from "@smithy/types";
|
||||
import { FromIniInit } from "./fromIni";
|
||||
export interface WebIdentityProfile extends Profile {
|
||||
web_identity_token_file: string;
|
||||
role_arn: string;
|
||||
role_session_name?: string;
|
||||
}
|
||||
export declare const isWebIdentityProfile: (
|
||||
arg: any
|
||||
) => arg is WebIdentityProfile;
|
||||
export declare const resolveWebIdentityCredentials: (
|
||||
profile: WebIdentityProfile,
|
||||
options: FromIniInit,
|
||||
callerClientConfig?: AwsIdentityProperties["callerClientConfig"]
|
||||
) => Promise<AwsCredentialIdentity>;
|
||||
74
backend/node_modules/@aws-sdk/credential-provider-ini/package.json
generated
vendored
Normal file
74
backend/node_modules/@aws-sdk/credential-provider-ini/package.json
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"name": "@aws-sdk/credential-provider-ini",
|
||||
"version": "3.971.0",
|
||||
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
||||
"main": "./dist-cjs/index.js",
|
||||
"module": "./dist-es/index.js",
|
||||
"scripts": {
|
||||
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
||||
"build:cjs": "node ../../scripts/compilation/inline credential-provider-ini",
|
||||
"build:es": "tsc -p tsconfig.es.json",
|
||||
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
||||
"build:types": "tsc -p tsconfig.types.json",
|
||||
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
||||
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
||||
"test": "yarn g:vitest run",
|
||||
"test:watch": "yarn g:vitest watch",
|
||||
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
|
||||
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
||||
},
|
||||
"keywords": [
|
||||
"aws",
|
||||
"credentials"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"author": {
|
||||
"name": "AWS SDK for JavaScript Team",
|
||||
"url": "https://aws.amazon.com/javascript/"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@aws-sdk/core": "3.970.0",
|
||||
"@aws-sdk/credential-provider-env": "3.970.0",
|
||||
"@aws-sdk/credential-provider-http": "3.970.0",
|
||||
"@aws-sdk/credential-provider-login": "3.971.0",
|
||||
"@aws-sdk/credential-provider-process": "3.970.0",
|
||||
"@aws-sdk/credential-provider-sso": "3.971.0",
|
||||
"@aws-sdk/credential-provider-web-identity": "3.971.0",
|
||||
"@aws-sdk/nested-clients": "3.971.0",
|
||||
"@aws-sdk/types": "3.969.0",
|
||||
"@smithy/credential-provider-imds": "^4.2.8",
|
||||
"@smithy/property-provider": "^4.2.8",
|
||||
"@smithy/shared-ini-file-loader": "^4.4.3",
|
||||
"@smithy/types": "^4.12.0",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/recommended": "1.0.1",
|
||||
"@types/node": "^20.14.8",
|
||||
"concurrently": "7.0.0",
|
||||
"downlevel-dts": "0.10.1",
|
||||
"rimraf": "5.0.10",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"types": "./dist-types/index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"typesVersions": {
|
||||
"<4.0": {
|
||||
"dist-types/*": [
|
||||
"dist-types/ts3.4/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist-*/**"
|
||||
],
|
||||
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-ini",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
||||
"directory": "packages/credential-provider-ini"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user