Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Addressed PR comments
Carlos Monastyrski2c73bec58f78
diff --git a/backend/src/ee/services/audit-log/audit-log-types.ts b/backend/src/ee/services/audit-log/audit-log-types.tsindex 7392adf663..65371d9142 100644--- a/backend/src/ee/services/audit-log/audit-log-types.ts+++ b/backend/src/ee/services/audit-log/audit-log-types.ts@@ -464,6 +464,16 @@ export enum EventType {CLEAR_PKI_APPLICATION_SCEP_ENROLLMENT = "clear-pki-application-scep-enrollment",GET_CERT_MANAGER_INSTANCE_STATE = "get-cert-manager-instance-state",SET_CERT_MANAGER_ACTIVE_PROJECT = "set-cert-manager-active-project",+ INVITE_CERT_MANAGER_USERS = "invite-cert-manager-users",+ UPDATE_CERT_MANAGER_USER = "update-cert-manager-user",+ REMOVE_CERT_MANAGER_USER = "remove-cert-manager-user",+ REMOVE_CERT_MANAGER_USERS_BATCH = "remove-cert-manager-users-batch",+ ADD_CERT_MANAGER_IDENTITY = "add-cert-manager-identity",+ UPDATE_CERT_MANAGER_IDENTITY = "update-cert-manager-identity",+ REMOVE_CERT_MANAGER_IDENTITY = "remove-cert-manager-identity",+ ADD_CERT_MANAGER_GROUP = "add-cert-manager-group",+ UPDATE_CERT_MANAGER_GROUP = "update-cert-manager-group",+ REMOVE_CERT_MANAGER_GROUP = "remove-cert-manager-group",ISSUE_CERTIFICATE_FROM_PROFILE = "issue-certificate-from-profile",SIGN_CERTIFICATE_FROM_PROFILE = "sign-certificate-from-profile",ORDER_CERTIFICATE_FROM_PROFILE = "order-certificate-from-profile",@@ -3746,6 +3756,95 @@ interface SetCertManagerActiveProject {};}+interface InviteCertManagerUsers {+ type: EventType.INVITE_CERT_MANAGER_USERS;+ metadata: {+ emails: string[];+ usernames: string[];+ userIds: string[];+ membershipIds: string[];+ roleSlugs?: string[];+ };+}++interface UpdateCertManagerUser {+ type: EventType.UPDATE_CERT_MANAGER_USER;+ metadata: {+ userId: string;+ roles: string[];+ };+}++interface RemoveCertManagerUser {+ type: EventType.REMOVE_CERT_MANAGER_USER;+ metadata: {+ userId: string;+ membershipId: string;+ };+}++interface RemoveCertManagerUsersBatch {+ type: EventType.REMOVE_CERT_MANAGER_USERS_BATCH;+ metadata: {+ emails: string[];+ usernames: string[];+ userIds: string[];+ membershipIds: string[];+ };+}++interface AddCertManagerIdentity {+ type: EventType.ADD_CERT_MANAGER_IDENTITY;+ metadata: {+ identityId: string;+ membershipId: string;+ roles: string[];+ };+}++interface UpdateCertManagerIdentity {+ type: EventType.UPDATE_CERT_MANAGER_IDENTITY;+ metadata: {+ identityId: string;+ membershipId: string;+ roles: string[];+ };+}++interface RemoveCertManagerIdentity {+ type: EventType.REMOVE_CERT_MANAGER_IDENTITY;+ metadata: {+ identityId: string;+ membershipId: string;+ };+}++interface AddCertManagerGroup {+ type: EventType.ADD_CERT_MANAGER_GROUP;+ metadata: {+ groupId: string;+ membershipId: string;+ roles: string[];+ };+}++interface UpdateCertManagerGroup {+ type: EventType.UPDATE_CERT_MANAGER_GROUP;+ metadata: {+ groupId: string;+ membershipId: string;+ roles: string[];+ };+}++interface RemoveCertManagerGroup {+ type: EventType.REMOVE_CERT_MANAGER_GROUP;+ metadata: {+ groupId: string;+ membershipId: string;+ };+}+interface GetCertificateProfile {type: EventType.GET_CERTIFICATE_PROFILE;metadata: {@@ -6996,6 +7095,16 @@ export type Event =| ClearPkiApplicationScepEnrollment| GetCertManagerInstanceState| SetCertManagerActiveProject+ | InviteCertManagerUsers+ | UpdateCertManagerUser+ | RemoveCertManagerUser+ | RemoveCertManagerUsersBatch+ | AddCertManagerIdentity+ | UpdateCertManagerIdentity+ | RemoveCertManagerIdentity+ | AddCertManagerGroup+ | UpdateCertManagerGroup+ | RemoveCertManagerGroup| GetCertificateProfile| ListCertificateProfiles| GetCertificateProfileLatestActiveBundlediff --git a/backend/src/ee/services/pki-acme/pki-acme-service.ts b/backend/src/ee/services/pki-acme/pki-acme-service.tsindex 3085878445..8c03dd6e56 100644--- a/backend/src/ee/services/pki-acme/pki-acme-service.ts+++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts@@ -1198,6 +1198,7 @@ export const pkiAcmeServiceFactory = ({{projectId: profile.projectId,profileId: profile.id,+ applicationId: accountApplicationId ?? null,commonName: certificateRequest.commonName || null,altNames: altNames ? JSON.stringify(altNames) : null,keyUsages: certificateRequest.keyUsages || null,diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.tsindex 5207e9d34e..da9c2c3873 100644--- a/backend/src/server/routes/index.ts+++ b/backend/src/server/routes/index.ts@@ -2185,7 +2185,8 @@ export const registerRoutes = async (kmsService,notificationService,projectMembershipDAL,- projectDAL+ projectDAL,+ pkiApplicationDAL});const pkiAlertV2Queue = pkiAlertV2QueueServiceFactory({diff --git a/backend/src/server/routes/v1/cert-manager-access-routers/groups-router.ts b/backend/src/server/routes/v1/cert-manager-access-routers/groups-router.tsindex 05efb84658..4c720a41c3 100644--- a/backend/src/server/routes/v1/cert-manager-access-routers/groups-router.ts+++ b/backend/src/server/routes/v1/cert-manager-access-routers/groups-router.ts@@ -146,9 +146,10 @@ export const registerCertManagerAccessGroupsRouter = async (server: FastifyZodPr...req.auditLogInfo,projectId,event: {- type: EventType.ADD_PROJECT_GROUP,+ type: EventType.ADD_CERT_MANAGER_GROUP,metadata: {groupId: req.params.groupId,+ membershipId: full.id,roles: roles.map((r) => r.role)}}@@ -186,9 +187,10 @@ export const registerCertManagerAccessGroupsRouter = async (server: FastifyZodPr...req.auditLogInfo,projectId,event: {- type: EventType.UPDATE_PROJECT_GROUP,+ type: EventType.UPDATE_CERT_MANAGER_GROUP,metadata: {groupId: req.params.groupId,+ membershipId: groupMembership.id,roles: req.body.roles.map((r) => r.role)}}@@ -231,8 +233,8 @@ export const registerCertManagerAccessGroupsRouter = async (server: FastifyZodPr...req.auditLogInfo,projectId,event: {- type: EventType.REMOVE_PROJECT_GROUP,- metadata: { groupId: req.params.groupId }+ type: EventType.REMOVE_CERT_MANAGER_GROUP,+ metadata: { groupId: req.params.groupId, membershipId: groupMembership.id }}});return {diff --git a/backend/src/server/routes/v1/cert-manager-access-routers/identities-router.ts b/backend/src/server/routes/v1/cert-manager-access-routers/identities-router.tsindex a73f12c157..b6a71560c8 100644--- a/backend/src/server/routes/v1/cert-manager-access-routers/identities-router.ts+++ b/backend/src/server/routes/v1/cert-manager-access-routers/identities-router.ts@@ -193,11 +193,14 @@ export const registerCertManagerAccessIdentitiesRouter = async (server: FastifyZ});await server.services.auditLog.createAuditLog({...req.auditLogInfo,- orgId: req.permission.orgId,projectId,event: {- type: EventType.CREATE_IDENTITY_PROJECT_MEMBERSHIP,- metadata: { identityId: req.params.identityId, roles: req.body.roles }+ type: EventType.ADD_CERT_MANAGER_IDENTITY,+ metadata: {+ identityId: req.params.identityId,+ membershipId: membership.id,+ roles: (roles || [{ role }]).map((r) => r.role)+ }}});return { identityMembership: { ...membership, identityId: req.params.identityId } };@@ -225,11 +228,14 @@ export const registerCertManagerAccessIdentitiesRouter = async (server: FastifyZ});await server.services.auditLog.createAuditLog({...req.auditLogInfo,- orgId: req.permission.orgId,projectId,event: {- type: EventType.UPDATE_IDENTITY_PROJECT_MEMBERSHIP,- metadata: { identityId: req.params.identityId, roles: req.body.roles }+ type: EventType.UPDATE_CERT_MANAGER_IDENTITY,+ metadata: {+ identityId: req.params.identityId,+ membershipId: membership.id,+ roles: req.body.roles.map((r) => r.role)+ }}});return { identityMembership: { ...membership, identityId: req.params.identityId } };@@ -260,11 +266,10 @@ export const registerCertManagerAccessIdentitiesRouter = async (server: FastifyZ});await server.services.auditLog.createAuditLog({...req.auditLogInfo,- orgId: req.permission.orgId,projectId,event: {- type: EventType.DELETE_IDENTITY_PROJECT_MEMBERSHIP,- metadata: { identityId: req.params.identityId }+ type: EventType.REMOVE_CERT_MANAGER_IDENTITY,+ metadata: { identityId: req.params.identityId, membershipId: membership.id }}});return { identityMembership: { ...membership, identityId: req.params.identityId } };diff --git a/backend/src/server/routes/v1/cert-manager-access-routers/users-router.ts b/backend/src/server/routes/v1/cert-manager-access-routers/users-router.tsindex cb599599eb..c3049a13b8 100644--- a/backend/src/server/routes/v1/cert-manager-access-routers/users-router.ts+++ b/backend/src/server/routes/v1/cert-manager-access-routers/users-router.ts@@ -133,16 +133,16 @@ export const registerCertManagerAccessUsersRouter = async (server: FastifyZodPro});await server.services.auditLog.createAuditLog({- projectId,...req.auditLogInfo,+ projectId,event: {- type: EventType.ADD_BATCH_PROJECT_MEMBER,+ type: EventType.INVITE_CERT_MANAGER_USERS,metadata: {- members: memberships.map(({ actorUserId, id }) => ({- userId: actorUserId || "",- membershipId: id,- email: ""- }))+ emails: req.body.emails,+ usernames: req.body.usernames,+ userIds: memberships.map(({ actorUserId }) => actorUserId || ""),+ membershipIds: memberships.map(({ id }) => id),+ roleSlugs: req.body.roleSlugs}}});@@ -177,12 +177,10 @@ export const registerCertManagerAccessUsersRouter = async (server: FastifyZodPro...req.auditLogInfo,projectId,event: {- type: EventType.UPDATE_USER_PROJECT_ROLE,+ type: EventType.UPDATE_CERT_MANAGER_USER,metadata: {userId,- email: "",- oldRole: "",- newRole: req.body.roles.map((r) => r.role).join(",")+ roles: req.body.roles.map((r) => r.role)}}});@@ -230,18 +228,19 @@ export const registerCertManagerAccessUsersRouter = async (server: FastifyZodProemails: req.body.emails,usernames: req.body.usernames});- await Promise.all(- memberships.map((membership) =>- server.services.auditLog.createAuditLog({- ...req.auditLogInfo,- projectId,- event: {- type: EventType.REMOVE_PROJECT_MEMBER,- metadata: { userId: membership.actorUserId as string, email: "" }- }- })- )- );+ await server.services.auditLog.createAuditLog({+ ...req.auditLogInfo,+ projectId,+ event: {+ type: EventType.REMOVE_CERT_MANAGER_USERS_BATCH,+ metadata: {+ emails: req.body.emails,+ usernames: req.body.usernames,+ userIds: memberships.map((m) => m.actorUserId as string),+ membershipIds: memberships.map((m) => m.id)+ }+ }+ });return {memberships: memberships.map((el) => ({ ...el, userId: el.actorUserId as string }))};@@ -275,8 +274,8 @@ export const registerCertManagerAccessUsersRouter = async (server: FastifyZodPro...req.auditLogInfo,projectId,event: {- type: EventType.REMOVE_PROJECT_MEMBER,- metadata: { userId: membership.actorUserId as string, email: "" }+ type: EventType.REMOVE_CERT_MANAGER_USER,+ metadata: { userId: membership.actorUserId as string, membershipId: membership.id }}});return { membership: { ...membership, userId } };diff --git a/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.ts b/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.tsindex 397034eed1..fc3e741e9a 100644--- a/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.ts+++ b/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.ts@@ -386,20 +386,33 @@ export const registerInternalCertificateAuthorityRouter = async (server: Fastifycertificate: z.string().describe(CERTIFICATE_AUTHORITIES.GET_CERT.certificate),certificateChain: z.string().describe(CERTIFICATE_AUTHORITIES.GET_CERT.certificateChain),serialNumber: z.string().describe(CERTIFICATE_AUTHORITIES.GET_CERT.serialNumber),- certId: z.string().describe("Certificate ID")+ certId: z.string().describe("Certificate ID"),+ notBefore: z.string().optional(),+ notAfter: z.string().optional(),+ maxPathLength: z.number().optional(),+ parentCaId: z.string().uuid().optional()})}},handler: async (req) => {- const { certificate, certificateChain, serialNumber, certId, ca } =- await server.services.internalCertificateAuthority.getCaCertByIdWithAuth({- caId: req.params.caId,- certId: req.params.certId,- actor: req.permission.type,- actorId: req.permission.id,- actorAuthMethod: req.permission.authMethod,- actorOrgId: req.permission.orgId- });+ const {+ certificate,+ certificateChain,+ serialNumber,+ certId,+ ca,+ notBefore,+ notAfter,+ maxPathLength,+ parentCaId+ } = await server.services.internalCertificateAuthority.getCaCertByIdWithAuth({+ caId: req.params.caId,+ certId: req.params.certId,+ actor: req.permission.type,+ actorId: req.permission.id,+ actorAuthMethod: req.permission.authMethod,+ actorOrgId: req.permission.orgId+ });await server.services.auditLog.createAuditLog({...req.auditLogInfo,@@ -413,11 +426,17 @@ export const registerInternalCertificateAuthorityRouter = async (server: Fastify}});+ const formatRfc3339 = (d?: Date) => (d ? `${d.toISOString().replace(/\.\d{3}Z$/, "Z")}` : undefined);+return {certificate,certificateChain,serialNumber,- certId+ certId,+ notBefore: formatRfc3339(notBefore),+ notAfter: formatRfc3339(notAfter),+ maxPathLength,+ parentCaId};}});diff --git a/backend/src/server/routes/v2/pki-alert-router.ts b/backend/src/server/routes/v2/pki-alert-router.tsindex dc99397ae7..fc5b84b12a 100644--- a/backend/src/server/routes/v2/pki-alert-router.ts+++ b/backend/src/server/routes/v2/pki-alert-router.ts@@ -488,6 +488,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {tags: [ApiDocsTags.PkiAlerting],body: z.object({projectId: z.string().uuid().optional().describe(openApiHidden()),+ applicationId: z.string().uuid().optional().describe("Optional application context to scope the test payload"),url: z.string().url()@@ -505,6 +506,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {handler: async (req) => {const result = await server.services.pkiAlertV2.testWebhookConfig({projectId: req.internalCertManagerProjectId,+ applicationId: req.body.applicationId,url: req.body.url,signingSecret: req.body.signingSecret,actor: req.permission.type,diff --git a/backend/src/services/certificate-authority/certificate-authority-schemas.ts b/backend/src/services/certificate-authority/certificate-authority-schemas.tsindex 0f2ee974fe..ef516ab9cb 100644--- a/backend/src/services/certificate-authority/certificate-authority-schemas.ts+++ b/backend/src/services/certificate-authority/certificate-authority-schemas.ts@@ -24,5 +24,6 @@ export const GenericCreateCertificateAuthorityFieldsSchema = (type: CaType) =>export const GenericUpdateCertificateAuthorityFieldsSchema = (type: CaType) =>z.object({+ name: slugSchema({ field: "name" }).optional().describe(CertificateAuthorities.UPDATE(type).name),status: z.nativeEnum(CaStatus).optional().describe(CertificateAuthorities.UPDATE(type).status)});diff --git a/backend/src/services/certificate-authority/internal/internal-certificate-authority-service.ts b/backend/src/services/certificate-authority/internal/internal-certificate-authority-service.tsindex 7a99175409..e28053618b 100644--- a/backend/src/services/certificate-authority/internal/internal-certificate-authority-service.ts+++ b/backend/src/services/certificate-authority/internal/internal-certificate-authority-service.ts@@ -1105,11 +1105,30 @@ export const internalCertificateAuthorityServiceFactory = ({kmsService});+ let notBefore: Date | undefined;+ let notAfter: Date | undefined;+ let maxPathLength: number | undefined;+ try {+ const certObj = new x509.X509Certificate(certificate);+ notBefore = certObj.notBefore;+ notAfter = certObj.notAfter;+ const basicConstraintsExt = certObj.getExtension(x509.BasicConstraintsExtension);+ if (basicConstraintsExt && basicConstraintsExt.ca) {+ maxPathLength = basicConstraintsExt.pathLength ?? -1;+ }+ } catch {+ // ignore parse errors and return undefined values+ }+return {certificate,certificateChain,serialNumber,certId,+ notBefore,+ notAfter,+ maxPathLength,+ parentCaId: ca.internalCa.parentCaId ?? undefined,ca: expandInternalCa(ca)};};diff --git a/backend/src/services/pki-alert-v2/pki-alert-v2-channel-webhook-fns.ts b/backend/src/services/pki-alert-v2/pki-alert-v2-channel-webhook-fns.tsindex e012942ebd..c21e71277d 100644--- a/backend/src/services/pki-alert-v2/pki-alert-v2-channel-webhook-fns.ts+++ b/backend/src/services/pki-alert-v2/pki-alert-v2-channel-webhook-fns.ts@@ -46,12 +46,14 @@ type TBuildWebhookPayloadParams = {// Builds CloudEvents envelope (shared across all events)const buildBasePayload = (params: {eventType: PkiWebhookEventType;- projectId: string;+ applicationId?: string;alertId: string;}): TPkiWebhookBase => ({specversion: "1.0" as const,type: params.eventType,- source: `/projects/${params.projectId}/alerts/${params.alertId}`,+ source: params.applicationId+ ? `/applications/${params.applicationId}/alerts/${params.alertId}`+ : `/alerts/${params.alertId}`,id: crypto.randomUUID(),time: new Date().toISOString(),datacontenttype: "application/json" as const@@ -92,6 +94,15 @@ const WEBHOOK_EVENT_SUBJECT: Record<PkiWebhookEventType, string> = {[PkiWebhookEventType.CERTIFICATE_TEST]: "certificate-test"};+const buildViewUrl = (params: { appUrl: string; alert: TAlertInfo }): string => {+ const { appUrl, alert } = params;+ const projectBase = `${appUrl}/organizations/${alert.orgId}/projects/cert-manager/${alert.projectId}`;+ if (alert.applicationId && alert.applicationName) {+ return `${projectBase}/applications/${alert.applicationName}`;+ }+ return `${projectBase}/inventory`;+};+const buildEventData = (params: {alert: TAlertInfo;certificates: TCertificatePreview[];@@ -104,12 +115,12 @@ const buildEventData = (params: {id: params.alert.id,name: params.alert.name,...(params.alert.alertBefore ? { alertBefore: params.alert.alertBefore } : {}),- projectId: params.alert.projectId+ ...(params.alert.applicationId ? { applicationId: params.alert.applicationId } : {})},certificates: transformCertificates(params.certificates),metadata: {totalCertificates: params.certificates.length,- viewUrl: `${params.appUrl}/projects/cert-manager/${params.alert.projectId}/policies`+ viewUrl: buildViewUrl({ appUrl: params.appUrl, alert: params.alert })}}});@@ -122,7 +133,7 @@ export const buildWebhookPayload = ({}: TBuildWebhookPayloadParams): TPkiWebhookPayload => {const base = buildBasePayload({eventType,- projectId: alert.projectId,+ applicationId: alert.applicationId,alertId: alert.id});diff --git a/backend/src/services/pki-alert-v2/pki-alert-v2-service.ts b/backend/src/services/pki-alert-v2/pki-alert-v2-service.tsindex 5637d43a1b..dd9ca01598 100644--- a/backend/src/services/pki-alert-v2/pki-alert-v2-service.ts+++ b/backend/src/services/pki-alert-v2/pki-alert-v2-service.ts@@ -13,6 +13,7 @@ import { TKmsServiceFactory } from "@app/services/kms/kms-service";import { KmsDataKey } from "@app/services/kms/kms-types";import { TNotificationServiceFactory } from "@app/services/notification/notification-service";import { NotificationType } from "@app/services/notification/notification-types";+import { TPkiApplicationDALFactory } from "@app/services/pki-application/pki-application-dal";import { TProjectDALFactory } from "@app/services/project/project-dal";import { TProjectMembershipDALFactory } from "@app/services/project-membership/project-membership-dal";import { TSmtpService } from "@app/services/smtp/smtp-service";@@ -76,6 +77,7 @@ type TPkiAlertV2ServiceFactoryDep = {notificationService: Pick<TNotificationServiceFactory, "createUserNotifications">;projectMembershipDAL: Pick<TProjectMembershipDALFactory, "findAllProjectMembers">;projectDAL: Pick<TProjectDALFactory, "findById">;+ pkiApplicationDAL: Pick<TPkiApplicationDALFactory, "findById">;};export type TPkiAlertV2ServiceFactory = ReturnType<typeof pkiAlertV2ServiceFactory>;@@ -89,7 +91,8 @@ export const pkiAlertV2ServiceFactory = ({kmsService,notificationService,projectMembershipDAL,- projectDAL+ projectDAL,+ pkiApplicationDAL}: TPkiAlertV2ServiceFactoryDep) => {const $assertCanActOnAlert = async (action: ProjectPermissionActions,@@ -663,6 +666,7 @@ export const pkiAlertV2ServiceFactory = ({alertName,alertBefore,projectId,+ applicationId,eventType,channels,matchingCertificates,@@ -672,6 +676,7 @@ export const pkiAlertV2ServiceFactory = ({alertName: string;alertBefore?: string;projectId: string;+ applicationId?: string;eventType: PkiAlertEventType;channels: Array<{id: string;@@ -688,11 +693,19 @@ export const pkiAlertV2ServiceFactory = ({const errors: string[] = [];const alertBeforeDays = alertBefore ? parseTimeToDays(alertBefore) : 0;+ const project = await requestMemoize(requestMemoKeys.projectFindById(projectId), () =>+ projectDAL.findById(projectId)+ );+ if (!project) throw new NotFoundError({ message: `Project '${projectId}' not found` });+ const application = applicationId ? await pkiApplicationDAL.findById(applicationId) : null;const alertData: TAlertInfo = {id: alertId,name: alertName,...(alertBefore ? { alertBefore } : {}),- projectId+ projectId,+ orgId: project.orgId,+ ...(applicationId ? { applicationId } : {}),+ ...(application?.name ? { applicationName: application.name } : {})};const webhookEventType = alertEventTypeToWebhookEventType[eventType];@@ -784,31 +797,26 @@ export const pkiAlertV2ServiceFactory = ({// Send in-app notifications to project adminstry {const projectMembers = await projectMembershipDAL.findAllProjectMembers(projectId);- const project = await requestMemoize(requestMemoKeys.projectFindById(projectId), () =>- projectDAL.findById(projectId)++ const projectAdmins = projectMembers.filter((member) =>+ member.roles.some((role) => role.role === ProjectMembershipRole.Admin));- if (project) {- const projectAdmins = projectMembers.filter((member) =>- member.roles.some((role) => role.role === ProjectMembershipRole.Admin)+ if (projectAdmins.length > 0) {+ const alertingPath = `/organizations/${project.orgId}/projects/cert-manager/${projectId}/alerting`;+ const truncatedError =+ notificationError.length > 200 ? `${notificationError.substring(0, 200)}...` : notificationError;++ await notificationService.createUserNotifications(+ projectAdmins.map((admin) => ({+ userId: admin.userId,+ orgId: project.orgId,+ type: NotificationType.PKI_ALERT_CHANNEL_FAILED,+ title: `PKI Alert Channel Failed: ${alertName}`,+ body: `Your PKI alert **${alertName}** failed to deliver notifications: \`${truncatedError}\``,+ link: alertingPath+ })));-- if (projectAdmins.length > 0) {- const alertingPath = `/organizations/${project.orgId}/projects/cert-manager/${projectId}/alerting`;- const truncatedError =- notificationError.length > 200 ? `${notificationError.substring(0, 200)}...` : notificationError;-- await notificationService.createUserNotifications(- projectAdmins.map((admin) => ({- userId: admin.userId,- orgId: project.orgId,- type: NotificationType.PKI_ALERT_CHANNEL_FAILED,- title: `PKI Alert Channel Failed: ${alertName}`,- body: `Your PKI alert **${alertName}** failed to deliver notifications: \`${truncatedError}\``,- link: alertingPath- }))- );- }}} catch (notifyErr) {logger.error(notifyErr, `Failed to send in-app notification for PKI alert channel failure: ${alertId}`);@@ -848,6 +856,7 @@ export const pkiAlertV2ServiceFactory = ({alertName: alert.name,alertBefore,projectId,+ applicationId: alert.applicationId ?? undefined,eventType: PkiAlertEventType.EXPIRATION,channels,matchingCertificates,@@ -885,6 +894,7 @@ export const pkiAlertV2ServiceFactory = ({alertName: alert.name,alertBefore: alert.alertBefore ?? undefined,projectId,+ applicationId: alert.applicationId ?? undefined,eventType,channels,matchingCertificates,@@ -894,6 +904,7 @@ export const pkiAlertV2ServiceFactory = ({const testWebhookConfig = async ({projectId,+ applicationId,url,signingSecret,actorId,@@ -913,12 +924,21 @@ export const pkiAlertV2ServiceFactory = ({ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.PkiAlerts);+ const project = await requestMemoize(requestMemoKeys.projectFindById(projectId), () =>+ projectDAL.findById(projectId)+ );+ if (!project) throw new NotFoundError({ message: `Project '${projectId}' not found` });+ const application = applicationId ? await pkiApplicationDAL.findById(applicationId) : null;+// Create test data (SSRF validation is done in sendWebhookNotification)const alertData: TAlertInfo = {id: "00000000-0000-0000-0000-000000000000",name: "Test Alert",alertBefore: "30d",- projectId+ projectId,+ orgId: project.orgId,+ ...(applicationId ? { applicationId } : {}),+ ...(application?.name ? { applicationName: application.name } : {})};const testCertificates: TCertificatePreview[] = [diff --git a/backend/src/services/pki-alert-v2/pki-alert-v2-types.ts b/backend/src/services/pki-alert-v2/pki-alert-v2-types.tsindex 64eb18ec39..2978dd445f 100644--- a/backend/src/services/pki-alert-v2/pki-alert-v2-types.ts+++ b/backend/src/services/pki-alert-v2/pki-alert-v2-types.ts@@ -84,6 +84,9 @@ export type TAlertInfo = {name: string;alertBefore?: string;projectId: string;+ orgId: string;+ applicationId?: string;+ applicationName?: string;};// Certificate data for webhook payloads@@ -115,7 +118,7 @@ export type TPkiWebhookPayload = {// Event datadata: {- alert: TAlertInfo;+ alert: Omit<TAlertInfo, "projectId" | "orgId" | "applicationName">;certificates: TCertificateData[];metadata: {totalCertificates: number;@@ -381,6 +384,7 @@ export type TListMatchingCertificatesResponse = {export type TTestWebhookConfigDTO = TGenericPermission & {projectId: string;+ applicationId?: string;url: string;signingSecret?: string;};diff --git a/frontend/src/components/v2/CreatableSelect/CreatableSelect.tsx b/frontend/src/components/v2/CreatableSelect/CreatableSelect.tsxindex ab7db25c76..1a027cc9ab 100644--- a/frontend/src/components/v2/CreatableSelect/CreatableSelect.tsx+++ b/frontend/src/components/v2/CreatableSelect/CreatableSelect.tsx@@ -42,7 +42,7 @@ export const CreatableSelect = <T,>({),placeholder: () => "text-mineshaft-400 text-sm pl-1 py-0.5",input: () => "pl-1 py-0.5",- valueContainer: () => `p-1 max-h-56 ${isMulti ? "overflow-y-scroll!" : ""} gap-1`,+ valueContainer: () => `p-1 max-h-56 ${isMulti ? "overflow-y-auto!" : ""} gap-1`,singleValue: () => "leading-7 ml-1",multiValue: () => "bg-mineshaft-600 rounded-sm items-center py-0.5 px-2 gap-1.5",multiValueLabel: () => "leading-6 text-sm",diff --git a/frontend/src/hooks/api/pkiAlertsV2/mutations.ts b/frontend/src/hooks/api/pkiAlertsV2/mutations.tsindex c5d05bbd4d..6043d3fec7 100644--- a/frontend/src/hooks/api/pkiAlertsV2/mutations.ts+++ b/frontend/src/hooks/api/pkiAlertsV2/mutations.ts@@ -93,6 +93,7 @@ export const useDeletePkiAlertV2 = () => {export interface TTestPkiWebhookConfigV2 {url: string;signingSecret?: string;+ applicationId?: string;}export interface TTestPkiWebhookConfigV2Response {@@ -102,10 +103,10 @@ export interface TTestPkiWebhookConfigV2Response {export const useTestPkiWebhookConfigV2 = () => {return useMutation<TTestPkiWebhookConfigV2Response, unknown, TTestPkiWebhookConfigV2>({- mutationFn: async ({ url, signingSecret }) => {+ mutationFn: async ({ url, signingSecret, applicationId }) => {const { data } = await apiRequest.post<TTestPkiWebhookConfigV2Response>("/api/v2/pki/alerts/test-webhook",- { url, signingSecret }+ { url, signingSecret, ...(applicationId ? { applicationId } : {}) });return data;}diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsxindex 603247ceb2..fa1e379954 100644--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx@@ -113,12 +113,12 @@ export const ApplicationDetailsByIDPage = () => {params: { orgId: orgId ?? "", projectId: projectId ?? "" }});} catch (err) {- const detail = err instanceof Error ? err.message : "Failed to delete Application.";+ const detail = err instanceof Error ? err.message : "Failed to delete application.";createNotification({ type: "error", text: detail });}};- if (isPending || isPermissionsPending) {+ if (isPending) {return <PageLoader />;}@@ -126,6 +126,10 @@ export const ApplicationDetailsByIDPage = () => {return <div className="p-12 text-muted">Application not found.</div>;}+ if (isPermissionsPending) {+ return <PageLoader />;+ }+return (<><Helmet>@@ -155,10 +159,6 @@ export const ApplicationDetailsByIDPage = () => {}className="mb-4">- <Button variant="outline" size="xs" onClick={handleCopyId}>- <FontAwesomeIcon icon={isIdCopied ? faCheck : faCopy} />- Copy ID- </Button><DropdownMenu><DropdownMenuTrigger asChild><Button variant="outline" size="xs">@@ -167,6 +167,10 @@ export const ApplicationDetailsByIDPage = () => {</Button></DropdownMenuTrigger><DropdownMenuContent align="end" sideOffset={2}>+ <DropdownMenuItem onClick={handleCopyId}>+ <FontAwesomeIcon icon={isIdCopied ? faCheck : faCopy} />+ Copy ID+ </DropdownMenuItem><DropdownMenuItemisDisabled={!canEditApplication}onClick={() => handleEditPopUpOpen("application", application)}@@ -265,7 +269,7 @@ export const ApplicationDetailsByIDPage = () => {<DeleteActionModalisOpen={isDeleteOpen}title={`Delete ${application.name}?`}- subTitle="This unattaches all Profiles, app-scoped syncs/alerts, and revokes app-only memberships. Issued certificates remain in Certificate Manager but lose their Application tag."+ subTitle="This unattaches all Profiles, app-scoped syncs/alerts, and revokes app-only memberships. Issued certificates remain in Certificate Manager but lose their application tag."onChange={(open) => setIsDeleteOpen(open)}deleteKey="confirm"onDeleteApproved={handleDelete}diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationMembersTab.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationMembersTab.tsxindex 82d7e73207..542ccdf6de 100644--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationMembersTab.tsx+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationMembersTab.tsx@@ -102,7 +102,7 @@ export const ApplicationMembersTab = ({ members, applicationId }: Props) => {<CardHeader><CardTitle>Members</CardTitle><CardDescription>- Users, machine identities, and groups granted access to this Application.+ Users, machine identities, and groups granted access to this application.</CardDescription><CardAction><Button variant="outline" onClick={() => setIsAddOpen(true)} isDisabled={!canAddMember}>@@ -117,7 +117,7 @@ export const ApplicationMembersTab = ({ members, applicationId }: Props) => {<EmptyHeader><EmptyTitle>No members yet</EmptyTitle><EmptyDescription>- Add a user, identity, or group to grant access to this Application.+ Add a user, identity, or group to grant access to this application.</EmptyDescription></EmptyHeader></Empty>@@ -228,7 +228,7 @@ export const ApplicationMembersTab = ({ members, applicationId }: Props) => {<DeleteActionModalisOpen={popUp.removeMember.isOpen}title="Remove member?"- subTitle="The member loses access to this Application immediately. Their access to other Applications is unchanged."+ subTitle="The member loses access to this application immediately. Their access to other applications is unchanged."onChange={(o) => handlePopUpToggle("removeMember", o)}deleteKey="confirm"onDeleteApproved={async () => {diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSettingsTab.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSettingsTab.tsxindex 31ecfdbe18..d10dd7d85f 100644--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSettingsTab.tsx+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSettingsTab.tsx@@ -142,7 +142,7 @@ const ApplicationPoliciesTable = ({<EmptyHeader><EmptyTitle>No approval policies</EmptyTitle><EmptyDescription>- Create one to require approval before certificates are issued for this Application.+ Create one to require approval before certificates are issued for this application.</EmptyDescription></EmptyHeader></Empty>@@ -565,7 +565,7 @@ export const ApplicationSettingsTab = ({ application, profiles }: Props) => {<EmptyHeader><EmptyTitle>No profiles attached</EmptyTitle><EmptyDescription>- Attach a certificate profile, then configure how this Application enrolls against+ Attach a certificate profile, then configure how this application enrolls againstit.</EmptyDescription></EmptyHeader>@@ -665,7 +665,7 @@ export const ApplicationSettingsTab = ({ application, profiles }: Props) => {<CardHeader><CardTitle>Approval Policies</CardTitle><CardDescription>- Require approval before certificates are issued for this Application.+ Require approval before certificates are issued for this application.</CardDescription><CardAction><Button@@ -710,7 +710,7 @@ export const ApplicationSettingsTab = ({ application, profiles }: Props) => {<EmptyHeader><EmptyTitle>No alerts configured</EmptyTitle><EmptyDescription>- Create one to get notified about certificate events for this Application.+ Create one to get notified about certificate events for this application.</EmptyDescription></EmptyHeader></Empty>@@ -799,7 +799,7 @@ export const ApplicationSettingsTab = ({ application, profiles }: Props) => {<DialogHeader><DialogTitle>Attach Profiles</DialogTitle><DialogDescription>- Select one or more profiles to attach to this Application.+ Select one or more profiles to attach to this application.</DialogDescription></DialogHeader><div className="py-2">@@ -832,7 +832,7 @@ export const ApplicationSettingsTab = ({ application, profiles }: Props) => {<DeleteActionModalisOpen={Boolean(profileToDetach)}title={`Detach profile ${profileToDetach?.profileSlug ?? ""}?`}- subTitle="This Application will no longer be able to issue from this Profile. Existing certificates remain."+ subTitle="This application will no longer be able to issue from this Profile. Existing certificates remain."deleteKey="confirm"onChange={(open) => {if (!open) setProfileToDetach(null);diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSyncsTab.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSyncsTab.tsxindex d61cde4470..0e9a2d16f0 100644--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSyncsTab.tsx+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ApplicationSyncsTab.tsx@@ -49,7 +49,7 @@ export const ApplicationSyncsTab = ({ applicationId, applicationName, projectId<CardHeader><CardTitle>Certificate Syncs</CardTitle><CardDescription>- Push certificates from this Application out to AWS ACM, Cloudflare, Azure Key Vault, and+ Push certificates from this application out to AWS ACM, Cloudflare, Azure Key Vault, andother destinations.</CardDescription><CardAction>diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsxindex 860e61acbb..8250947c7f 100644--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx@@ -126,51 +126,6 @@ const CopyableField = ({);};-const SecretField = ({- label,- value,- helper-}: {- label: string;- value: string;- helper?: string;-}) => {- const [copied, setCopied] = useToggle(false);- const [shown, setShown] = useToggle(false);- return (- <div>- <FieldLabel>{label}</FieldLabel>- <InputGroup>- <InputGroupInput- value={value}- readOnly- type={shown ? "text" : "password"}- className="font-mono text-xs"- />- <InputGroupAddon align="inline-end">- <InputGroupButton- aria-label={shown ? "hide value" : "show value"}- onClick={setShown.toggle}- >- {shown ? <EyeOffIcon /> : <EyeIcon />}- </InputGroupButton>- <InputGroupButton- aria-label={`copy ${label}`}- onClick={() => {- navigator.clipboard.writeText(value);- setCopied.on();- setTimeout(() => setCopied.off(), COPY_RESET_MS);- }}- >- <FontAwesomeIcon icon={copied ? faCheck : faCopy} />- </InputGroupButton>- </InputGroupAddon>- </InputGroup>- {helper ? <p className="mt-1 text-xs text-accent">{helper}</p> : null}- </div>- );-};-const DisableEnrollmentButton = ({method,onConfirmed,@@ -191,7 +146,7 @@ const DisableEnrollmentButton = ({onChange={setIsOpen}confirmKey="disable"title={`Disable ${method} enrollment for this profile?`}- subTitle={`Clients using ${method} against this profile via this Application will stop being able to request certificates. Existing certificates remain valid.`}+ subTitle={`Clients using ${method} against this profile via this application will stop being able to request certificates. Existing certificates remain valid.`}buttonText="Disable enrollment"onConfirmed={async () => {await onConfirmed();@@ -635,7 +590,7 @@ const AcmePanel = ({{credentials ? (<><CopyableField label="EAB KID" value={credentials.eabKid} />- <SecretField+ <CopyableFieldlabel="EAB Secret"value={credentials.eabSecret}helper="External Account Binding key + secret used by ACME clients to register against this profile."@@ -1120,14 +1075,7 @@ export const ConfigureEnrollmentModal = ({<Dialog open={isOpen} onOpenChange={onOpenChange}><DialogContent className="max-h-[90vh] thin-scrollbar max-w-3xl overflow-y-auto"><DialogHeader>- <DialogTitle className="flex items-center gap-2">- <span>Configure enrollment methods for</span>- {profile?.profileSlug ? (- <code className="rounded bg-primary/15 px-1.5 py-0.5 font-mono text-sm text-primary">- {profile.profileSlug}- </code>- ) : null}- </DialogTitle>+ <DialogTitle>Configure enrollment methods for {profile?.profileSlug}</DialogTitle><DialogDescription>Enable an enrollment method to allow clients to request certificates using this profile.</DialogDescription>@@ -1166,9 +1114,7 @@ export const ConfigureEnrollmentModal = ({<DropdownMenuItem key={m} onClick={() => handleAdd(m)}><div className="flex flex-col"><span className="font-medium">{METHOD_LABELS[m]}</span>- <span className="text-muted-foreground text-xs">- {METHOD_DESCRIPTIONS[m]}- </span>+ <span className="text-xs text-accent">{METHOD_DESCRIPTIONS[m]}</span></div></DropdownMenuItem>))}diff --git a/frontend/src/pages/cert-manager/ApplicationsPage/components/PkiApplicationModal.tsx b/frontend/src/pages/cert-manager/ApplicationsPage/components/PkiApplicationModal.tsxindex d9481bba4b..feabecf778 100644--- a/frontend/src/pages/cert-manager/ApplicationsPage/components/PkiApplicationModal.tsx+++ b/frontend/src/pages/cert-manager/ApplicationsPage/components/PkiApplicationModal.tsx@@ -126,7 +126,7 @@ export const PkiApplicationModal = ({ popUp, handlePopUpToggle }: Props) => {<DialogTitle>{editing ? "Edit Application" : "Create Application"}</DialogTitle><DialogDescription>{editing- ? "Update this Application's name and description. Changing the name will invalidate any deep links."+ ? "Update this Application's name and description.": "A logical grouping for a service or workload that needs certificates."}</DialogDescription></DialogHeader>diff --git a/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestsSection.tsx b/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestsSection.tsxindex 9bcf5b5618..605499465c 100644--- a/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestsSection.tsx+++ b/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestsSection.tsx@@ -17,6 +17,10 @@ import {DropdownMenu,DropdownMenuContent,DropdownMenuTrigger,+ Empty,+ EmptyDescription,+ EmptyHeader,+ EmptyTitle,IconButton,InputGroup,InputGroupAddon,@@ -412,17 +416,6 @@ export const CertificateRequestsSection = ({</TableCell></TableRow>)}- {!isLoading &&- !isError &&- certificateRequestsData?.certificateRequests?.length === 0 && (- <TableRow>- <TableCell colSpan={6} className="py-8 text-center text-foreground">- {isTableFiltered- ? "No certificate requests found matching your filters"- : "No certificate requests found"}- </TableCell>- </TableRow>- )}{!isLoading &&!isError &&certificateRequestsData?.certificateRequests?.map((request) => (@@ -436,6 +429,19 @@ export const CertificateRequestsSection = ({</TableBody></Table>+ {!isLoading && !isError && certificateRequestsData?.certificateRequests?.length === 0 && (+ <Empty className="border">+ <EmptyHeader>+ <EmptyTitle>{isTableFiltered ? "No matches" : "No certificate requests"}</EmptyTitle>+ <EmptyDescription>+ {isTableFiltered+ ? "No certificate requests match your filters."+ : "Request a certificate to see it listed here."}+ </EmptyDescription>+ </EmptyHeader>+ </Empty>+ )}+{certificateRequestsData && certificateRequestsData.totalCount > 0 && (<Paginationcount={certificateRequestsData.totalCount}diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.tsx b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.tsxindex fd72bf9e7b..4c1515980e 100644--- a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.tsx+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.tsx@@ -34,6 +34,7 @@ import {DropdownMenuItem,DropdownMenuTrigger,Empty,+ EmptyDescription,EmptyHeader,EmptyTitle,IconButton,@@ -880,7 +881,7 @@ export const CertificatesTable = ({{visibleColumns.has("issuedAt") && (<TableCell>{certificate.notBefore ? (- format(new Date(certificate.notBefore), "MMM d, yyyy")+ format(new Date(certificate.notBefore), "yyyy-MM-dd")) : (<EmptyCell />)}@@ -889,7 +890,7 @@ export const CertificatesTable = ({{visibleColumns.has("expiresAt") && (<TableCell>{certificate.notAfter ? (- format(new Date(certificate.notAfter), "MMM d, yyyy")+ format(new Date(certificate.notAfter), "yyyy-MM-dd")) : (<EmptyCell />)}@@ -1354,10 +1355,13 @@ export const CertificatesTable = ({<Empty className="border"><EmptyHeader><EmptyTitle>- {isTableFiltered || appliedSearch- ? "No certificates match search..."- : "No certificates have been issued"}+ {isTableFiltered || appliedSearch ? "No matches" : "No certificates"}</EmptyTitle>+ <EmptyDescription>+ {isTableFiltered || appliedSearch+ ? "No certificates match your search or filters."+ : "Issue or import a certificate to see it listed here."}+ </EmptyDescription></EmptyHeader></Empty>)}diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddOrgMemberModal.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddOrgMemberModal.tsxindex 2bd596b6dc..c702927363 100644--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddOrgMemberModal.tsx+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddOrgMemberModal.tsx@@ -217,6 +217,7 @@ export const AddOrgMemberModal = ({addUserToProject({orgId: currentOrg.id,projectId: el.id,+ projectType: el.type,roleSlugs: [projectRole.slug],usernames})@@ -256,7 +257,7 @@ export const AddOrgMemberModal = ({case ProjectType.SecretManager:return "Secrets";case ProjectType.CertificateManager:- return "PKI";+ return "Certificate Manager";case ProjectType.KMS:return "KMS";case ProjectType.SSH:diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddSubOrgMemberModal.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddSubOrgMemberModal.tsxindex 5edba7cde7..162d17e777 100644--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddSubOrgMemberModal.tsx+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/AddSubOrgMemberModal.tsx@@ -35,6 +35,7 @@ const addMemberFormSchema = z.object({name: z.string(),id: z.string(),slug: z.string(),+ type: z.string().optional(),version: z.nativeEnum(ProjectVersion)}))@@ -118,6 +119,7 @@ export const AddSubOrgMemberModal = ({ onClose }: Props) => {addUserToProject({orgId: currentOrg.id,projectId: el.id,+ projectType: el.type,roleSlugs: [projectRoleSlug],usernames})@@ -131,7 +133,7 @@ export const AddSubOrgMemberModal = ({ onClose }: Props) => {case ProjectType.SecretManager:return "Secrets";case ProjectType.CertificateManager:- return "PKI";+ return "Certificate Manager";case ProjectType.KMS:return "KMS";case ProjectType.SSH:diff --git a/frontend/src/pages/organization/GroupDetailsByIDPage/components/AddGroupProjectModal.tsx b/frontend/src/pages/organization/GroupDetailsByIDPage/components/AddGroupProjectModal.tsxindex 07c33a349c..92451bb4b6 100644--- a/frontend/src/pages/organization/GroupDetailsByIDPage/components/AddGroupProjectModal.tsx+++ b/frontend/src/pages/organization/GroupDetailsByIDPage/components/AddGroupProjectModal.tsx@@ -70,7 +70,7 @@ export const AddGroupProjectModal = ({ popUp, handlePopUpToggle }: Props) => {const { mutateAsync: addProjectToGroupMutateAsync, isPending: isAdding } = useAddProjectToGroup();- const handleAddProject = async (projectId: string, projectName: string) => {+ const handleAddProject = async (projectId: string, projectName: string, projectType?: string) => {if (!popUpData?.groupId) {createNotification({text: "Some data is missing, please refresh the page and try again",@@ -82,6 +82,7 @@ export const AddGroupProjectModal = ({ popUp, handlePopUpToggle }: Props) => {await addProjectToGroupMutateAsync({groupId: popUpData.groupId,projectId,+ projectType,role: "no-access"});@@ -143,7 +144,9 @@ export const AddGroupProjectModal = ({ popUp, handlePopUpToggle }: Props) => {colorSchema="primary"variant="outline_bg"type="submit"- onClick={() => handleAddProject(project.id, project.name)}+ onClick={() =>+ handleAddProject(project.id, project.name, project.type)+ }>Assign</Button>diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsxindex fb11c758e1..c4bdfe2461 100644--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx@@ -24,7 +24,7 @@ import { UsePopUpState } from "@app/hooks/usePopUp";const schema = z.object({- project: z.object({ name: z.string(), id: z.string() }),+ project: z.object({ name: z.string(), id: z.string(), type: z.string().optional() }),role: z.object({ name: z.string(), slug: z.string() })}).required();@@ -77,6 +77,7 @@ const Content = ({ identityId, handlePopUpToggle }: Omit<Props, "popUp">) => {const onFormSubmit = async ({ project: selectedProject, role }: FormData) => {await addIdentityToWorkspace({projectId: selectedProject.id,+ projectType: selectedProject.type,identityId,role: role.slug || undefined});diff --git a/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/AddMemberModal.tsx b/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/AddMemberModal.tsxindex 723ffc6471..2705d70436 100644--- a/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/AddMemberModal.tsx+++ b/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/AddMemberModal.tsx@@ -168,7 +168,7 @@ export const AddMemberModal = ({ popUp, handlePopUpToggle }: Props) => {}}createNotification({- text: "Successfully added user to the project",+ text: `Successfully added user to ${isCertManager ? productLabel : "the project"}`,type: "success"});handlePopUpToggle("addMember", false);diff --git a/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2FormSteps.tsx b/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2FormSteps.tsxindex 005ebb3896..6a3a71e04b 100644--- a/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2FormSteps.tsx+++ b/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2FormSteps.tsx@@ -82,6 +82,7 @@ interface CreatePkiAlertV2FormStepsProps {setExpandedChannel: (channel: string | undefined) => void;showPreview?: boolean;showFilters?: boolean;+ applicationId?: string;}type ChannelUIState = {@@ -97,7 +98,8 @@ export const CreatePkiAlertV2FormSteps = ({expandedChannel,setExpandedChannel,showPreview = true,- showFilters = true+ showFilters = true,+ applicationId}: CreatePkiAlertV2FormStepsProps) => {const {control,@@ -265,7 +267,8 @@ export const CreatePkiAlertV2FormSteps = ({try {const result = await testWebhookConfig({url: webhookConfig.url,- signingSecret: webhookConfig.signingSecret || undefined+ signingSecret: webhookConfig.signingSecret || undefined,+ applicationId});if (result.success) {diff --git a/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2Modal.tsx b/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2Modal.tsxindex 917d03bdbc..230b2a3774 100644--- a/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2Modal.tsx+++ b/frontend/src/views/PkiAlertsV2Page/components/CreatePkiAlertV2Modal.tsx@@ -376,6 +376,7 @@ export const CreatePkiAlertV2Modal = ({setExpandedChannel={setExpandedChannel}showPreview={hasPreviewTab(watchedEventType, applicationScoped)}showFilters={!applicationScoped}+ applicationId={applicationId}/></Tab.Panels></Tab.Group>