Skip to content

feat: webhook auto-generates NetworkPolicy when injecting proxy sidecar #1941

Closed as not planned

Description

@mrsabath

Feature Description

Extend the AuthBridge injection webhook to auto-generate the bypass-prevention NetworkPolicy whenever it injects a proxy sidecar — so enforcement is automatic and operators don't have to hand-author per-workload policies. The companion to the NetworkPolicy itself (sibling issue under epic #1429).

Scope

  • When the webhook injects a proxy sidecar, it also creates/updates the corresponding NetworkPolicy (deny direct agent egress; allow proxy-sidecar egress)
  • Policy is scoped to the injected workload (correct pod selector / labels)
  • Lifecycle: policy is removed/updated when injection is removed or the workload is deleted
  • Respect the injection label model (opt-out semantics) so workloads that disable injection don't get a policy

Acceptance criteria

  • Injecting a proxy sidecar via the webhook produces the matching NetworkPolicy automatically
  • The generated policy targets only the injected workload
  • Removing injection / deleting the workload cleans up the generated policy
  • No policy is generated for workloads that opted out of injection

Related work


Epic: #1429 — Replace iptables Traffic Interception with Enforceable Proxy Routing
Section: Enforcement

Activity

  1. added
    enhancement
    Identity
    on Jun 12, 2026
  2. github-actions commented on Aug 24, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this issue is still relevant, please comment or remove the stale label.

  3. github-actions commented on Sep 8, 2026

    @github-actions

    This issue was closed because it has been stale for 14 days with no activity. Feel free to reopen if this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Identityenhancementstale

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions