Skip to content

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

Address greptile comment

Carlos Monastyrski45c70b8684fc
diff --git a/backend/src/db/schemas/identity-tls-cert-auths.ts b/backend/src/db/schemas/identity-tls-cert-auths.ts
index 4fb15491b4..17af42e033 100644
--- a/backend/src/db/schemas/identity-tls-cert-auths.ts
+++ b/backend/src/db/schemas/identity-tls-cert-auths.ts
@@ -19,8 +19,8 @@ export const IdentityTlsCertAuthsSchema = z.object({
updatedAt: z.date(),
identityId: z.string().uuid(),
allowedCommonNames: z.string().nullable().optional(),
- allowedSubjectAltNames: z.string().nullable().optional(),
- encryptedCaCertificate: zodBuffer
+ encryptedCaCertificate: zodBuffer,
+ allowedSubjectAltNames: z.string().nullable().optional()
});
export type TIdentityTlsCertAuths = z.infer<typeof IdentityTlsCertAuthsSchema>;
diff --git a/backend/src/services/identity-tls-cert-auth/identity-tls-cert-auth-service.ts b/backend/src/services/identity-tls-cert-auth/identity-tls-cert-auth-service.ts
index 2c7f1105c3..256922000b 100644
--- a/backend/src/services/identity-tls-cert-auth/identity-tls-cert-auth-service.ts
+++ b/backend/src/services/identity-tls-cert-auth/identity-tls-cert-auth-service.ts
@@ -191,7 +191,7 @@ export const identityTlsCertAuthServiceFactory = ({
}
if (identityTlsCertAuth.allowedSubjectAltNames) {
- const sanExtension = new x509.X509Certificate(leafCertificate).getExtension(
+ const sanExtension = new x509.X509Certificate(clientCertificateX509.raw).getExtension(
x509.SubjectAlternativeNameExtension
);