Skip to content

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

Merge remote-tracking branch 'origin/main' into PAM-466

Andrey642a0fa35a7a
diff --cc backend/src/ee/routes/v2/gateway-router.ts
index c333ca02c0,2ab7e9e74b..d273b2d140
--- a/backend/src/ee/routes/v2/gateway-router.ts
+++ b/backend/src/ee/routes/v2/gateway-router.ts
@@@ -137,7 -137,7 +137,8 @@@ export const registerGatewayV2Router =
capabilities: z
.object({
pkcs11: z.boolean().optional(),
- sessionLogMaskingBuiltInDetection: z.boolean().optional()
++ sessionLogMaskingBuiltInDetection: z.boolean().optional(),
+ supported_account_types: z.array(z.string().trim().max(64)).max(64).optional()
})
.optional()
})
diff --cc backend/src/ee/services/gateway-v2/gateway-v2-service.ts
index 523b733d60,3bb42dc749..86ee99e44e
--- a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
+++ b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
@@@ -1055,7 -1059,7 +1059,11 @@@ export const gatewayV2ServiceFactory =
capabilities
}: {
orgPermission: OrgServiceActor;
- capabilities?: { pkcs11?: boolean; supported_account_types?: string[] };
- capabilities?: { pkcs11?: boolean; sessionLogMaskingBuiltInDetection?: boolean };
++ capabilities?: {
++ pkcs11?: boolean;
++ sessionLogMaskingBuiltInDetection?: boolean;
++ supported_account_types?: string[];
++ };
}) => {
const nextCapabilities = capabilities ?? {};
diff --cc backend/src/ee/services/pam-project/pam-project-bootstrap.ts
index 38b63f5233,3d5b538ae7..b0cd2be6af
--- a/backend/src/ee/services/pam-project/pam-project-bootstrap.ts
+++ b/backend/src/ee/services/pam-project/pam-project-bootstrap.ts
@@@ -30,128 -30,31 +30,32 @@@ export type TDefaultTemplate =
settings: TPamTemplateSettings;
};
- export const DEFAULT_ACCOUNT_TEMPLATES: TDefaultTemplate[] = [
- {
- name: "ssh",
- type: PamAccountType.SSH,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "postgres",
- type: PamAccountType.Postgres,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "mysql",
- type: PamAccountType.MySQL,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "mssql",
- type: PamAccountType.MsSQL,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "oracledb",
- type: PamAccountType.OracleDB,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "mongodb",
- type: PamAccountType.MongoDB,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "redis",
- type: PamAccountType.Redis,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "kubernetes",
- type: PamAccountType.Kubernetes,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "aws-iam",
- type: PamAccountType.AwsIam,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "gcp-service-account",
- type: PamAccountType.GcpServiceAccount,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "azure-cli",
- type: PamAccountType.AzureCli,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "windows",
- type: PamAccountType.Windows,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "windows-ad",
- type: PamAccountType.WindowsAd,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "snowflake",
- type: PamAccountType.Snowflake,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- },
- {
- name: "clickhouse",
- type: PamAccountType.ClickHouse,
- settings: {
- recordingEnabled: true,
- recordingStorageBackend: PamRecordingStorageBackend.Postgres
- }
- }
- ];
+ const defaultTemplateSettings = (type: PamAccountType): TPamTemplateSettings => ({
+ recordingEnabled: true,
+ recordingStorageBackend: PamRecordingStorageBackend.Postgres,
+ // A seeded template is a new template, so masking starts on, as it does in `create`.
+ sessionLogMaskingBuiltInDetection: accountTypeSupportsSessionLogMasking(type)
+ });
+
+ export const DEFAULT_ACCOUNT_TEMPLATES: TDefaultTemplate[] = (
+ [
+ { name: "ssh", type: PamAccountType.SSH },
+ { name: "postgres", type: PamAccountType.Postgres },
+ { name: "mysql", type: PamAccountType.MySQL },
+ { name: "mssql", type: PamAccountType.MsSQL },
+ { name: "oracledb", type: PamAccountType.OracleDB },
+ { name: "mongodb", type: PamAccountType.MongoDB },
+ { name: "redis", type: PamAccountType.Redis },
+ { name: "kubernetes", type: PamAccountType.Kubernetes },
+ { name: "aws-iam", type: PamAccountType.AwsIam },
+ { name: "gcp-service-account", type: PamAccountType.GcpServiceAccount },
+ { name: "azure-cli", type: PamAccountType.AzureCli },
+ { name: "windows", type: PamAccountType.Windows },
+ { name: "windows-ad", type: PamAccountType.WindowsAd },
- { name: "snowflake", type: PamAccountType.Snowflake }
++ { name: "snowflake", type: PamAccountType.Snowflake },
++ { name: "clickhouse", type: PamAccountType.ClickHouse }
+ ] as const
+ ).map(({ name, type }) => ({ name, type, settings: defaultTemplateSettings(type) }));
export const bootstrapPamProject = async (
{ orgId, adminUserIds = [], adminIdentityIds = [], adminGroupIds = [] }: TBootstrapInput,