mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 16:27:46 +00:00
Minor fix on redundant constant
This commit is contained in:
@@ -30,9 +30,8 @@ import { AwsIamAuthType, AwsIamCredentialType, DynamicSecretAwsIamSchema, TDynam
|
|||||||
import { compileUsernameTemplate } from "./templateUtils";
|
import { compileUsernameTemplate } from "./templateUtils";
|
||||||
|
|
||||||
// AWS STS duration constants (in seconds)
|
// AWS STS duration constants (in seconds)
|
||||||
const AWS_STS_MIN_DURATION = 900; // 15 minutes
|
const AWS_STS_MIN_DURATION = 900;
|
||||||
const AWS_STS_MAX_DURATION_SESSION_TOKEN = 43200; // 12 hours for GetSessionToken
|
const AWS_STS_MAX_DURATION_SESSION_TOKEN = 43200;
|
||||||
const AWS_STS_MAX_DURATION_ASSUME_ROLE = 43200; // 12 hours for AssumeRole
|
|
||||||
|
|
||||||
const generateUsername = (usernameTemplate?: string | null, identity?: { name: string }) => {
|
const generateUsername = (usernameTemplate?: string | null, identity?: { name: string }) => {
|
||||||
const randomUsername = alphaNumericNanoId(32);
|
const randomUsername = alphaNumericNanoId(32);
|
||||||
@@ -261,7 +260,7 @@ export const AwsIamProvider = (): TDynamicProviderFns => {
|
|||||||
: undefined
|
: undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
durationSeconds = Math.min(durationSeconds, AWS_STS_MAX_DURATION_ASSUME_ROLE);
|
durationSeconds = Math.min(durationSeconds, AWS_STS_MAX_DURATION_SESSION_TOKEN);
|
||||||
|
|
||||||
const assumeRoleRes = await stsClient.send(
|
const assumeRoleRes = await stsClient.send(
|
||||||
new AssumeRoleCommand({
|
new AssumeRoleCommand({
|
||||||
|
|||||||
Reference in New Issue
Block a user