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
fixed data access
Thiago Araujo da Silva253d21258b9b
diff --git a/backend/src/ee/services/audit-log/audit-log-event-classes.ts b/backend/src/ee/services/audit-log/audit-log-event-classes.tsindex 67303abcca..89910159b0 100644--- a/backend/src/ee/services/audit-log/audit-log-event-classes.ts+++ b/backend/src/ee/services/audit-log/audit-log-event-classes.ts@@ -21,14 +21,21 @@ export const AUDIT_LOG_EVENT_CLASSES = [AuditLogEventClass.Authorization] as const;+export const ALWAYS_RECORDED_AUDIT_LOG_EVENT_CLASSES: readonly AuditLogEventClass[] = [+ AuditLogEventClass.Management,+ AuditLogEventClass.DataAccess+];+export const CONFIGURABLE_AUDIT_LOG_EVENT_CLASSES = [- AuditLogEventClass.DataAccess,AuditLogEventClass.Authentication,AuditLogEventClass.Authorization] as const;export type TConfigurableAuditLogEventClass = (typeof CONFIGURABLE_AUDIT_LOG_EVENT_CLASSES)[number];+export const isAlwaysRecordedEventClass = (eventClass: AuditLogEventClass) =>+ ALWAYS_RECORDED_AUDIT_LOG_EVENT_CLASSES.includes(eventClass);+const AUTHENTICATION_EVENT_TYPES: readonly EventType[] = [EventType.LOGIN_IDENTITY_UNIVERSAL_AUTH,EventType.LOGIN_IDENTITY_UNIVERSAL_AUTH_FAILED,diff --git a/backend/src/ee/services/audit-log/audit-log-queue.test.ts b/backend/src/ee/services/audit-log/audit-log-queue.test.tsindex 9920c39e68..527ca3cbbc 100644--- a/backend/src/ee/services/audit-log/audit-log-queue.test.ts+++ b/backend/src/ee/services/audit-log/audit-log-queue.test.ts@@ -259,24 +259,36 @@ describe("audit-log-queue event class settings", () => {...overrides});- test("drops a data-access event when the org disabled the class", async () => {+ test("drops an authentication event when the org disabled the class", async () => {const { service, keyStore, auditLogSettingsService } = await createHarness();- auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(settings({ org: { "data-access": false } }));+ auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(settings({ org: { authentication: false } }));- await service.pushToLog(dto({ event: { type: "get-secrets", metadata: {} } }) as never);+ await service.pushToLog(dto({ event: { type: "user-login", metadata: {} } }) as never);expect(keyStore.streamAdd).not.toHaveBeenCalled();});- test("stores a data-access event when the class is enabled", async () => {+ test("stores an authentication event when the class is enabled", async () => {const { service, keyStore, auditLogSettingsService } = await createHarness();- auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(settings({ org: { "data-access": true } }));+ auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(settings({ org: { authentication: true } }));- await service.pushToLog(dto({ event: { type: "get-secrets", metadata: {} } }) as never);+ await service.pushToLog(dto({ event: { type: "user-login", metadata: {} } }) as never);expect(keyStore.streamAdd).toHaveBeenCalledTimes(1);});+ test("records a data-access event even if a row says the class is off", async () => {+ const { service, keyStore, auditLogSettingsService } = await createHarness();+ auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(+ settings({ org: { "data-access": false }, projects: { p1: { "data-access": false } } })+ );++ await service.pushToLog(dto({ event: { type: "get-secrets", metadata: {} } }) as never);+ await service.pushToLog(dto({ projectId: "p1", event: { type: "get-secrets", metadata: {} } }) as never);++ expect(keyStore.streamAdd).toHaveBeenCalledTimes(2);+ });+test("records a management event even if a row says the class is off", async () => {const { service, keyStore, auditLogSettingsService } = await createHarness();auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(settings({ org: { management: false } }));@@ -298,23 +310,23 @@ describe("audit-log-queue event class settings", () => {test("a project event uses the project's own setting, never the org's", async () => {const { service, keyStore, auditLogSettingsService } = await createHarness();auditLogSettingsService.getEffectiveSettings.mockResolvedValue(- settings({ org: { "data-access": false }, projects: { "p-off": { "data-access": false } } })+ settings({ org: { authentication: false }, projects: { "p-off": { authentication: false } } }));- await service.pushToLog(dto({ projectId: "p-none", event: { type: "get-secrets", metadata: {} } }) as never);+ await service.pushToLog(dto({ projectId: "p-none", event: { type: "user-login", metadata: {} } }) as never);expect(keyStore.streamAdd).toHaveBeenCalledTimes(1);- await service.pushToLog(dto({ projectId: "p-off", event: { type: "get-secrets", metadata: {} } }) as never);+ await service.pushToLog(dto({ projectId: "p-off", event: { type: "user-login", metadata: {} } }) as never);expect(keyStore.streamAdd).toHaveBeenCalledTimes(1);});test("an org-scoped event ignores project settings", async () => {const { service, keyStore, auditLogSettingsService } = await createHarness();auditLogSettingsService.getEffectiveSettings.mockResolvedValueOnce(- settings({ org: {}, projects: { p1: { "data-access": false } } })+ settings({ org: {}, projects: { p1: { authentication: false } } }));- await service.pushToLog(dto({ event: { type: "get-secrets", metadata: {} } }) as never);+ await service.pushToLog(dto({ event: { type: "user-login", metadata: {} } }) as never);expect(keyStore.streamAdd).toHaveBeenCalledTimes(1);});diff --git a/backend/src/ee/services/audit-log/audit-log-settings-service.test.ts b/backend/src/ee/services/audit-log/audit-log-settings-service.test.tsindex a7df30a33c..db2af4b86c 100644--- a/backend/src/ee/services/audit-log/audit-log-settings-service.test.ts+++ b/backend/src/ee/services/audit-log/audit-log-settings-service.test.ts@@ -22,8 +22,8 @@ const settings = (overrides: Partial<TEffectiveAuditLogSettings> = {}): TEffecti});describe("isAuditLogEventEnabled", () => {- const eventClass = AuditLogEventClass.DataAccess;- const eventType = EventType.GET_SECRETS;+ const eventClass = AuditLogEventClass.Authentication;+ const eventType = EventType.USER_LOGIN;test("a project uses its own row or the default, never the org's row", () => {expect(isAuditLogEventEnabled(settings({ org: { [eventClass]: false } }), eventType, "p1")).toBe(true);@@ -44,6 +44,15 @@ describe("isAuditLogEventEnabled", () => {expect(isAuditLogEventEnabled(off, EventType.UPDATE_AUDIT_LOG_SETTINGS)).toBe(true);});+ test("data access is always recorded, even with a row that says otherwise", () => {+ const off = settings({+ org: { [AuditLogEventClass.DataAccess]: false },+ projects: { p1: { [AuditLogEventClass.DataAccess]: false } }+ });+ expect(isAuditLogEventEnabled(off, EventType.GET_SECRETS)).toBe(true);+ expect(isAuditLogEventEnabled(off, EventType.GET_SECRETS, "p1")).toBe(true);+ });+test("records everything when the lookup failed", () => {expect(isAuditLogEventEnabled(null, EventType.PERMISSION_DENIED)).toBe(true);});@@ -147,7 +156,6 @@ describe("getEffectiveSettings", () => {});const fullEventClasses = [- { eventClass: AuditLogEventClass.DataAccess, isEnabled: false },{ eventClass: AuditLogEventClass.Authentication, isEnabled: true },{ eventClass: AuditLogEventClass.Authorization, isEnabled: false }];@@ -174,18 +182,20 @@ describe("updateOrgSettings", () => {expect(result.eventClasses).toHaveLength(4);});- test.each([false, true])("refuses any management entry (isEnabled=%s)", async (isEnabled) => {+ test.each([+ [AuditLogEventClass.Management, false],+ [AuditLogEventClass.Management, true],+ [AuditLogEventClass.DataAccess, false],+ [AuditLogEventClass.DataAccess, true]+ ])("refuses any %s entry (isEnabled=%s)", async (eventClass, isEnabled) => {const { service, auditLogSettingsDAL } = createHarness();await expect(service.updateOrgSettings({actor: orgActor,- eventClasses: [- { eventClass: AuditLogEventClass.DataAccess, isEnabled: false },- { eventClass: AuditLogEventClass.Management, isEnabled }- ]+ eventClasses: [...fullEventClasses, { eventClass, isEnabled }]})- ).rejects.toThrow("Management events are always recorded and cannot be changed");+ ).rejects.toThrow(`Event class '${eventClass}' is always recorded and cannot be changed`);expect(auditLogSettingsDAL.transaction).not.toHaveBeenCalled();});@@ -195,9 +205,9 @@ describe("updateOrgSettings", () => {await expect(service.updateOrgSettings({actor: orgActor,- eventClasses: [{ eventClass: AuditLogEventClass.DataAccess, isEnabled: false }]+ eventClasses: [{ eventClass: AuditLogEventClass.Authentication, isEnabled: false }]})- ).rejects.toThrow("Every event class except management must be included. Missing: authentication, authorization");+ ).rejects.toThrow("Every event class except management and data-access must be included. Missing: authorization");expect(auditLogSettingsDAL.transaction).not.toHaveBeenCalled();});@@ -208,13 +218,12 @@ describe("updateOrgSettings", () => {service.updateOrgSettings({actor: orgActor,eventClasses: [- { eventClass: AuditLogEventClass.DataAccess, isEnabled: false },- { eventClass: AuditLogEventClass.DataAccess, isEnabled: true },+ { eventClass: AuditLogEventClass.Authentication, isEnabled: false },{ eventClass: AuditLogEventClass.Authentication, isEnabled: true },{ eventClass: AuditLogEventClass.Authorization, isEnabled: false }]})- ).rejects.toThrow("Event class 'data-access' appears more than once");+ ).rejects.toThrow("Event class 'authentication' appears more than once");expect(auditLogSettingsDAL.transaction).not.toHaveBeenCalled();});@@ -225,7 +234,6 @@ describe("updateOrgSettings", () => {service.updateOrgSettings({actor: orgActor,eventClasses: [- { eventClass: AuditLogEventClass.DataAccess, isEnabled: true },{ eventClass: AuditLogEventClass.Authentication, isEnabled: true },{ eventClass: AuditLogEventClass.Authorization, isEnabled: true }]@@ -239,11 +247,7 @@ describe("updateOrgSettings", () => {const result = await service.updateOrgSettings({actor: orgActor,- eventClasses: [- { eventClass: AuditLogEventClass.DataAccess, isEnabled: false },- { eventClass: AuditLogEventClass.Authentication, isEnabled: true },- { eventClass: AuditLogEventClass.Authorization, isEnabled: false }- ]+ eventClasses: fullEventClasses});expect(auditLogSettingsDAL.transaction).toHaveBeenCalledTimes(1);@@ -253,8 +257,8 @@ describe("updateOrgSettings", () => {test("replaces the scope's rows and answers from the request, without re-reading", async () => {const { service, auditLogSettingsDAL, keyStore } = createHarness({rows: [- { orgId: "org-1", projectId: null, eventClass: "authentication", isEnabled: false },- { orgId: "org-1", projectId: "p1", eventClass: "data-access", isEnabled: false }+ { orgId: "org-1", projectId: null, eventClass: "authentication", isEnabled: true },+ { orgId: "org-1", projectId: "p1", eventClass: "authentication", isEnabled: false }]});@@ -262,8 +266,7 @@ describe("updateOrgSettings", () => {actor: orgActor,eventClasses: [{ eventClass: AuditLogEventClass.Authorization, isEnabled: true },- { eventClass: AuditLogEventClass.DataAccess, isEnabled: false },- { eventClass: AuditLogEventClass.Authentication, isEnabled: true }+ { eventClass: AuditLogEventClass.Authentication, isEnabled: false }]});@@ -271,8 +274,7 @@ describe("updateOrgSettings", () => {expect(auditLogSettingsDAL.delete).toHaveBeenCalledWith({ orgId: "org-1", projectId: null }, expect.anything());expect(auditLogSettingsDAL.insertMany).toHaveBeenCalledWith([- { orgId: "org-1", projectId: null, eventClass: "data-access", isEnabled: false },- { orgId: "org-1", projectId: null, eventClass: "authentication", isEnabled: true },+ { orgId: "org-1", projectId: null, eventClass: "authentication", isEnabled: false },{ orgId: "org-1", projectId: null, eventClass: "authorization", isEnabled: true }],expect.anything()@@ -282,8 +284,8 @@ describe("updateOrgSettings", () => {shouldUseNewPrivilegeSystem: true,eventClasses: [{ eventClass: AuditLogEventClass.Management, isEnabled: true },- { eventClass: AuditLogEventClass.DataAccess, isEnabled: false },- { eventClass: AuditLogEventClass.Authentication, isEnabled: true },+ { eventClass: AuditLogEventClass.DataAccess, isEnabled: true },+ { eventClass: AuditLogEventClass.Authentication, isEnabled: false },{ eventClass: AuditLogEventClass.Authorization, isEnabled: true }]});diff --git a/backend/src/ee/services/audit-log/audit-log-settings-service.ts b/backend/src/ee/services/audit-log/audit-log-settings-service.tsindex a5bbc97752..7572922358 100644--- a/backend/src/ee/services/audit-log/audit-log-settings-service.ts+++ b/backend/src/ee/services/audit-log/audit-log-settings-service.ts@@ -23,6 +23,7 @@ import {AuditLogEventClass,CONFIGURABLE_AUDIT_LOG_EVENT_CLASSES,getAuditLogEventClass,+ isAlwaysRecordedEventClass,TConfigurableAuditLogEventClass} from "./audit-log-event-classes";import { TAuditLogSettingsDALFactory } from "./audit-log-settings-dal";@@ -57,7 +58,7 @@ export const isAuditLogEventEnabled = (projectId?: string | null) => {const eventClass = getAuditLogEventClass(eventType);- if (eventClass === AuditLogEventClass.Management) return true;+ if (isAlwaysRecordedEventClass(eventClass)) return true;if (!settings) return true;const scope = projectId ? settings.projects[projectId] : settings.org;return scope?.[eventClass] ?? AUDIT_LOG_EVENT_CLASS_DEFAULTS[eventClass];@@ -74,16 +75,18 @@ const toOverrides = (rows: TScopeRow[]): TAuditLogEventClassOverrides =>const toSettings = (overrides: TAuditLogEventClassOverrides): TAuditLogEventClassSetting[] =>AUDIT_LOG_EVENT_CLASSES.map((eventClass) => ({eventClass,- isEnabled:- eventClass === AuditLogEventClass.Management- ? true- : (overrides[eventClass] ?? AUDIT_LOG_EVENT_CLASS_DEFAULTS[eventClass])+ isEnabled: isAlwaysRecordedEventClass(eventClass)+ ? true+ : (overrides[eventClass] ?? AUDIT_LOG_EVENT_CLASS_DEFAULTS[eventClass])}));// Updates are full replacements, so every configurable class has to be sent exactly once.const toFullOverrides = (eventClasses: TAuditLogEventClassSetting[]): TFullOverrides => {- if (eventClasses.some((el) => el.eventClass === AuditLogEventClass.Management)) {- throw new BadRequestError({ message: "Management events are always recorded and cannot be changed" });+ const alwaysRecorded = eventClasses.find((el) => isAlwaysRecordedEventClass(el.eventClass));+ if (alwaysRecorded) {+ throw new BadRequestError({+ message: `Event class '${alwaysRecorded.eventClass}' is always recorded and cannot be changed`+ });}const seen = new Set<AuditLogEventClass>();eventClasses.forEach((el) => {@@ -95,7 +98,7 @@ const toFullOverrides = (eventClasses: TAuditLogEventClassSetting[]): TFullOverrconst missing = CONFIGURABLE_AUDIT_LOG_EVENT_CLASSES.filter((eventClass) => !seen.has(eventClass));if (missing.length) {throw new BadRequestError({- message: `Every event class except management must be included. Missing: ${missing.join(", ")}`+ message: `Every event class except management and data-access must be included. Missing: ${missing.join(", ")}`});}return Object.fromEntries(eventClasses.map((el) => [el.eventClass, el.isEnabled])) as TFullOverrides;diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex 44fabf2bd3..e640175281 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -2086,7 +2086,7 @@ export const AUDIT_LOG_SETTINGS = {shouldUseNewPrivilegeSystem:"Whether the organization is on the new privilege system. Permission denials (the authorization class) are only recorded on the new privilege system.",eventClasses:- "Every event class except management, each exactly once. The request replaces the current settings. Management events are always recorded, so a request that includes the management class is rejected. The authorization class can only be turned on for organizations on the new privilege system; otherwise the request is rejected.",+ "Every event class except management and data-access, each exactly once. The request replaces the current settings. Management and data-access events are always recorded, so a request that includes either class is rejected. The authorization class can only be turned on for organizations on the new privilege system; otherwise the request is rejected.",UPDATE_ORG: {isEnabled:"Whether to record events of this class for the organization. This only covers organization-level events; each project has its own setting."diff --git a/docs/documentation/platform/audit-logs.mdx b/docs/documentation/platform/audit-logs.mdxindex ef0ba53187..ad954de8a4 100644--- a/docs/documentation/platform/audit-logs.mdx+++ b/docs/documentation/platform/audit-logs.mdx@@ -227,12 +227,12 @@ Each log contains the following fields:## Event classes-Every event type belongs to exactly one of four classes. The class tells you what kind of activity an event records, and it's also the unit you turn recording on or off for, so you can keep every configuration change and login while dropping the high-volume read events that make up most of the log.+Every event type belongs to exactly one of four classes. The class tells you what kind of activity an event records. You can also turn recording on or off for the `authentication` and `authorization` classes.| Class | What it covers | Default || ---------------- | -------------------------------------------------------------------------------------------------------------------------- | ------- || `management` | Creates, updates, deletes, membership, roles, policies, background jobs, and the start and end of privileged sessions | Always on |-| `data-access` | Reads and lists, plus the crypto operations that return or operate on secret material, such as KMS encrypt and decrypt | On |+| `data-access` | Reads and lists, plus the crypto operations that return or operate on secret material, such as KMS encrypt and decrypt | Always on || `authentication` | Logins, failed logins, organization selection, machine identity authentication, and Gateway and Relay connections | On || `authorization` | [Permission denials](#permission-denials) | Off |@@ -240,7 +240,7 @@ A class follows the operation that was attempted, not its outcome, so a failed l### Choose which classes to record-By default, Infisical records every class except `authorization`. The `management` class is always recorded and can't be turned off, so every configuration change stays in the log, including changes to these settings. Each organization, sub-organization, and project has its own settings, and they don't inherit from each other. The organization settings cover organization-level events such as membership and login changes. A project's settings cover that project's events, so turning a class off for the organization doesn't turn it off for its projects.+By default, Infisical records every class except `authorization`. The `management` and `data-access` classes are always recorded and can't be turned off, so every configuration change and every read of secret material stays in the log, including changes to these settings. Each organization, sub-organization, and project has its own settings, and they don't inherit from each other. The organization settings cover organization-level events such as membership and login changes. A project's settings cover that project's events, so turning a class off for the organization doesn't turn it off for its projects.<Tabs><Tab title="For an organization">@@ -268,7 +268,7 @@ By default, Infisical records every class except `authorization`. The `managemenOnly project admins can change these toggles. A project that has never saved a setting uses the defaults. The section appears in the settings of Secret Manager, KMS, and Secret Scanning projects. For other project types, use the API.</Tab><Tab title="API">- Update the organization's classes with [the organization audit log settings endpoint](/api-reference/endpoints/audit-logs/update-organization-audit-log-settings), or one project's classes with [the project audit log settings endpoint](/api-reference/endpoints/audit-logs/update-project-audit-log-settings). The request replaces the current settings, so include every class except `management`.+ Update the organization's classes with [the organization audit log settings endpoint](/api-reference/endpoints/audit-logs/update-organization-audit-log-settings), or one project's classes with [the project audit log settings endpoint](/api-reference/endpoints/audit-logs/update-project-audit-log-settings). The request replaces the current settings, so include every class except `management` and `data-access`.```bashcurl -X PUT "https://app.infisical.com/api/v1/organization/audit-log-settings" \@@ -276,7 +276,6 @@ By default, Infisical records every class except `authorization`. The `managemen-H "Content-Type: application/json" \-d '{"eventClasses": [- {"eventClass": "data-access", "isEnabled": false},{"eventClass": "authentication", "isEnabled": true},{"eventClass": "authorization", "isEnabled": false}]@@ -288,10 +287,6 @@ By default, Infisical records every class except `authorization`. The `managemenA change applies to new events within a minute. Events that were already recorded stay in the log until their retention period ends.-<Note>- Secret Insights are counted from `data-access` events, so they stay flat for any project where the class is off.-</Note>-Every change to these settings is itself recorded as an `update-audit-log-settings` event in the `management` class, with the classes that changed in `event.metadata`.### Permission denialsdiff --git a/frontend/src/components/auditLogSettings/AuditLogEventClassRow.tsx b/frontend/src/components/auditLogSettings/AuditLogEventClassRow.tsxindex f56f8b87ae..610de923c0 100644--- a/frontend/src/components/auditLogSettings/AuditLogEventClassRow.tsx+++ b/frontend/src/components/auditLogSettings/AuditLogEventClassRow.tsx@@ -1,9 +1,6 @@import { ReactNode } from "react";-import { TriangleAlert } from "lucide-react";import {- Alert,- AlertDescription,Field,FieldContent,FieldDescription,@@ -28,7 +25,6 @@ type Props = {isDisabled?: boolean;onCheckedChange?: (isEnabled: boolean) => void;descriptionExtra?: ReactNode;- warning?: ReactNode;};export const AuditLogEventClassRow = ({@@ -38,8 +34,7 @@ export const AuditLogEventClassRow = ({lockedReason,isDisabled,onCheckedChange,- descriptionExtra,- warning+ descriptionExtra}: Props) => {const id = `audit-log-event-class-${eventClass}`;@@ -66,12 +61,6 @@ export const AuditLogEventClassRow = ({{descriptionExtra && (<FieldDescription className="max-w-2xl">{descriptionExtra}</FieldDescription>)}- {warning && (- <Alert variant="warning" className="mt-2 max-w-2xl">- <TriangleAlert />- <AlertDescription>{warning}</AlertDescription>- </Alert>- )}</FieldContent><div className="shrink-0">{lockedReason ? (diff --git a/frontend/src/components/auditLogSettings/AuditLogEventClassesForm.tsx b/frontend/src/components/auditLogSettings/AuditLogEventClassesForm.tsxindex 7a7f921046..f4bbc87970 100644--- a/frontend/src/components/auditLogSettings/AuditLogEventClassesForm.tsx+++ b/frontend/src/components/auditLogSettings/AuditLogEventClassesForm.tsx@@ -14,8 +14,10 @@ import {} from "@app/components/v3";import { useOrganization } from "@app/context";import {+ ALWAYS_RECORDED_AUDIT_LOG_EVENT_CLASSES,AUDIT_LOG_EVENT_CLASS_DEFAULTS,AUDIT_LOG_EVENT_CLASSES,+ auditLogEventClassToNameMap,CONFIGURABLE_AUDIT_LOG_EVENT_CLASSES} from "@app/hooks/api/auditLogSettings/constants";import {@@ -30,7 +32,6 @@ import { AuditLogEventClassRow } from "./AuditLogEventClassRow";type TForm = Record<AuditLogEventClass, boolean>;const REQUIRES_NEW_PRIVILEGE_SYSTEM = "Requires the new privilege system";-const ALWAYS_RECORDED = "Management events are always recorded";type Props = {title: string;@@ -112,11 +113,12 @@ export const AuditLogEventClassesForm = ({) : (<div className="divide-y divide-border">{AUDIT_LOG_EVENT_CLASSES.map((eventClass) => {- const isManagement = eventClass === AuditLogEventClass.Management;+ const isAlwaysRecorded = ALWAYS_RECORDED_AUDIT_LOG_EVENT_CLASSES.includes(eventClass);const isAuthorization = eventClass === AuditLogEventClass.Authorization;const isLocked = isAuthorization && !shouldUseNewPrivilegeSystem;let lockedReason: string | undefined;- if (isManagement) lockedReason = ALWAYS_RECORDED;+ if (isAlwaysRecorded)+ lockedReason = `${auditLogEventClassToNameMap[eventClass]} events are always recorded`;else if (isLocked) lockedReason = REQUIRES_NEW_PRIVILEGE_SYSTEM;return (<Controller@@ -126,16 +128,11 @@ export const AuditLogEventClassesForm = ({render={({ field }) => (<AuditLogEventClassRoweventClass={eventClass}- isEnabled={isManagement || (!isLocked && field.value)}+ isEnabled={isAlwaysRecorded || (!isLocked && field.value)}variant={variant}isDisabled={!canEdit}lockedReason={lockedReason}onCheckedChange={field.onChange}- warning={- eventClass === AuditLogEventClass.DataAccess && !field.value- ? "Secret Insights are counted from these events and stay flat while this is off."- : undefined- }descriptionExtra={isLocked ? (<>diff --git a/frontend/src/hooks/api/auditLogSettings/constants.tsx b/frontend/src/hooks/api/auditLogSettings/constants.tsxindex c46cd466f8..30c1559f4b 100644--- a/frontend/src/hooks/api/auditLogSettings/constants.tsx+++ b/frontend/src/hooks/api/auditLogSettings/constants.tsx@@ -34,9 +34,13 @@ export const AUDIT_LOG_EVENT_CLASSES = [AuditLogEventClass.Authorization] as const;+export const ALWAYS_RECORDED_AUDIT_LOG_EVENT_CLASSES: readonly AuditLogEventClass[] = [+ AuditLogEventClass.Management,+ AuditLogEventClass.DataAccess+];+// Updates are full replacements, so send all of these.export const CONFIGURABLE_AUDIT_LOG_EVENT_CLASSES = [- AuditLogEventClass.DataAccess,AuditLogEventClass.Authentication,AuditLogEventClass.Authorization] as const;