Skip to content

Serve whisker over HTTPS - #5140

Merged
vara2504 merged 2 commits into
tigera:masterfrom
vara2504:vara-whisker-https
Aug 6, 2026
Merged

vara2504 merged 2 commits into
tigera:masterfrom
vara2504:vara-whisker-https

Conversation

@vara2504

@vara2504 vara2504 commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Feature: whisker's UI and backend are now served over HTTPS.

  • New whisker-key-pair certificate for nginx; both nginx configs
    serve TLS on 8443 (TLS 1.2/1.3 only) and proxy /whisker-backend/
    to the backend over https.
  • The whisker service moves from 8081 to 8443. UI access is via
    kubectl port-forward at https://localhost:8443 (self-signed CA).
    No NetworkPolicy changes: port-forward enters through the pod's
    loopback and is not subject to policy. The gateway-scoped ingress
    rule ships with the spec.gateway (PMREQ-821) slice.
  • whisker-backend gets SERVER_TLS_CERT_PATH / SERVER_TLS_KEY_PATH
    env vars (from the existing backend key pair). With
    Add server TLS support to whisker-backendΒ projectcalico/calico#13436 the backend is HTTPS-only and these vars
    are required.
  • The pod template carries hash annotations for both key pairs, so
    cert rotation restarts nginx and the backend.

Companion: projectcalico/calico#13436 (backend HTTPS-only + e2e).

Merge order: this operator PR merges first, then the calico PR.
This PR is safe to merge alone: the current backend image ignores the
new env vars, so the existing e2e keeps passing; only direct whisker
UI access on master dev clusters is degraded until the calico PR
lands. Once the calico PR merges, the backend requires the env vars β€”
so image upgrades without this operator change crashloop loudly
rather than serving plain HTTP.

Testing:

  • Render unit tests updated and extended (service port, env vars,
    volumes, rotation annotations); controller test asserts both key
    pair secrets are created on reconcile.
  • Verified end to end on a kadm cluster: nginx (8443, TLS) ->
    whisker-backend (3002, TLS) -> Goldmane (7443, mTLS), flows visible
    in the UI, plain HTTP on 8443 rejected with 400, TLS 1.1 handshake
    refused, rendered NetworkPolicy identical to master.

Release Note

Whisker is now served over HTTPS on port 8443.

πŸ€– Generated with Claude Code

Whisker's UI and backend are now served over HTTPS:

- New whisker-key-pair certificate for nginx; both nginx configs serve
  TLS on 8443 (TLS 1.2/1.3 only) and proxy /whisker-backend/ to the
  backend over https.
- The whisker service moves from 8081 to 8443. UI access is via
  kubectl port-forward. No NetworkPolicy changes: port-forward enters
  through the pod's loopback and is not subject to policy.
- whisker-backend gets SERVER_TLS_CERT_PATH / SERVER_TLS_KEY_PATH env
  vars (from the existing backend key pair) so it serves HTTPS on
  3002. The existing TLS_CERT_PATH / TLS_KEY_PATH remain for Goldmane
  client mTLS.
- The pod template carries hash annotations for both key pairs, so
  cert rotation restarts nginx and the backend.

Requires whisker-backend server TLS support from
projectcalico/calico#13436; this PR merges first (the env vars are
ignored by older backend images).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vara2504
vara2504 force-pushed the vara-whisker-https branch from 093f0d1 to 97652dc Compare August 5, 2026 23:28
vara2504 added a commit to vara2504/calico that referenced this pull request Aug 5, 2026
whisker-backend can now serve its API over HTTPS. New config options
SERVER_TLS_CERT_PATH and SERVER_TLS_KEY_PATH enable server TLS; when
unset, the server keeps serving plain HTTP. The existing TLS_CERT_PATH
and TLS_KEY_PATH options are now used only for Goldmane client mTLS,
instead of doing double duty.

The staged-policy e2e queries the backend over HTTPS, verifying its
certificate against the cluster's tigera-ca-bundle. This requires the
operator companion (tigera/operator#5140) to merge first so clusters
set the new env vars.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vara2504
vara2504 marked this pull request as ready for review August 6, 2026 16:12
@vara2504
vara2504 requested a review from a team as a code owner August 6, 2026 16:12
Nothing verifies this certificate against 127.0.0.1: port-forward
clients dial localhost, and the gateway will dial the service DNS
names. The backend key pair keeps its existing names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vara2504
vara2504 merged commit 9e8b640 into tigera:master Aug 6, 2026
3 of 8 checks passed
vara2504 added a commit to vara2504/calico that referenced this pull request Aug 6, 2026
whisker-backend now serves its API over HTTPS only. New required
config options SERVER_TLS_CERT_PATH and SERVER_TLS_KEY_PATH provide
the server certificate; the process fails fast with a clear error
when they are missing. The existing TLS_CERT_PATH and TLS_KEY_PATH
options are now used only for Goldmane client mTLS, instead of doing
double duty.

The FV tests run the backend with server TLS, the staged-policy e2e
queries it over HTTPS verified against the cluster CA bundle, and the
standalone whisker image's nginx proxies the backend over https.

Requires tigera/operator#5140 to merge first: it sets the new env
vars, which are ignored by older backend images but required here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants