Skip to content

feat: propose private origin TLS and customer workflow - #450

Draft
Ramkumar Chinchani (rchincha) wants to merge 4 commits into
Azure:mainfrom
rchincha:rchinchani/https-origins-proposal
Draft

Ramkumar Chinchani (rchincha) wants to merge 4 commits into
Azure:mainfrom
rchincha:rchinchani/https-origins-proposal

Conversation

@rchincha

@rchincha Ramkumar Chinchani (rchincha) commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

What this PR does / why we need it:

Implements TLS/HTTPS support as followup to PR #400 - GEP-1748 using Azure AFD as the L7 ingress to achieve Zero-Public-Exposure Ingress solution for highly regulated customer environments.

Which issue(s) this PR fixes:

Fixes #

Requirements:

How has this code been tested

Special notes for your reviewer

@rchincha
Ramkumar Chinchani (rchincha) marked this pull request as draft November 16, 2026 23:12
@rchincha
Ramkumar Chinchani (rchincha) force-pushed the rchinchani/https-origins-proposal branch 2 times, most recently from 4242123 to 868e301 Compare November 17, 2026 04:59
@rchincha Ramkumar Chinchani (rchincha) changed the title feat(https): propose private origin TLS and customer workflow feat: propose private origin TLS and customer workflow Nov 17, 2026
@rchincha
Ramkumar Chinchani (rchincha) force-pushed the rchinchani/https-origins-proposal branch 2 times, most recently from ceb545b to 9cb1a22 Compare November 17, 2026 18:22
Publish the observed generated hostname in existing Gateway `status.addresses`;
the operator hands `https://<observed-hostname>/` to the customer through the
existing delivery channel. Do not add a URL field to ServiceExport/ServiceImport,
copy Gateway status to member MCS objects, or promise a stable hostname after

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if an unstable hostname is acceptable to users. Do we still need a stable custom domain name?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As first step, probably not. But for production, it may be important. If there is a AFD v2 or a different ingress path, a stable hostname protects against disruption. Will make a note of this.


| Field | Supported proposal |
|---|---|
| `targetRefs` | Customer: exactly one local core Service; generated hub policy: corresponding Fleet ServiceImport |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can a user creates a BackendTLSPolicy in a member cluster for non-fleet purpose? I wonder how to tell that a BackendTLSPolicy is meant for fleet-networking not for Istio for example

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

The hub policy is generated automatically. Customers author the member policy; we’re adding an explicit  networking.fleet.azure.com/export-to-fleet: "true" opt-in so Fleet won’t implicitly export policies intended for other implementations. This controls Fleet export, not exclusive ownership; shared-Service policy precedence still applies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, is there a valid design where BackendTLSPolicy is only needed on the hub but not on the members? So members don't need Gateway API installed and we can use latest Gateway API version on hub because hub gets upgraded regularly.

Frontend Gateway certificate configuration is a separate TLS boundary covered
above; it never reuses or replaces the member serving Secret.

Within each member, select policies using the pinned Gateway API precedence

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking just restricting to one policy per service. What would be a good use case for keeping multiple policies for the same service and all but one is taking effect?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Multiple policies primarily need conflict resolution, not simultaneous functionality. For this initial subset, we can require exactly one applicable policy per Service, explicitly opted into Fleet export, and reject ambiguous configurations with clear diagnostics while leaving other implementations’ policies untouched.

backend, require current valid intent with the same hostname/trust/selected
port from every otherwise participating exported member. This is separate
from existing MCS port/membership aggregation. Missing, invalid, unreadable,
stale or conflicting intent blocks/withdraws the affected AFD route; do not

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a member fails to update hub InternalServiceExport for a while, the AFD route would be suspended. Then some temporary net member controller downtime would cause a service outage? I am thinking if it is better to leave the AFD route configured

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed—updated the proposal to require exactly one applicable policy per Service for Fleet TLS. Multiple policies now block eligibility with clear diagnostics rather than selecting a winner. This is a Fleet-specific restriction; other implementations’ policies remain untouched.

