Skip to content

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

Address veria comment

Carlos Monastyrskia60e6f6c5e60
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index 2767140655..e8b6dec81d 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -3168,6 +3168,15 @@ export const AppConnections = {
apiKeyId: "The API Key ID used to authenticate with Spacelift.",
apiKeySecret: "The API Key Secret used to authenticate with Spacelift."
}
+ },
+ PALO_ALTO_NETWORKS_LOOKUPS: {
+ connectionId: "The ID of the Palo Alto Networks Connection to read from.",
+ template:
+ "The Panorama template to list SSL/TLS service profiles from. Leave it out when the connection points to a firewall.",
+ isPanorama: "Whether the connection points to a Panorama rather than a firewall.",
+ templates: "The names of the Panorama templates. Empty when the connection points to a firewall.",
+ profileName: "The name of the SSL/TLS service profile.",
+ profileVsys: "The virtual system the profile belongs to, or null for a shared profile."
}
};
diff --git a/backend/src/server/routes/v1/app-connection-routers/palo-alto-networks-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/palo-alto-networks-connection-router.ts
index bdf054e1cf..5133388846 100644
--- a/backend/src/server/routes/v1/app-connection-routers/palo-alto-networks-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/palo-alto-networks-connection-router.ts
@@ -1,5 +1,6 @@
import z from "zod";
+import { AppConnections } from "@app/lib/api-docs";
import { readLimit } from "@app/server/config/rateLimiter";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
@@ -31,12 +32,12 @@ export const registerPaloAltoNetworksConnectionRouter = async (server: FastifyZo
schema: {
operationId: "listPaloAltoNetworksTemplates",
params: z.object({
- connectionId: z.string().uuid()
+ connectionId: z.string().uuid().describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.connectionId)
}),
response: {
200: z.object({
- isPanorama: z.boolean(),
- templates: z.string().array()
+ isPanorama: z.boolean().describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.isPanorama),
+ templates: z.string().array().describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.templates)
})
}
},
@@ -57,14 +58,21 @@ export const registerPaloAltoNetworksConnectionRouter = async (server: FastifyZo
schema: {
operationId: "listPaloAltoNetworksSslTlsServiceProfiles",
params: z.object({
- connectionId: z.string().uuid()
+ connectionId: z.string().uuid().describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.connectionId)
}),
querystring: z.object({
- template: PanOsObjectNameSchema("Template").optional()
+ template: PanOsObjectNameSchema("Template")
+ .optional()
+ .describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.template)
}),
response: {
200: z.object({
- sslTlsServiceProfiles: z.object({ name: z.string(), vsys: z.string().nullable() }).array()
+ sslTlsServiceProfiles: z
+ .object({
+ name: z.string().describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.profileName),
+ vsys: z.string().nullable().describe(AppConnections.PALO_ALTO_NETWORKS_LOOKUPS.profileVsys)
+ })
+ .array()
})
}
},
diff --git a/backend/src/services/certificate-sync/certificate-sync-dal.ts b/backend/src/services/certificate-sync/certificate-sync-dal.ts
index 4220eeaabe..4318bf6f3d 100644
--- a/backend/src/services/certificate-sync/certificate-sync-dal.ts
+++ b/backend/src/services/certificate-sync/certificate-sync-dal.ts
@@ -72,11 +72,7 @@ export const certificateSyncDALFactory = (db: TDbClient) => {
const findExternalIdentifiersInUse = async (
externalIdentifiers: string[],
- {
- excludePkiSyncId,
- destination,
- connectionId
- }: { excludePkiSyncId: string; destination: string | string[]; connectionId?: string },
+ { excludePkiSyncId, destination }: { excludePkiSyncId: string; destination: string | string[] },
tx?: Knex
): Promise<Set<string>> => {
try {
@@ -87,9 +83,6 @@ export const certificateSyncDALFactory = (db: TDbClient) => {
.whereIn(`${TableName.CertificateSync}.externalIdentifier`, externalIdentifiers)
.whereIn(`${TableName.PkiSync}.destination`, destinations)
.whereNot(`${TableName.CertificateSync}.pkiSyncId`, excludePkiSyncId)
- .where((qb) => {
- if (connectionId) void qb.where(`${TableName.PkiSync}.connectionId`, connectionId);
- })
.select(`${TableName.CertificateSync}.externalIdentifier`)) as Array<{ externalIdentifier: string | null }>;
return new Set(docs.map((doc) => doc.externalIdentifier).filter((v): v is string => Boolean(v)));
} catch (error) {
diff --git a/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-schemas.ts b/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-schemas.ts
index 2e89cba3f1..79d0f90c92 100644
--- a/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-schemas.ts
+++ b/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-schemas.ts
@@ -63,7 +63,7 @@ export const F5BigIpPkiSyncOptionsSchema = BasePkiSyncOptionsSchema.extend({
certificateNameSchema: buildDestinationCertificateNameSchema({
naming: F5_BIG_IP_NAMING,
message:
- "Certificate name schema must result in names that contain only alphanumeric characters, hyphens (-), underscores (_), and periods (.) and be 1-255 characters long for F5 BIG-IP. Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema with no placeholder can be linked to only one certificate."
+ "Certificate name schema must result in names that contain only alphanumeric characters, hyphens (-), underscores (_), and periods (.) and be 1-255 characters long for F5 BIG-IP. Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate."
})
});
diff --git a/backend/src/services/pki-sync/linux-server/linux-server-pki-sync-schemas.ts b/backend/src/services/pki-sync/linux-server/linux-server-pki-sync-schemas.ts
index 2ade551d2c..7d0635bb0d 100644
--- a/backend/src/services/pki-sync/linux-server/linux-server-pki-sync-schemas.ts
+++ b/backend/src/services/pki-sync/linux-server/linux-server-pki-sync-schemas.ts
@@ -115,7 +115,7 @@ export const LinuxServerPkiSyncOptionsSchema = z.object({
},
{
message:
- "Certificate name schema must resolve to a single file name of 1-200 characters using only letters, digits, dots (.), dashes (-), and underscores (_). Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema with no placeholder can be linked to only one certificate."
+ "Certificate name schema must resolve to a single file name of 1-200 characters using only letters, digits, dots (.), dashes (-), and underscores (_). Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate."
}
)
});
diff --git a/backend/src/services/pki-sync/netscaler/netscaler-pki-sync-schemas.ts b/backend/src/services/pki-sync/netscaler/netscaler-pki-sync-schemas.ts
index db3b2b89d8..341fc65905 100644
--- a/backend/src/services/pki-sync/netscaler/netscaler-pki-sync-schemas.ts
+++ b/backend/src/services/pki-sync/netscaler/netscaler-pki-sync-schemas.ts
@@ -22,7 +22,7 @@ export const NetScalerPkiSyncOptionsSchema = BasePkiSyncOptionsSchema.extend({
certificateNameSchema: buildDestinationCertificateNameSchema({
naming: NETSCALER_NAMING,
message:
- "Certificate name schema must result in names that contain only alphanumeric characters, hyphens (-), underscores (_), and periods (.) and be 1-63 characters long for NetScaler. Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema with no placeholder can be linked to only one certificate."
+ "Certificate name schema must result in names that contain only alphanumeric characters, hyphens (-), underscores (_), and periods (.) and be 1-63 characters long for NetScaler. Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate."
})
});
diff --git a/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.test.ts b/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.test.ts
deleted file mode 100644
index 787ceec2aa..0000000000
--- a/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.test.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { buildManagedCertNamePattern } from "./palo-alto-networks-pki-sync-fns";
-
-const SHORT_ID = "3hFkQ9xZr2mVw8LpT0aBcD";
-
-describe("Palo Alto Networks buildManagedCertNamePattern (orphan cleanup detection)", () => {
- test("defaults to the INF-{{shortCertificateId}} schema", () => {
- const pattern = buildManagedCertNamePattern(undefined);
- expect(pattern.test(`INF-${SHORT_ID}`)).toBe(true);
- expect(pattern.test("mgmt-cert")).toBe(false);
- });
-
- test("never treats the imported CA chain objects as managed leaf certificates", () => {
- const pattern = buildManagedCertNamePattern(undefined);
- expect(pattern.test("INF-CA-0123456789abcdef01234567")).toBe(false);
- });
-});
diff --git a/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.ts b/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.ts
index e62fc496c4..405db14734 100644
--- a/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.ts
+++ b/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-fns.ts
@@ -23,13 +23,7 @@ import { splitPemChain } from "@app/services/certificate/certificate-fns";
import { TCertificateSyncDALFactory } from "@app/services/certificate-sync/certificate-sync-dal";
import { TCertificateMap } from "@app/services/pki-sync/pki-sync-types";
-import {
- buildManagedCertificateNameRegexSource,
- certificateNameSchemaHasFreeTextPlaceholder,
- compileCertificateNameSchema,
- SHORT_UUID_NAME_REGEX_FRAGMENT,
- UUID_NAME_REGEX_FRAGMENT
-} from "../pki-sync-certificate-name-fns";
+import { compileCertificateNameSchema } from "../pki-sync-certificate-name-fns";
import { PkiSync } from "../pki-sync-enums";
import { PkiSyncError } from "../pki-sync-errors";
import { TPkiSyncWithCredentials } from "../pki-sync-types";
@@ -284,18 +278,6 @@ const commitAndPush = async (
}
};
-export const buildManagedCertNamePattern = (certificateNameSchema: string | undefined): RE2 => {
- const pattern = buildManagedCertificateNameRegexSource(
- certificateNameSchema ?? PALO_ALTO_NETWORKS_PKI_SYNC_LIST_OPTION.defaultCertificateNameSchema,
- {
- uuid: UUID_NAME_REGEX_FRAGMENT,
- shortUuid: SHORT_UUID_NAME_REGEX_FRAGMENT,
- freeText: "[a-zA-Z0-9_-]*"
- }
- );
- return new RE2(`^${pattern}$`);
-};
-
type TPlannedUpload = TCertificateMap[string] & {
mapKey: string;
name: string;
@@ -449,8 +431,7 @@ export const paloAltoNetworksPkiSyncFactory = ({
const findNamesOwnedByOtherSyncs = (pkiSync: TPkiSyncWithCredentials, names: string[]) =>
certificateSyncDAL.findExternalIdentifiersInUse(names, {
excludePkiSyncId: pkiSync.id,
- destination: PALO_ALTO_NETWORKS_PKI_SYNC_DESTINATIONS,
- connectionId: pkiSync.connectionId
+ destination: PALO_ALTO_NETWORKS_PKI_SYNC_DESTINATIONS
});
const finishDeploy = async ({
@@ -555,7 +536,6 @@ export const paloAltoNetworksPkiSyncFactory = ({
activeNames: Set<string>;
deployPending: TDeployPendingMarker;
}) => {
- const { certificateNameSchema } = pkiSync.syncOptions as TPaloAltoNetworksPkiSyncOptions;
const failedRemovals: TSyncFailure[] = [];
let removedCount = 0;
@@ -568,19 +548,6 @@ export const paloAltoNetworksPkiSyncFactory = ({
)
);
- if (!certificateNameSchemaHasFreeTextPlaceholder(certificateNameSchema)) {
- const managedPattern = buildManagedCertNamePattern(certificateNameSchema);
- existingCertificates.forEach((_, name) => {
- if (
- managedPattern.test(name) &&
- !activeNames.has(name) &&
- !name.startsWith(PALO_ALTO_NETWORKS_CA_CERTIFICATE_PREFIX)
- ) {
- candidates.add(name);
- }
- });
- }
-
const ownedByOtherSync = await findNamesOwnedByOtherSyncs(pkiSync, [...candidates]);
for (const name of candidates) {
diff --git a/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-schemas.ts b/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-schemas.ts
index b5e6ffde02..5873c8fd77 100644
--- a/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-schemas.ts
+++ b/backend/src/services/pki-sync/palo-alto-networks/palo-alto-networks-pki-sync-schemas.ts
@@ -28,7 +28,7 @@ export const PaloAltoNetworksPkiSyncOptionsSchema = BasePkiSyncOptionsSchema.ext
certificateNameSchema: buildDestinationCertificateNameSchema({
naming: PALO_ALTO_NETWORKS_NAMING,
message:
- "Certificate name schema must result in names that contain only alphanumeric characters, hyphens (-), and underscores (_) and be 1-31 characters long for Palo Alto Networks. Use {{shortCertificateId}} rather than {{certificateId}} to stay within the limit. Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema with no placeholder can be linked to only one certificate."
+ "Certificate name schema must result in names that contain only alphanumeric characters, hyphens (-), and underscores (_) and be 1-31 characters long for Palo Alto Networks. Use {{shortCertificateId}} rather than {{certificateId}} to stay within the limit. Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate."
})
});
diff --git a/backend/src/services/pki-sync/pki-sync-certificate-name-fns.ts b/backend/src/services/pki-sync/pki-sync-certificate-name-fns.ts
index 8a0721b907..6c0b097658 100644
--- a/backend/src/services/pki-sync/pki-sync-certificate-name-fns.ts
+++ b/backend/src/services/pki-sync/pki-sync-certificate-name-fns.ts
@@ -64,11 +64,12 @@ export const SHORT_UUID_NAME_REGEX_FRAGMENT = "[0-9A-Za-z]{22}";
export const certificateNameSchemaHasFreeTextPlaceholder = (schema?: string): boolean =>
Boolean(schema && (schema.includes("{{commonName}}") || schema.includes("{{applicationName}}")));
-const ANY_PLACEHOLDER_REGEX = new RE2(
- "\\{\\{(certificateId|shortCertificateId|profileId|applicationId|applicationName|commonName)\\}\\}"
+const CERTIFICATE_DISTINGUISHING_PLACEHOLDER_REGEX = new RE2(
+ "\\{\\{(certificateId|shortCertificateId|commonName)\\}\\}"
);
+
export const certificateNameSchemaAllowsMultipleCertificates = (schema?: string): boolean =>
- Boolean(schema && ANY_PLACEHOLDER_REGEX.test(schema));
+ Boolean(schema && CERTIFICATE_DISTINGUISHING_PLACEHOLDER_REGEX.test(schema));
const PLACEHOLDER_OR_CHAR_REGEX = new RE2(
"\\{\\{(certificateId|shortCertificateId|profileId|applicationId|applicationName|commonName)\\}\\}|[\\s\\S]",
diff --git a/backend/src/services/pki-sync/pki-sync-fns.test.ts b/backend/src/services/pki-sync/pki-sync-fns.test.ts
index 54dd162da1..2dac896e5f 100644
--- a/backend/src/services/pki-sync/pki-sync-fns.test.ts
+++ b/backend/src/services/pki-sync/pki-sync-fns.test.ts
@@ -189,12 +189,12 @@ describe("assertPkiSyncCanHoldCertificateCount", () => {
test("rejects a name schema with no placeholder once more than one certificate is held", () => {
expect(() =>
assertPkiSyncCanHoldCertificateCount(PkiSync.LinuxServer, { certificateNameSchema: "static" }, undefined, 2)
- ).toThrow("no placeholder");
+ ).toThrow("gives every certificate the same name");
});
test("rejects a sync with no name schema at all once more than one certificate is held", () => {
expect(() => assertPkiSyncCanHoldCertificateCount(PkiSync.LinuxServer, undefined, undefined, 2)).toThrow(
- "no placeholder"
+ "gives every certificate the same name"
);
});
@@ -284,6 +284,18 @@ describe("getPkiSyncCertificateCap", () => {
expect(getPkiSyncCertificateCap(PkiSync.LinuxServer, { certificateNameSchema: "static" }, {})).toBe(1);
});
+ test("caps at 1 when the name schema only uses placeholders shared by every certificate", () => {
+ expect(
+ getPkiSyncCertificateCap(PkiSync.PaloAltoNetworks, { certificateNameSchema: "INF-{{applicationName}}" }, {})
+ ).toBe(1);
+ });
+
+ test("no name cap when the name schema uses the common name", () => {
+ expect(
+ getPkiSyncCertificateCap(PkiSync.PaloAltoNetworks, { certificateNameSchema: "INF-{{commonName}}" }, {})
+ ).toBeUndefined();
+ });
+
test("caps at 1 when a host command names a single certificate", () => {
expect(
getPkiSyncCertificateCap(
diff --git a/backend/src/services/pki-sync/pki-sync-fns.ts b/backend/src/services/pki-sync/pki-sync-fns.ts
index 7498d4111e..fb3f8d2f2f 100644
--- a/backend/src/services/pki-sync/pki-sync-fns.ts
+++ b/backend/src/services/pki-sync/pki-sync-fns.ts
@@ -774,7 +774,7 @@ const getPkiSyncCertificateCaps = (
caps.push({
cap: 1,
reason: () =>
- "This PKI sync's certificate name schema has no placeholder, so it holds only one certificate. Add {{certificateId}} or {{commonName}} to hold more."
+ "This PKI sync's certificate name schema gives every certificate the same name, so it holds only one certificate. Add {{shortCertificateId}}, {{certificateId}}, or {{commonName}} to hold more."
});
}
diff --git a/backend/src/services/pki-sync/pki-sync-schemas.ts b/backend/src/services/pki-sync/pki-sync-schemas.ts
index 491803739b..4b357b73d3 100644
--- a/backend/src/services/pki-sync/pki-sync-schemas.ts
+++ b/backend/src/services/pki-sync/pki-sync-schemas.ts
@@ -125,7 +125,7 @@ export const PkiSyncOptionsSchema = z.object({
},
{
message:
- "Certificate name schema may include the {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, and {{commonName}} placeholders. Only alphanumeric characters (a-z, A-Z, 0-9), dashes (-), underscores (_), and slashes (/) are allowed besides the placeholders. A schema with no placeholder can be linked to only one certificate."
+ "Certificate name schema may include the {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, and {{commonName}} placeholders. Only alphanumeric characters (a-z, A-Z, 0-9), dashes (-), underscores (_), and slashes (/) are allowed besides the placeholders. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate."
}
)
});
diff --git a/backend/src/services/pki-sync/windows-server/windows-server-pki-sync-schemas.ts b/backend/src/services/pki-sync/windows-server/windows-server-pki-sync-schemas.ts
index cb4868d409..ff0c80f1e3 100644
--- a/backend/src/services/pki-sync/windows-server/windows-server-pki-sync-schemas.ts
+++ b/backend/src/services/pki-sync/windows-server/windows-server-pki-sync-schemas.ts
@@ -125,7 +125,7 @@ export const WindowsServerPkiSyncOptionsSchema = z.object({
},
{
message:
- "Certificate name schema must resolve to a single file name of 1-200 characters using only letters, digits, dots (.), dashes (-), and underscores (_). Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema with no placeholder can be linked to only one certificate."
+ "Certificate name schema must resolve to a single file name of 1-200 characters using only letters, digits, dots (.), dashes (-), and underscores (_). Available placeholders: {{certificateId}}, {{shortCertificateId}}, {{profileId}}, {{applicationId}}, {{applicationName}}, {{commonName}}. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate."
}
)
});
diff --git a/docs/documentation/platform/pki/applications/certificate-syncs/linux-server.mdx b/docs/documentation/platform/pki/applications/certificate-syncs/linux-server.mdx
index 9765d1c262..fd6700e80d 100644
--- a/docs/documentation/platform/pki/applications/certificate-syncs/linux-server.mdx
+++ b/docs/documentation/platform/pki/applications/certificate-syncs/linux-server.mdx
@@ -51,7 +51,7 @@ Deploy certificates from Infisical to a directory on a Linux server over SSH. Fi
- **Include Private Key**: For PEM, controls whether the private key is written alongside the certificate. The sync fails for a certificate whose key is not available, for example one issued from an external CSR.
- **Include Root CA in Certificate Chain**: Include the root CA in the delivered chain. Leave it off when the consuming service only needs the intermediates.
- **Enable Removal of Certificates**: Delete the delivered files from the server when a certificate is removed from the sync, revoked, or expired.
- - **Certificate Name Schema**: The base file name, using placeholders such as `{{commonName}}`, `{{certificateId}}`, or `{{shortCertificateId}}`. The export format adds the extension. A schema with no placeholder can be linked to only one certificate.
+ - **Certificate Name Schema**: The base file name, using placeholders such as `{{commonName}}`, `{{certificateId}}`, or `{{shortCertificateId}}`. The export format adds the extension. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate.
- **Auto-Sync Enabled**: Automatically sync certificates when changes occur.
6. Configure the **Commands**, or leave them empty:
diff --git a/docs/documentation/platform/pki/applications/certificate-syncs/windows-server.mdx b/docs/documentation/platform/pki/applications/certificate-syncs/windows-server.mdx
index 22178681bb..8442521b5d 100644
--- a/docs/documentation/platform/pki/applications/certificate-syncs/windows-server.mdx
+++ b/docs/documentation/platform/pki/applications/certificate-syncs/windows-server.mdx
@@ -59,7 +59,7 @@ Deploy certificates from Infisical to a directory on a Windows server over WinRM
- **Include Private Key**: For PEM, controls whether the private key is written alongside the certificate. The sync fails for a certificate whose key is not available, for example one issued from an external CSR.
- **Include Root CA in Certificate Chain**: Include the root CA in the delivered chain. Leave it off when the consuming service only needs the intermediates.
- **Enable Removal of Certificates**: Delete the delivered files from the server when a certificate is removed from the sync, revoked, or expired.
- - **Certificate Name Schema**: The base file name, using placeholders such as `{{commonName}}`, `{{certificateId}}`, or `{{shortCertificateId}}`. The export format adds the extension. A schema with no placeholder can be linked to only one certificate.
+ - **Certificate Name Schema**: The base file name, using placeholders such as `{{commonName}}`, `{{certificateId}}`, or `{{shortCertificateId}}`. The export format adds the extension. A schema without {{certificateId}}, {{shortCertificateId}}, or {{commonName}} can be linked to only one certificate.
- **Auto-Sync Enabled**: Automatically sync certificates when changes occur.
6. Configure the **Commands**, or leave them empty:
diff --git a/frontend/src/components/pki-syncs/forms/pki-sync-filter-fns.ts b/frontend/src/components/pki-syncs/forms/pki-sync-filter-fns.ts
index e78cea93e0..03d6945af3 100644
--- a/frontend/src/components/pki-syncs/forms/pki-sync-filter-fns.ts
+++ b/frontend/src/components/pki-syncs/forms/pki-sync-filter-fns.ts
@@ -48,8 +48,7 @@ export const buildOrderNameMap = (
const GCP_MAX_CERTIFICATES_PER_MAP_ENTRY = 4;
-const NAME_SCHEMA_PLACEHOLDER_PATTERN =
- /\{\{(certificateId|shortCertificateId|profileId|applicationId|applicationName|commonName)\}\}/;
+const NAME_SCHEMA_PLACEHOLDER_PATTERN = /\{\{(certificateId|shortCertificateId|commonName)\}\}/;
const COMMAND_VARIABLE_PATTERN = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
diff --git a/frontend/src/components/pki-syncs/forms/schemas/palo-alto-networks-pki-sync-destination-schema.ts b/frontend/src/components/pki-syncs/forms/schemas/palo-alto-networks-pki-sync-destination-schema.ts
index 96562beee2..c6e816fb49 100644
--- a/frontend/src/components/pki-syncs/forms/schemas/palo-alto-networks-pki-sync-destination-schema.ts
+++ b/frontend/src/components/pki-syncs/forms/schemas/palo-alto-networks-pki-sync-destination-schema.ts
@@ -57,7 +57,7 @@ const PaloAltoNetworksSyncOptionsSchema = z.object({
},
{
message:
- "Certificate name schema must be at most 31 characters once placeholders are filled in ({{shortCertificateId}} counts as 22). Outside placeholders, use only letters, numbers, hyphens (-), and underscores (_). A name without {{shortCertificateId}} can hold only one certificate."
+ "Certificate name schema must be at most 31 characters once placeholders are filled in ({{shortCertificateId}} counts as 22). Outside placeholders, use only letters, numbers, hyphens (-), and underscores (_). A name without {{shortCertificateId}} or {{commonName}} can hold only one certificate."
}
)
});