Skip to content

fix(025): outbound-path parity for extension filters - #470

Merged
bpalermo merged 1 commit into
mainfrom
fix/025-m4-outbound-parity
Jul 5, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/025-m4-outbound-parity

Conversation

@bpalermo

@bpalermo bpalermo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

M4 talos e2e pinned it: requests riding the OUTBOUND listener missed the chain filter — the escape hatch only existed on the capture path. (1) outbound vhosts now carry the vhost-level TPFC; (2) the outbound HCM gets the default-disabled extension union (the M1 'outbound parity' leftover); (3) per-pod HTTP listeners regenerate when the union changes. Seam tests cover the full snapshot path.

…M union + regen)

The M4 talos e2e (with the new INFO push-logs) pinned the real gap: requests riding
the OUTBOUND listener (mesh-port dial path) missed the service chain filter — GAMMA
rules apply on BOTH route tables, but the escape-hatch machinery only existed on the
capture path:

1. Outbound vhosts (clusterEntry) never carried the vhost-level
   typed_per_filter_config → the chain filter was silently inert on that path.
   Fix: decorate the default-port and per-port outbound vhosts with the effective
   (local ∪ imported) chain filter.
2. The outbound HCM never carried the default-disabled extension entries at all —
   the long-standing M1 "outbound HCM-union parity" leftover. TPFC can only
   re-enable a filter already in the chain. Fix: thread the shared union
   (cache.extensionHTTPFilters) through GenerateListenersFromRegistryPod /
   GenerateOutboundHTTPListener.
3. Listener staleness: the union is embedded in per-pod listeners, which only
   regenerated on pod/L4 events — a rule or chain-filter change never refreshed
   the chains. Fix: regenerateAllHTTPListeners (capture + outbound) on any
   route/chain-filter change, local or imported (mirrors the L4 regen pattern).

Seam tests: outbound vhost carries the TPFC + outbound HCM carries the
default-disabled entry through a full SetServiceChainFilters →
LoadClustersFromRegistry snapshot.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
@bpalermo
bpalermo merged commit 760fedd into main Jul 5, 2026
@bpalermo
bpalermo deleted the fix/025-m4-outbound-parity branch July 5, 2026 20:07
bpalermo added a commit that referenced this pull request Jul 5, 2026
…+ disabled entry) (#472)

External authorization via a node-local sidecar (proposal 027, #471). System-owned
transport; zero effect until an HTTPFilter opts a route in (M2).

- chart: proxy.authzSidecar.{enabled, timeout, failureMode, image, opa.{enabled,
  image, policy}} — all default off. When enabled: authz sidecar container in the
  aether-proxy DaemonSet (OPA preset via ConfigMap-mounted rego, or bring-your-own
  image), shared emptyDir UDS at /run/aether/authz/authz.sock, static
  `authz_sidecar` pipe cluster in the proxy bootstrap (always warm, never
  demand-scoped), agent flags. OPA preset requires a policy (helm fail otherwise).
- agent: --authz-sidecar{,-timeout,-failure-mode-allow} → cache.SetAuthzSidecar
  (boot-time) → extensionHTTPFilters() appends proxy.AuthzSidecarHTTPFilter — the
  FULL ext_authz transport config (envoy_grpc → authz_sidecar, timeout,
  transport_api_version V3, explicit failure mode) with `disabled: true`, emitted
  at the 025 extension anchor on the capture + outbound HCMs (the #470 parity
  threading). ExtAuthzPerRoute cannot carry transport, hence chain-entry-owned.
- envoy --mode validate: the node bootstrap fixture now carries the entry + the
  static UDS cluster — stock Envoy accepts the real shape.

aether chart 0.64.0. Next: M2 typed extAuthz authoring (per-route enablement +
context_extensions), M3 inbound enforcement, M4 talos e2e with the OPA preset.


Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S

Co-authored-by: Claude Opus 4.8 <[email protected]>
bpalermo added a commit that referenced this pull request Aug 1, 2026
Renumber 002 -> 034 (002 is taken by the merged agent-concurrency
audit) and revise every code reference after two months of drift:

- Ports post-030: inbound is 18008 (defaultInboundPort); the outbound
  listener is unchanged at 18081 (mesh.ProxyOutboundPort)
- Multi-port routing (005): delivery is app_<pod>_<port>, so the
  original "port is ignored for delivery" semantic is REVERSED —
  port(s) stay required for demux/EDS; the annotation only changes
  what the app cluster dials (one socket serves all declared ports)
- Redirect-all (022) + mesh DNS narrowed Phase 2's audience; keep it,
  priority lowered, re-evaluate after Phase 1
- E/W waypoint (019) and cleartext inbound (#421) confirmed covered
  for free (delivery sits behind the inbound listener)
- New facts folded in: UID already fetched but deliberately not
  persisted (resubscribe.go), storage is protojson in agent/storage,
  builder is exported GenerateOutboundHTTPListener with the 025/#470
  extension union (hoisted per-loop in #615), authz emptyDir socket
  (#499) documented as the intra-pod precedent (cross-pod still needs
  the kubelet hostPath), RESULT_IGNORED unmanaged pods, TCP
  connect-probe analogue on pipes
- New constraint: the kubelet-pods mount must not be readOnly
  (connect(2) on AF_UNIX needs write on the inode; EROFS otherwise)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR
bpalermo added a commit that referenced this pull request Aug 1, 2026
* docs: proposal 002 — UDS support for pods

Plan for letting pods serve on and dial the mesh via Unix domain sockets,
in two phases (inbound first). Pathname UDS is mount-namespace-scoped, so
the design bridges pod emptyDir volumes to the node proxy through kubelet's
pod-volumes directory; abstract sockets and workload hostPath mounts are
evaluated and rejected. Registry/EDS endpoints stay TCP :15008, so UDS pods
are indistinguishable from TCP pods to clients.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(034): re-ground the pod-UDS proposal in the current codebase

Renumber 002 -> 034 (002 is taken by the merged agent-concurrency
audit) and revise every code reference after two months of drift:

- Ports post-030: inbound is 18008 (defaultInboundPort); the outbound
  listener is unchanged at 18081 (mesh.ProxyOutboundPort)
- Multi-port routing (005): delivery is app_<pod>_<port>, so the
  original "port is ignored for delivery" semantic is REVERSED —
  port(s) stay required for demux/EDS; the annotation only changes
  what the app cluster dials (one socket serves all declared ports)
- Redirect-all (022) + mesh DNS narrowed Phase 2's audience; keep it,
  priority lowered, re-evaluate after Phase 1
- E/W waypoint (019) and cleartext inbound (#421) confirmed covered
  for free (delivery sits behind the inbound listener)
- New facts folded in: UID already fetched but deliberately not
  persisted (resubscribe.go), storage is protojson in agent/storage,
  builder is exported GenerateOutboundHTTPListener with the 025/#470
  extension union (hoisted per-loop in #615), authz emptyDir socket
  (#499) documented as the intra-pod precedent (cross-pod still needs
  the kubelet hostPath), RESULT_IGNORED unmanaged pods, TCP
  connect-probe analogue on pipes
- New constraint: the kubelet-pods mount must not be readOnly
  (connect(2) on AF_UNIX needs write on the inode; EROFS otherwise)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
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