deployment during migration; zero-downtime migration is not promised.
Deliver the HTTPS URL through the platform handoff and require clients to
switch explicitly; no automatic HTTP redirect or fallback is introduced.
- On known invalid/missing required policy, withdraw the affected owned route

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One member's configuration failure could case the route to be withdrawn, causing a global failure. Not certain if this is a desirable behavior.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed—the failure scope should match the configuration scope. A member-local error should exclude that origin while valid members continue serving. Route withdrawal should be reserved for no eligible origins, ambiguous shared TLS intent, or inability to safely isolate the affected origin. We should make the degraded state explicit in diagnostics.

@rchincha
Ramkumar Chinchani (rchincha) force-pushed the rchinchani/https-origins-proposal branch 3 times, most recently from 449b3b2 to 0ebc655 Compare November 18, 2026 03:30
Document HTTPS on both AFD connections, member-driven backend TLS policies with controller-owned hub projection, platform-authorized routing, unchanged public MCS schemas, and first-party certificate fixture preparation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0fbf921e-67fe-4fb3-b6ed-628abda8834c
Transport fresh opted-in member TLS intent, maintain owned hub policies, and enforce HTTPS on both AFD hops with member-local isolation and fail-closed withdrawal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0fbf921e-67fe-4fb3-b6ed-628abda8834c
Add default-off manager and Helm switches, uncached startup prerequisites, scoped policy RBAC, internal schema generation, and complete member-package builds. Gate HTTPS fixture installation separately from HTTP.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0fbf921e-67fe-4fb3-b6ed-628abda8834c
@rchincha
Ramkumar Chinchani (rchincha) force-pushed the rchinchani/https-origins-proposal branch from a221354 to 8ef883f Compare November 23, 2026 21:17
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.76565% with 182 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.30%. Comparing base (58e51b6) to head (0f19e11).

Files with missing lines Patch % Lines
pkg/controllers/hub/gateway/origintls.go 65.13% 28 Missing and 25 partials ⚠️
pkg/controllers/hub/gateway/staging.go 0.00% 16 Missing and 1 partial ⚠️
pkg/common/origintls/observation.go 66.66% 8 Missing and 6 partials ⚠️
pkg/controllers/hub/gatewaymodel/model.go 36.36% 11 Missing and 3 partials ⚠️
pkg/common/origintls/policy.go 0.00% 12 Missing ⚠️
pkg/controllers/hub/gatewayresolver/route.go 63.33% 7 Missing and 4 partials ⚠️
cmd/member-net-controller-manager/main.go 9.09% 10 Missing ⚠️
pkg/controllers/member/serviceexport/controller.go 61.90% 5 Missing and 3 partials ⚠️
cmd/member-net-controller-manager/origin_tls.go 85.00% 3 Missing and 3 partials ⚠️
pkg/controllers/hub/gatewayresolver/backend.go 93.81% 3 Missing and 3 partials ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   76.54%   76.30%   -0.24%     
==========================================
  Files          77       84       +7     
  Lines        7669     8314     +645     
==========================================
+ Hits         5870     6344     +474     
- Misses       1387     1503     +116     
- Partials      412      467      +55     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add member/resolver/provider regressions, API-server projection and revocation tests, chart/install checks, and an independently opted-in HTTPS traffic/probe fixture. Mount approved AKV certificate bundles directly in member application pods using CSI-native Workload Identity; validate identifiers and pod-local TLS without runner key handling or Secret sync. Document prerequisites, offline evidence and unrun live scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0fbf921e-67fe-4fb3-b6ed-628abda8834c
@rchincha
Ramkumar Chinchani (rchincha) force-pushed the rchinchani/https-origins-proposal branch from 8ef883f to 0f19e11 Compare November 23, 2026 21:55
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