Skip to content

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

Merge pull request #5783 from Infisical/daniel/secrets-policy-enforcement

varonix73536e6e6cf4
diff --cc backend/src/ee/services/audit-log/audit-log-types.ts
index a2e5310b83,b03552bbb2..542e780a21
--- a/backend/src/ee/services/audit-log/audit-log-types.ts
+++ b/backend/src/ee/services/audit-log/audit-log-types.ts
@@@ -696,23 -696,14 +696,28 @@@ export enum EventType
GET_PKI_SIGNERS = "get-pki-signers",
GET_PKI_SIGNER_PUBLIC_KEY = "get-pki-signer-public-key",
GET_PKI_SIGNING_OPERATIONS = "get-pki-signing-operations",
- PKI_SIGNER_SIGN = "pki-signer-sign"
+ PKI_SIGNER_SIGN = "pki-signer-sign",
+
+ // Secret Validation Rules
+ SECRET_VALIDATION_RULE_CREATE = "secret-validation-rule-create",
+ SECRET_VALIDATION_RULE_UPDATE = "secret-validation-rule-update",
+ SECRET_VALIDATION_RULE_DELETE = "secret-validation-rule-delete"
}
+// Maps each actor type to the JSONB key that holds the actor's primary ID in actorMetadata.
+// Derived from the *ActorMetadata interfaces below. Note that ACME_PROFILE and EST_ACCOUNT
+// both use "profileId" as their identifying key — this is intentional and matches their
+// respective metadata schemas (AcmeProfileActorMetadata, EstAccountActorMetadata).
+export const ACTOR_TYPE_TO_METADATA_ID_KEY: Partial<Record<ActorType, string>> = {
+ [ActorType.USER]: "userId",
+ [ActorType.IDENTITY]: "identityId",
+ [ActorType.KMIP_CLIENT]: "clientId",
+ [ActorType.SERVICE]: "serviceId",
+ [ActorType.ACME_PROFILE]: "profileId",
+ [ActorType.ACME_ACCOUNT]: "accountId",
+ [ActorType.EST_ACCOUNT]: "profileId"
+};
+
export const filterableSecretEvents: EventType[] = [
EventType.GET_SECRET,
EventType.DELETE_SECRETS,