Add Chef PKI sync

This commit is contained in:
Carlos Monastyrski
2025-11-19 00:59:18 -03:00
parent fa44c683b0
commit 3b35b22470
45 changed files with 1374 additions and 18 deletions
@@ -180,11 +180,16 @@ export const pkiSyncQueueFactory = ({
(cert, index, self) => self.findIndex((c) => c.id === cert.id) === index
);
if (uniqueCertificates.length === 0) {
const activeCertificates = uniqueCertificates.filter((cert) => {
const typedCert = cert as TCertificates;
return !typedCert.renewedByCertificateId;
});
if (activeCertificates.length === 0) {
return { certificateMap, certificateMetadata };
}
certificates = uniqueCertificates;
certificates = activeCertificates;
for (const certificate of certificates) {
const cert = certificate as TCertificates;