Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

address greptile comments

adilson74de68275eff
diff --git a/backend/src/ee/services/dynamic-secret/providers/models.ts b/backend/src/ee/services/dynamic-secret/providers/models.ts
index 54a67fb4f4..d74f7a3136 100644
--- a/backend/src/ee/services/dynamic-secret/providers/models.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/models.ts
@@ -317,20 +317,6 @@ export const DynamicSecretAwsIamSchema = z.preprocess(
const countCsvArns = (value: string) => value.split(",").filter((arn) => arn.trim()).length;
if (data.credentialType === AwsIamCredentialType.TemporaryCredentials) {
- // policyArns/policyDocument grant permissions to created IAM users; temporary credentials are restricted via session policies instead
- if (data.policyArns) {
- reject(
- "policyArns",
- "Policy ARNs only apply to the IAM User credential type. To restrict temporary credentials, use Session Policy ARNs with the Assume Role method."
- );
- }
- if (data.policyDocument) {
- reject(
- "policyDocument",
- "A policy document only applies to the IAM User credential type. To restrict temporary credentials, use a Session Policy Document with the Assume Role method."
- );
- }
-
// session policy fields exist only on the AssumeRole member (STS AssumeRole alone supports them; GetSessionToken,
// used by access key / IRSA, has no Policy/PolicyArns params), so this guard also narrows the type for TS
if (data.method === AwsIamAuthType.AssumeRole) {
diff --git a/frontend/src/hooks/api/dynamicSecret/types.ts b/frontend/src/hooks/api/dynamicSecret/types.ts
index c8b0775683..54f8340390 100644
--- a/frontend/src/hooks/api/dynamicSecret/types.ts
+++ b/frontend/src/hooks/api/dynamicSecret/types.ts
@@ -141,8 +141,6 @@ export type TDynamicSecretProvider =
policyDocument?: string;
userGroups?: string;
policyArns?: string;
- sessionPolicyArns?: string;
- sessionPolicyDocument?: string;
}
| {
method: DynamicSecretAwsIamAuth.AssumeRole;
@@ -164,8 +162,6 @@ export type TDynamicSecretProvider =
policyDocument?: string;
userGroups?: string;
policyArns?: string;
- sessionPolicyArns?: string;
- sessionPolicyDocument?: string;
};
}
| {