protoc-gen-servora-authz

command
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Command protoc-gen-servora-authz translates servora authz proto annotations into a Go file (`authz_rules.gen.go`) consumed by the runtime to enforce authorization on RPC methods.

Merge semantics (matches authn / audit):

  • method-level rule with mode != AUTHZ_MODE_UNSPECIFIED replaces the service-level default in its entirety,
  • method-level rule absent (or mode == AUTHZ_MODE_UNSPECIFIED) inherits the service-level default,
  • only methods whose merged mode != AUTHZ_MODE_UNSPECIFIED appear in the generated map (NONE is preserved so callers can express "explicitly skip" rather than "no rule"; the runtime decides what to do with NONE).

Cross-file template scanning: rules are gathered from ALL input files (including non-generated dependencies) so authz annotations on canonical RPC protos remain visible when only their HTTP-gateway counterparts are in the generation set. Generated output groups by output directory so each directory yields one authz_rules.gen.go covering the services declared in it (resolved through the cross-file template index).

Jump to

Keyboard shortcuts

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