Skip to content

feat(cli): add default outbound policy support - #15617

Open
gnarlex wants to merge 4 commits into
linkerd:mainfrom
gnarlex:alex/outbound-default-policy-validation
Open

feat(cli): add default outbound policy support#15617
gnarlex wants to merge 4 commits into
linkerd:mainfrom
gnarlex:alex/outbound-default-policy-validation

Conversation

@gnarlex

@gnarlex gnarlex commented Aug 28, 2026

Copy link
Copy Markdown

Add the control-plane surface for the proxy's outbound default policy (LINKERD2_PROXY_OUTBOUND_DEFAULT_POLICY), mirroring the existing inbound default policy: the proxy.defaultOutboundPolicy Helm value, the --default-outbound-policy CLI flag, and the
config.linkerd.io/default-outbound-policy pod annotation, all injected onto proxy containers via the shared proxy partial. Control-plane components (destination, identity, proxy-injector) pin the value to all-unauthenticated so a restrictive global default cannot lock out the control plane.

The proxy implements the outbound default policy as an mTLS requirement enforced at connect time on resolved endpoints, and only supports a three-value subset of the inbound vocabulary:

  • all-unauthenticated (default): permit cleartext to unmeshed targets; byte-for-byte unchanged from today's behavior.
  • all-authenticated: require a mesh identity (mTLS) for every outbound endpoint.
  • cluster-authenticated: require a mesh identity only for endpoints within clusterNetworks.

Validation for the --default-outbound-policy flag and the config.linkerd.io/default-outbound-policy annotation is therefore narrowed to that subset; deny, cluster-unauthenticated and audit remain inbound-only. The Helm values documentation is updated to match. Inbound policy validation is unchanged.

Enforcement of all-authenticated/cluster-authenticated across multiple control planes additionally requires relaxing the destination controller's identity-advertisement gate; that is deliberately left as a follow-up.

Relates to #15615 and linkerd/linkerd2-proxy#4617.

@gnarlex
gnarlex force-pushed the alex/outbound-default-policy-validation branch from 0877db6 to 34a9f6e Compare August 28, 2026 15:25
Add the control-plane surface for the proxy's outbound default policy
(`LINKERD2_PROXY_OUTBOUND_DEFAULT_POLICY`), mirroring the existing inbound
default policy: the `proxy.defaultOutboundPolicy` Helm value, the
`--default-outbound-policy` CLI flag, and the
`config.linkerd.io/default-outbound-policy` pod annotation, all injected
onto proxy containers via the shared proxy partial. Control-plane
components (destination, identity, proxy-injector) pin the value to
`all-unauthenticated` so a restrictive global default cannot lock out the
control plane.

The proxy implements the outbound default policy as an mTLS requirement
enforced at connect time on resolved endpoints, and only supports a
three-value subset of the inbound vocabulary:

- `all-unauthenticated` (default): permit cleartext to unmeshed targets;
  byte-for-byte unchanged from today's behavior.
- `all-authenticated`: require a mesh identity (mTLS) for every outbound
  endpoint.
- `cluster-authenticated`: require a mesh identity only for endpoints
  within clusterNetworks.

Validation for the `--default-outbound-policy` flag and the
`config.linkerd.io/default-outbound-policy` annotation is therefore
narrowed to that subset; `deny`, `cluster-unauthenticated` and `audit`
remain inbound-only. The Helm values documentation is updated to match.
Inbound policy validation is unchanged.

Enforcement of `all-authenticated`/`cluster-authenticated` across
multiple control planes additionally requires relaxing the destination
controller's identity-advertisement gate; that is deliberately left as a
follow-up.

Relates to linkerd#15615
Relates to linkerd/linkerd2-proxy#4617

Signed-off-by: Alexander Klein <hello@gnarlex.com>
@gnarlex
gnarlex force-pushed the alex/outbound-default-policy-validation branch from 34a9f6e to 39925e4 Compare August 28, 2026 15:31
Comment thread cli/cmd/inject.go
Comment thread cli/cmd/install_test.go Outdated
Comment thread cli/cmd/options.go Outdated
@gnarlex
gnarlex marked this pull request as ready for review August 31, 2026 13:39
@gnarlex
gnarlex requested a review from a team as a code owner August 31, 2026 13:39
Signed-off-by: Alexander Klein <hello@gnarlex.com>
Signed-off-by: Alexander Klein <hello@gnarlex.com>
@gnarlex
gnarlex force-pushed the alex/outbound-default-policy-validation branch from 4306fa4 to 87e037d Compare August 31, 2026 15:41
Comment thread cli/cmd/options.go Outdated
Comment thread cli/cmd/options.go Outdated
Signed-off-by: Alexander Klein <hello@gnarlex.com>
@gnarlex
gnarlex force-pushed the alex/outbound-default-policy-validation branch from 01d3dcb to da20a53 Compare September 1, 2026 07:27
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.

2 participants