Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
refactor(pam): remove Active Directory account type, migrate to Windows
bernie-g396969ae3f67
diff --git a/backend/src/db/migrations/20260603030053_pam-revamp.ts b/backend/src/db/migrations/20260603030053_pam-revamp.tsindex b4e51e49e2..d85c175e25 100644--- a/backend/src/db/migrations/20260603030053_pam-revamp.ts+++ b/backend/src/db/migrations/20260603030053_pam-revamp.ts@@ -191,6 +191,8 @@ export async function up(knex: Knex): Promise<void> {templateMap["active-directory"] = templateMap.windows;}+ await knex(TableName.PamAccount).where("accountType", "active-directory").update({ accountType: "windows" });+const oldPamProjects = await knex(TableName.Project).where({ orgId, type: ProjectType.PAM }).whereNot("id", newProjectId)diff --git a/backend/src/ee/services/pam/pam-enums.ts b/backend/src/ee/services/pam/pam-enums.tsindex e598c41f62..5a400407fd 100644--- a/backend/src/ee/services/pam/pam-enums.ts+++ b/backend/src/ee/services/pam/pam-enums.ts@@ -11,12 +11,7 @@ export enum PamAccountType {Windows = "windows"}-const LEGACY_ACCOUNT_TYPE_ALIASES: Record<string, PamAccountType> = {- "active-directory": PamAccountType.Windows-};--export const resolveAccountType = (raw: string): PamAccountType =>- LEGACY_ACCOUNT_TYPE_ALIASES[raw] ?? (raw as PamAccountType);+export const resolveAccountType = (raw: string): PamAccountType => raw as PamAccountType;export enum PamResourceRole {Admin = "admin",diff --git a/frontend/src/hooks/api/pam/enums.ts b/frontend/src/hooks/api/pam/enums.tsindex cec84539e1..ff4270879f 100644--- a/frontend/src/hooks/api/pam/enums.ts+++ b/frontend/src/hooks/api/pam/enums.ts@@ -8,8 +8,7 @@ export enum PamAccountType {Redis = "redis",Kubernetes = "kubernetes",AwsIam = "aws-iam",- Windows = "windows",- ActiveDirectory = "active-directory"+ Windows = "windows"}export enum PamPolicyType {diff --git a/frontend/src/hooks/api/pam/maps.ts b/frontend/src/hooks/api/pam/maps.tsindex bf8b4ba10f..efde0c4ea6 100644--- a/frontend/src/hooks/api/pam/maps.ts+++ b/frontend/src/hooks/api/pam/maps.ts@@ -10,23 +10,13 @@ export const PAM_ACCOUNT_TYPE_MAP: Record<PamAccountType, { name: string; image:[PamAccountType.Redis]: { name: "Redis", image: "Redis.png" },[PamAccountType.MongoDB]: { name: "MongoDB", image: "MongoDB.png" },[PamAccountType.AwsIam]: { name: "AWS IAM", image: "Amazon Web Services.png" },- [PamAccountType.Windows]: { name: "Windows", image: "Windows.png" },- [PamAccountType.ActiveDirectory]: { name: "Windows", image: "Windows.png" }-};--const LEGACY_TYPE_ALIASES: Record<string, PamAccountType> = {- "active-directory": PamAccountType.Windows+ [PamAccountType.Windows]: { name: "Windows", image: "Windows.png" }};const PAM_ACCOUNT_TYPE_FALLBACK = { name: "Unknown", image: "Windows.png" };-export const resolvePamAccountType = (accountType: string): string =>- LEGACY_TYPE_ALIASES[accountType] ?? accountType;+export const resolvePamAccountType = (accountType: string): string => accountType;-export const getPamAccountTypeInfo = (accountType: string): { name: string; image: string } => {- const resolved = LEGACY_TYPE_ALIASES[accountType] ?? accountType;- return (- (PAM_ACCOUNT_TYPE_MAP as Record<string, { name: string; image: string }>)[resolved] ??- PAM_ACCOUNT_TYPE_FALLBACK- );-};+export const getPamAccountTypeInfo = (accountType: string): { name: string; image: string } =>+ (PAM_ACCOUNT_TYPE_MAP as Record<string, { name: string; image: string }>)[accountType] ??+ PAM_ACCOUNT_TYPE_FALLBACK;