Repository navigation
feat(authz): RBAC local authorization with audit mode - #476
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In-process allow/deny by verified SPIFFE identity + path/method — no sidecar, no RPC, no failure mode.
RBACPerRoutecarries complete rules, so this rides the 025 rails with an empty no-op chain entry (zero chart/agent changes). Audit mode: same policies render intoshadow_rules(counted in Prometheus viaaether_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.