Skip to content

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

address review

x03220547484fbc8668
diff --git a/backend/src/db/migrations/20260603030053_pam-revamp.ts b/backend/src/db/migrations/20260603030053_pam-revamp.ts
index 74d919b02e..35d90b0a52 100644
--- a/backend/src/db/migrations/20260603030053_pam-revamp.ts
+++ b/backend/src/db/migrations/20260603030053_pam-revamp.ts
@@ -32,8 +32,8 @@ const seedDefaultTemplates = async (knex: Knex, projectId: string) => {
projectId,
name: template.name,
type: template.type,
- accessPolicy: JSON.stringify(template.accessPolicy),
- settings: JSON.stringify(template.settings)
+ accessPolicy: template.accessPolicy,
+ settings: template.settings
})
.onConflict(["projectId", "name"])
.ignore();
diff --git a/backend/src/ee/services/pam-account-template/pam-account-template-service.ts b/backend/src/ee/services/pam-account-template/pam-account-template-service.ts
index 7825ee4e43..1ba735b1d6 100644
--- a/backend/src/ee/services/pam-account-template/pam-account-template-service.ts
+++ b/backend/src/ee/services/pam-account-template/pam-account-template-service.ts
@@ -73,8 +73,8 @@ export const pamAccountTemplateServiceFactory = (deps: TPamAccountTemplateServic
name,
description,
type,
- accessPolicy: accessPolicy ? JSON.stringify(accessPolicy) : undefined,
- settings: settings ? JSON.stringify(settings) : undefined,
+ accessPolicy: accessPolicy ?? undefined,
+ settings: settings ?? undefined,
gatewayId,
gatewayPoolId,
recordingConnectionId
@@ -114,8 +114,8 @@ export const pamAccountTemplateServiceFactory = (deps: TPamAccountTemplateServic
const updateData: Record<string, unknown> = {};
if (name !== undefined) updateData.name = name;
if (description !== undefined) updateData.description = description;
- if (accessPolicy !== undefined) updateData.accessPolicy = JSON.stringify(accessPolicy);
- if (settings !== undefined) updateData.settings = JSON.stringify(settings);
+ if (accessPolicy !== undefined) updateData.accessPolicy = accessPolicy;
+ if (settings !== undefined) updateData.settings = settings;
if (gatewayId !== undefined) updateData.gatewayId = gatewayId;
if (gatewayPoolId !== undefined) updateData.gatewayPoolId = gatewayPoolId;
if (recordingConnectionId !== undefined) updateData.recordingConnectionId = recordingConnectionId;
diff --git a/backend/src/ee/services/pam-project/pam-project-bootstrap.ts b/backend/src/ee/services/pam-project/pam-project-bootstrap.ts
index 906b95914b..6beaf093e8 100644
--- a/backend/src/ee/services/pam-project/pam-project-bootstrap.ts
+++ b/backend/src/ee/services/pam-project/pam-project-bootstrap.ts
@@ -278,8 +278,8 @@ export const bootstrapPamProject = async (
projectId: project.id,
name: template.name,
type: template.type,
- accessPolicy: JSON.stringify(template.accessPolicy),
- settings: JSON.stringify(template.settings)
+ accessPolicy: template.accessPolicy,
+ settings: template.settings
});
}