Skip to content

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

misc: updated pki collection lst

Sheen Capadngand1e5ae2d85ba
diff --git a/backend/src/services/pki-collection/pki-collection-item-dal.ts b/backend/src/services/pki-collection/pki-collection-item-dal.ts
index de896e15c6..fadd08d2fb 100644
--- a/backend/src/services/pki-collection/pki-collection-item-dal.ts
+++ b/backend/src/services/pki-collection/pki-collection-item-dal.ts
@@ -27,13 +27,13 @@ export const pkiCollectionItemDALFactory = (db: TDbClient) => {
.select(
"pki_collection_items.*",
db.raw(
- `COALESCE("${TableName.CertificateAuthority}"."notBefore", "${TableName.Certificate}"."notBefore") as "notBefore"`
+ `COALESCE("${TableName.InternalCertificateAuthority}"."notBefore", "${TableName.Certificate}"."notBefore") as "notBefore"`
),
db.raw(
- `COALESCE("${TableName.CertificateAuthority}"."notAfter", "${TableName.Certificate}"."notAfter") as "notAfter"`
+ `COALESCE("${TableName.InternalCertificateAuthority}"."notAfter", "${TableName.Certificate}"."notAfter") as "notAfter"`
),
db.raw(
- `COALESCE("${TableName.CertificateAuthority}"."friendlyName", "${TableName.Certificate}"."friendlyName") as "friendlyName"`
+ `COALESCE("${TableName.InternalCertificateAuthority}"."friendlyName", "${TableName.Certificate}"."friendlyName") as "friendlyName"`
)
)
.leftJoin(
@@ -41,6 +41,11 @@ export const pkiCollectionItemDALFactory = (db: TDbClient) => {
`${TableName.PkiCollectionItem}.caId`,
`${TableName.CertificateAuthority}.id`
)
+ .leftJoin(
+ TableName.InternalCertificateAuthority,
+ `${TableName.PkiCollectionItem}.caId`,
+ `${TableName.InternalCertificateAuthority}.certificateAuthorityId`
+ )
.leftJoin(TableName.Certificate, `${TableName.PkiCollectionItem}.certId`, `${TableName.Certificate}.id`)
.where((builder) => {
void builder.where(`${TableName.PkiCollectionItem}.pkiCollectionId`, collectionId);