protoc-gen-servora-audit

command
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Command protoc-gen-servora-audit translates servora audit proto annotations into a Go file (`audit_rules.gen.go`) that exports a map of audit.CompiledRule entries consumed by the audit middleware at runtime.

Merge semantics (matches authn / authz):

  • method-level rule with mode != AUDIT_MODE_UNSPECIFIED replaces the service-level default in its entirety,
  • method-level rule absent (or mode == AUDIT_MODE_UNSPECIFIED) inherits the service-level default,
  • only methods whose merged mode is AUDIT_MODE_ENABLED reach the generated output; AUDIT_MODE_DISABLED and methods with no resolved rule are skipped.

Generated output per proto package:

func AuditRules() map[string]*audit.CompiledRule { ... }

Each CompiledRule includes Mode, EventType, Severity and a BuildEvent func that constructs a CloudEvents event from request/response payloads.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL