mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 03:28:15 +00:00
feat: removed console log
This commit is contained in:
@@ -46,7 +46,6 @@ export const AwsIamProvider = (): TDynamicProviderFns => {
|
|||||||
const $getClient = async (providerInputs: z.infer<typeof DynamicSecretAwsIamSchema>, projectId: string) => {
|
const $getClient = async (providerInputs: z.infer<typeof DynamicSecretAwsIamSchema>, projectId: string) => {
|
||||||
const appCfg = getConfig();
|
const appCfg = getConfig();
|
||||||
if (providerInputs.method === AwsIamAuthType.AssumeRole) {
|
if (providerInputs.method === AwsIamAuthType.AssumeRole) {
|
||||||
console.log(appCfg.DYNAMIC_SECRET_AWS_ACCESS_KEY_ID, appCfg.DYNAMIC_SECRET_AWS_SECRET_ACCESS_KEY);
|
|
||||||
const stsClient = new STSClient({
|
const stsClient = new STSClient({
|
||||||
region: providerInputs.region,
|
region: providerInputs.region,
|
||||||
credentials:
|
credentials:
|
||||||
@@ -70,7 +69,6 @@ export const AwsIamProvider = (): TDynamicProviderFns => {
|
|||||||
if (!assumeRes.Credentials?.AccessKeyId || !assumeRes.Credentials?.SecretAccessKey) {
|
if (!assumeRes.Credentials?.AccessKeyId || !assumeRes.Credentials?.SecretAccessKey) {
|
||||||
throw new BadRequestError({ message: "Failed to assume role - verify credentials and role configuration" });
|
throw new BadRequestError({ message: "Failed to assume role - verify credentials and role configuration" });
|
||||||
}
|
}
|
||||||
console.log(assumeRes.Credentials);
|
|
||||||
const client = new IAMClient({
|
const client = new IAMClient({
|
||||||
region: providerInputs.region,
|
region: providerInputs.region,
|
||||||
credentials: {
|
credentials: {
|
||||||
@@ -125,7 +123,6 @@ export const AwsIamProvider = (): TDynamicProviderFns => {
|
|||||||
|
|
||||||
const username = generateUsername(usernameTemplate);
|
const username = generateUsername(usernameTemplate);
|
||||||
const { policyArns, userGroups, policyDocument, awsPath, permissionBoundaryPolicyArn } = providerInputs;
|
const { policyArns, userGroups, policyDocument, awsPath, permissionBoundaryPolicyArn } = providerInputs;
|
||||||
console.log("Hit");
|
|
||||||
const createUserRes = await client.send(
|
const createUserRes = await client.send(
|
||||||
new CreateUserCommand({
|
new CreateUserCommand({
|
||||||
Path: awsPath,
|
Path: awsPath,
|
||||||
@@ -135,7 +132,6 @@ export const AwsIamProvider = (): TDynamicProviderFns => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("Hit fail");
|
|
||||||
if (!createUserRes.User) throw new BadRequestError({ message: "Failed to create AWS IAM User" });
|
if (!createUserRes.User) throw new BadRequestError({ message: "Failed to create AWS IAM User" });
|
||||||
if (userGroups) {
|
if (userGroups) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ Replace **\<account id\>** with your AWS account id and **\<aws-scope-path\>** w
|
|||||||

|

|
||||||
|
|
||||||
<Tip>
|
<Tip>
|
||||||
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret in step 4.
|
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret in step 4.
|
||||||
</Tip>
|
</Tip>
|
||||||
|
|
||||||
Once you click the `Submit` button, a new secret lease will be generated and the credentials for it will be shown to you.
|
Once you click the `Submit` button, a new secret lease will be generated and the credentials for it will be shown to you.
|
||||||
@@ -280,7 +280,7 @@ Replace **\<account id\>** with your AWS account id and **\<aws-scope-path\>** w
|
|||||||

|

|
||||||
|
|
||||||
<Tip>
|
<Tip>
|
||||||
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret in step 4.
|
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret in step 4.
|
||||||
</Tip>
|
</Tip>
|
||||||
|
|
||||||
Once you click the `Submit` button, a new secret lease will be generated and the credentials for it will be shown to you.
|
Once you click the `Submit` button, a new secret lease will be generated and the credentials for it will be shown to you.
|
||||||
|
|||||||
Reference in New Issue
Block a user