Skip to content

feat(authz): RBAC local authorization with audit mode - #476

Merged
bpalermo merged 1 commit into
mainfrom
feat/rbac-local-authz
Jul 5, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/rbac-local-authz

Conversation

@bpalermo

@bpalermo bpalermo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

In-process allow/deny by verified SPIFFE identity + path/method — no sidecar, no RPC, no failure mode. RBACPerRoute carries complete rules, so this rides the 025 rails with an empty no-op chain entry (zero chart/agent changes). Audit mode: same policies render into shadow_rules (counted in Prometheus via aether_audit_ stats, never enforced) — dry-run then flip one field. namespace: sugar → trust-domain-agnostic SPIFFE prefix regex. All scopes incl. SCOPE_INBOUND (peer-SAN at the destination). Stock-Envoy-validated.

…car)

Local (in-process) allow/deny — the "80% case" companion to 027's ext_authz:
no sidecar, no per-request RPC, no failure mode (policy is config). Rides the
025 rails entirely: RBACPerRoute carries COMPLETE rules (unlike ExtAuthzPerRoute),
so the chain entry is just an empty no-op RBAC{} DefaultConfig — zero chart/agent/
bootstrap changes.

- HTTPFilterSpec.rbac (typed-only): mode ENFORCE|AUDIT, action ALLOW|DENY,
  policies[{name, principals[{spiffeId | namespace}], permissions[{pathPrefix |
  method}]}]. namespace is aether sugar → trust-domain-agnostic principal regex
  ^spiffe://[^/]+/ns/<ns>/sa/.+ (verified peer SAN). Empty permissions = any.
- mode AUDIT renders the SAME policies into shadow_rules (stat prefix
  aether_audit_): evaluated + counted (rbac.shadow_allowed/denied stats → the
  proxy sink → Prometheus), never enforced. Dry-run on live traffic, flip one
  field to ENFORCE — identical rules by construction.
- Scopes: ExtensionRef / targetRefs / CHAIN (egress; principals can also match
  aether.source metadata later) and SCOPE_INBOUND (the star: verified mTLS peer
  SAN at the destination pod). rbac needs no sidecar → not gated on authzSidecar.
- Webhook: policy/principal/permission structural matrix (exactly-one-of fields,
  ≥1 principal per policy).
- envoy --mode validate: audit-mode RBACPerRoute (namespace-sugar regex) accepted
  by stock Envoy alongside the empty chain entry.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant