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
Merge remote-tracking branch 'origin/main' into feat/audit-log-stream-failure-events
Calvinc4ad9f72a065
diff --cc frontend/src/hooks/api/alerts/types.tsindex 7464d72bd3,a9fc0eb277..142111af7a--- a/frontend/src/hooks/api/alerts/types.ts+++ b/frontend/src/hooks/api/alerts/types.ts@@@ -4,16 -5,37 +5,40 @@@ import { CertSource } from "@app/hooks/export enum AlertResourceType {IdentityAuthentication = "identity.authentication",+ PamFolder = "pam.folder",- SecretReminder = "secret.reminder"+ SecretReminder = "secret.reminder",+ AuditLogStream = "audit-log.stream"}export enum AlertEventType {IdentityAuthenticationExpiry = "identity.authentication.expiry",IdentityAuthMethodChanged = "identity.authentication.auth-method-changed",+ PamAccessRequested = "pam.folder.access-requested",+ PamAccessRequestApproved = "pam.folder.access-request-approved",+ PamAccessRequestDenied = "pam.folder.access-request-denied",- PamAccessRequestBypassed = "pam.folder.access-request-bypassed"++ PamAccessRequestBypassed = "pam.folder.access-request-bypassed",+ AuditLogStreamDeliveryFailed = "audit-log.stream.delivery-failed"}+ export const ALERT_RESOURCE_EVENT_TYPES: Record<AlertResourceType, AlertEventType[]> = {+ [AlertResourceType.IdentityAuthentication]: [+ AlertEventType.IdentityAuthenticationExpiry,+ AlertEventType.IdentityAuthMethodChanged+ ],+ [AlertResourceType.PamFolder]: [+ AlertEventType.PamAccessRequested,+ AlertEventType.PamAccessRequestApproved,+ AlertEventType.PamAccessRequestDenied,+ AlertEventType.PamAccessRequestBypassed+ ],+ // Reminder alerts are edited from the secret's reminder form, not the generic alert form.- [AlertResourceType.SecretReminder]: []++ [AlertResourceType.SecretReminder]: [],++ [AlertResourceType.AuditLogStream]: [AlertEventType.AuditLogStreamDeliveryFailed]+ };++ // Resource types whose provider accepts plain email addresses as email channel recipients+ export const ALERT_RESOURCE_TYPES_WITH_EMAIL_ADDRESSES: string[] = [AlertResourceType.PamFolder];+export enum AlertChannelType {Email = "email",Slack = "slack",@@@ -69,24 -91,17 +94,19 @@@ export const MAX_CERTIFICATE_ALERT_FILTexport const ALERT_RESOURCE_TYPE_LABELS: Record<AlertResourceType, string> = {[AlertResourceType.IdentityAuthentication]: "Machine Identity Authentication",+ [AlertResourceType.PamFolder]: "PAM Folder",- [AlertResourceType.SecretReminder]: "Secret Reminder"+ [AlertResourceType.SecretReminder]: "Secret Reminder",+ [AlertResourceType.AuditLogStream]: "Audit Log Stream"};- // Secret reminders have their own form, so they list no events here.- export const ALERT_RESOURCE_EVENT_TYPES: Record<AlertResourceType, AlertEventType[]> = {- [AlertResourceType.IdentityAuthentication]: [- AlertEventType.IdentityAuthenticationExpiry,- AlertEventType.IdentityAuthMethodChanged- ],- [AlertResourceType.SecretReminder]: [],- [AlertResourceType.AuditLogStream]: [AlertEventType.AuditLogStreamDeliveryFailed]- };-export const ALERT_EVENT_TYPE_LABELS: Record<AlertEventType, string> = {[AlertEventType.IdentityAuthenticationExpiry]: "Credential Expiration",[AlertEventType.IdentityAuthMethodChanged]: "Auth Method Change",+ [AlertEventType.PamAccessRequested]: "Access Requested",+ [AlertEventType.PamAccessRequestApproved]: "Request Approved",+ [AlertEventType.PamAccessRequestDenied]: "Request Denied",- [AlertEventType.PamAccessRequestBypassed]: "Break-Glass Used"++ [AlertEventType.PamAccessRequestBypassed]: "Break-Glass Used",+ [AlertEventType.AuditLogStreamDeliveryFailed]: "Delivery Failure"};export const ALERT_EVENT_TYPE_DESCRIPTIONS: Record<AlertEventType, string> = {@@@ -94,10 -109,23 +114,25 @@@"Notify a set number of days before a Universal Auth client secret or Token Auth access token expires.",[AlertEventType.IdentityAuthMethodChanged]:"Notify whenever an auth method is added, updated, or removed, or one of its credentials is created, updated, or revoked.",+ [AlertEventType.PamAccessRequested]:+ "Notify when someone requests access to an account in this folder.",+ [AlertEventType.PamAccessRequestApproved]:+ "Notify when an access request in this folder is approved.",+ [AlertEventType.PamAccessRequestDenied]:+ "Notify when an access request in this folder is denied.",+ [AlertEventType.PamAccessRequestBypassed]:- "Notify when someone uses break-glass to access an account in this folder without approval."++ "Notify when someone uses break-glass to access an account in this folder without approval.",+ [AlertEventType.AuditLogStreamDeliveryFailed]:+ "Notify when an external log stream fails to deliver audit log events after all retries."};+ // Channel types a plan doesn't include, and the paywall shown when one is picked.+ export type TAlertChannelPaywall = {+ lockedChannelTypes: AlertChannelType[];+ intent: UpgradeIntent;+ paywallKey: string;+ };+export const ALERT_CHANNEL_TYPE_LABELS: Record<AlertChannelType, string> = {[AlertChannelType.Email]: "Email",[AlertChannelType.Slack]: "Slack",diff --cc frontend/src/views/Alerts/AddAlertModal.tsxindex 3db1669af4,d99e596169..51f16673f0--- a/frontend/src/views/Alerts/AddAlertModal.tsx+++ b/frontend/src/views/Alerts/AddAlertModal.tsx@@@ -6,9 -11,10 +11,10 @@@ import { AlertForm } from "./AlertForm"type Props = {isOpen: boolean;onOpenChange: (isOpen: boolean) => void;+ resourceType: AlertResourceType;projectId?: string;- resourceType?: AlertResourceType;resourceId?: string;+ channelPaywall?: TAlertChannelPaywall;alert?: TAlert;unavailableEventTypes?: AlertEventType[];};@@@ -16,9 -22,10 +22,10 @@@export const AddAlertModal = ({isOpen,onOpenChange,- projectId,resourceType,+ projectId,resourceId,+ channelPaywall,alert,unavailableEventTypes}: Props) => {@@@ -36,9 -43,10 +43,10 @@@{isOpen && (<AlertFormkey={alert?.id ?? "new"}- projectId={projectId}resourceType={resourceType}+ projectId={projectId}resourceId={resourceId}+ channelPaywall={channelPaywall}alert={alert}unavailableEventTypes={unavailableEventTypes}onComplete={() => onOpenChange(false)}diff --cc frontend/src/views/Alerts/AlertAction.tsxindex 20d8682f27,bddf79087a..f62d830e96--- a/frontend/src/views/Alerts/AlertAction.tsx+++ b/frontend/src/views/Alerts/AlertAction.tsx@@@ -45,9 -46,9 +46,10 @@@ import { AddAlertModal } from "./AddAleimport { getChannelIcon } from "./channelIcons";type Props = {- resourceType?: AlertResourceType;- resourceId: string;+ resourceType: AlertResourceType;+ // Alerts that watch every resource of the type in scope when omitted.+ resourceId?: string;+ channelPaywall?: TAlertChannelPaywall;// Org-scoped when omitted.projectId?: string;// Renders the alerts without any way to create, edit or remove them.@@@ -63,11 -63,12 +64,12 @@@ const getEnabledChannelTypes = (alert:);export const AlertAction = ({- resourceType = AlertResourceType.IdentityAuthentication,+ resourceType,resourceId,+ channelPaywall,projectId,readOnly = false,- renderPermissionGate+ renderPermissionGate = (render) => render(true)}: Props) => {const { data: alerts = [] } = useListAlerts({resourceType,@@@ -268,9 -262,10 +270,10 @@@<AddAlertModalisOpen={popUp.alert.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("alert", isOpen)}- projectId={projectId}resourceType={resourceType}+ projectId={projectId}resourceId={resourceId}+ channelPaywall={channelPaywall}alert={selectedAlert}unavailableEventTypes={usedEventTypes}/>diff --cc frontend/src/views/Alerts/AlertForm.tsxindex 659464041d,e78ce910ea..dd3d4c3797--- a/frontend/src/views/Alerts/AlertForm.tsx+++ b/frontend/src/views/Alerts/AlertForm.tsx@@@ -44,9 -47,10 +45,10 @@@ importimport { ChannelsField } from "./ChannelsField";type Props = {+ resourceType: AlertResourceType;projectId?: string;- resourceType?: AlertResourceType;resourceId?: string;+ channelPaywall?: TAlertChannelPaywall;alert?: TAlert;unavailableEventTypes?: AlertEventType[];onComplete: () => void;@@@ -57,13 -61,16 +59,17 @@@ const DEFAULT_ALERT_BEFORE_DAYS = 7const DEFAULT_ALERT_NAMES: Record<AlertEventType, string> = {[AlertEventType.IdentityAuthenticationExpiry]: "Credential expiration alert",[AlertEventType.IdentityAuthMethodChanged]: "Auth method change alert",+ [AlertEventType.PamAccessRequested]: "Access requested alert",+ [AlertEventType.PamAccessRequestApproved]: "Request approved alert",+ [AlertEventType.PamAccessRequestDenied]: "Request denied alert",- [AlertEventType.PamAccessRequestBypassed]: "Break-glass alert"++ [AlertEventType.PamAccessRequestBypassed]: "Break-glass alert",+ [AlertEventType.AuditLogStreamDeliveryFailed]: "Stream delivery failure alert"};- const AGENT_VAULT_ALERT_NAME_PLACEHOLDERS: Record<AlertEventType, string> = {+ const AGENT_VAULT_ALERT_NAME_PLACEHOLDERS: Partial<Record<AlertEventType, string>> = {[AlertEventType.IdentityAuthenticationExpiry]: "Credential expiration alert",- [AlertEventType.IdentityAuthMethodChanged]: "Auth method change alert"+ [AlertEventType.IdentityAuthMethodChanged]: "Auth method change alert",+ [AlertEventType.AuditLogStreamDeliveryFailed]: "Stream delivery failure alert"};-const DEFAULT_EVENT_TYPE = AlertEventType.IdentityAuthenticationExpiry;const buildFormDefaults = (alert: TAlert | undefined,@@@ -98,9 -106,10 +104,10 @@@};export const AlertForm = ({+ resourceType,projectId,- resourceType: alertResourceType = AlertResourceType.IdentityAuthentication,resourceId,+ channelPaywall,alert,unavailableEventTypes = [],onComplete,@@@ -311,8 -356,9 +318,9 @@@<ChannelsFieldprojectId={projectId}- resourceType={resourceTypeValue}+ resourceType={resourceType}resourceId={resourceId ?? alert?.resourceId ?? null}+ channelPaywall={channelPaywall}/></div>