Skip to content

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

Address PR comments

Carlos Monastyrskie460e80ea337
diff --git a/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-schemas.ts b/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-schemas.ts
index faa129b9fc..2808fbcd35 100644
--- a/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-schemas.ts
+++ b/backend/src/services/app-connection/f5-big-ip/f5-big-ip-connection-schemas.ts
@@ -17,9 +17,13 @@ export const F5BigIpConnectionBasicAuthCredentialsSchema = z.object({
.trim()
.min(1, "Hostname is required")
.max(512, "Hostname cannot exceed 512 characters")
- .refine((val) => !val.includes("/") && !val.includes("@") && !val.includes("?"), {
- message: "Hostname must not contain /, @, or ? characters"
- }),
+ .refine(
+ (val) =>
+ !val.includes("/") && !val.includes("@") && !val.includes("?") && !val.includes(":") && !val.includes("#"),
+ {
+ message: "Hostname must not contain /, @, ?, :, or # characters"
+ }
+ ),
port: z.number().int().min(1).max(65535).optional(),
username: z.string().trim().min(1, "Username is required").max(256, "Username cannot exceed 256 characters"),
password: z.string().trim().min(1, "Password is required").max(512, "Password cannot exceed 512 characters"),
diff --git a/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-fns.ts b/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-fns.ts
index 8b91503b12..982e6fcd44 100644
--- a/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-fns.ts
+++ b/backend/src/services/pki-sync/f5-big-ip/f5-big-ip-pki-sync-fns.ts
@@ -609,14 +609,15 @@ const unbindCertPathsFromAllProfiles = async (
if (data?.items) {
for (const profile of data.items) {
- if (profile.partition !== partition) continue;
- const refsCert = profile.certKeyChain?.some(
- (entry) =>
- (entry.cert !== undefined && pathSet.has(entry.cert)) ||
- (entry.chain !== undefined && pathSet.has(entry.chain))
- );
- if (refsCert) {
- await unbindFromClientSslProfile(session, partition, profile.name, certPaths);
+ if (profile.partition === partition) {
+ const refsCert = profile.certKeyChain?.some(
+ (entry) =>
+ (entry.cert !== undefined && pathSet.has(entry.cert)) ||
+ (entry.chain !== undefined && pathSet.has(entry.chain))
+ );
+ if (refsCert) {
+ await unbindFromClientSslProfile(session, partition, profile.name, certPaths);
+ }
}
}
}
@@ -638,12 +639,13 @@ const unbindCertPathsFromAllProfiles = async (
if (data?.items) {
for (const profile of data.items) {
- if (profile.partition !== partition) continue;
- const refsCert =
- (profile.cert !== undefined && pathSet.has(profile.cert)) ||
- (profile.chain !== undefined && pathSet.has(profile.chain));
- if (refsCert) {
- await unbindFromServerSslProfile(session, partition, profile.name);
+ if (profile.partition === partition) {
+ const refsCert =
+ (profile.cert !== undefined && pathSet.has(profile.cert)) ||
+ (profile.chain !== undefined && pathSet.has(profile.chain));
+ if (refsCert) {
+ await unbindFromServerSslProfile(session, partition, profile.name);
+ }
}
}
}
@@ -977,12 +979,15 @@ export const f5BigIpPkiSyncFactory = ({
const chainNamesToRemove = new Set<string>();
for (const certName of existingCertNames) {
- if (!certName.endsWith(F5_BIG_IP_CHAIN_SUFFIX)) continue;
- const leafName = certName.slice(0, -F5_BIG_IP_CHAIN_SUFFIX.length);
- if (existingCertNames.has(leafName)) continue;
- if (activeExternalIdentifiers.has(certName)) continue;
- if (!managedCertNamePattern.test(certName) && !managedCertNamePattern.test(leafName)) continue;
- chainNamesToRemove.add(certName);
+ if (certName.endsWith(F5_BIG_IP_CHAIN_SUFFIX)) {
+ const leafName = certName.slice(0, -F5_BIG_IP_CHAIN_SUFFIX.length);
+ const isOrphan = !existingCertNames.has(leafName) && !activeExternalIdentifiers.has(certName);
+ const matchesManagedPattern =
+ managedCertNamePattern.test(certName) || managedCertNamePattern.test(leafName);
+ if (isOrphan && matchesManagedPattern) {
+ chainNamesToRemove.add(certName);
+ }
+ }
}
for (const certName of certNamesToRemove) {
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx
index 5a4fd198f2..d27aae7174 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx
@@ -87,7 +87,7 @@ export const F5BigIpConnectionForm = ({ appConnection, onSubmit }: Props) => {
gatewayId: null,
gatewayPoolId: null,
credentials: {
- sslRejectUnauthorized: false,
+ sslRejectUnauthorized: true,
sslCertificate: undefined
}
}