Skip to main content

cmind/audit/audit.proto

Package: cmind.audit

Messages

MethodAudit

MethodAudit overrides what protoc-gen-cm-audit derives for a method. Every field is optional. Without the option a method is classified by its idempotency_level, then by its name prefix, and anything that still looks like a mutation is registered for auditing. Reads are left unregistered and so are only audited when they fail authorization.

FieldTypeNumberDescription
modeMethodAudit.Mode1
verbstring2verb overrides the derived verb: "create", "update", "delete", "invoke" or "read".
resourceTypestring3resource_type overrides the type derived from the service name (ModelAliasService -> model_alias).
resourceIdFieldstring4resource_id_field names the request field carrying the resource id. Set it when the id is not <resource_type>_id, "name" or "id".

MethodAudit.Mode

Mode forces the audit decision instead of deriving it.

ValueNumberDescription
MODE_UNSPECIFIED0Derive from idempotency_level, then the method name prefix.
MODE_ALWAYS1Audit even though the method reads. For reads that return data sensitive enough that access to it is itself worth recording.
MODE_NEVER2Never audit, even though the method mutates.