Cert carry-forward keeps the previous tenant's upstream when a reload reassigns the route

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend, security

Research direction

Start in router.rs at build_route_table (lines 766–781), where the previous route is carried forward after a certificate build failure. Compare the new spec’s metricsGroup with the previous route’s and follow the existing tombstone behavior for a changed client-certificate policy. Done when a tenant change cannot keep forwarding to the previous upstream while its certificate is building; check the related router tests for this reload path.

Written by the indexing model from the issue text.

Description

When a route's cert fails to build on a reload, build_route_table carries the previous route forward whole, upstreams included (router.rs:766-781). The only gate is that the client-certificate policy is unchanged. So a reload that moves an SNI to another tenant (a new metricsGroup and a new upstream) while its new cert is mid-rotation keeps sending that name's traffic to the previous tenant's upstream, under the new tenant's allowedSources, until the cert builds.

The code comment accepts this cost for a cert rotation, where the upstream is the same tenant's. It is a different trade when ownership changes. Suggested fix: do not carry forward when the spec's metricsGroup differs from the previous route's; tombstone the SNI instead, as a changed client-cert policy already does.

Found during review of the SNI case-insensitivity change, which lets a respelled route (API.example.com for api.example.com) reach this path too.

Review-Deferral: 04da97247dd082dc severity=minor category=security

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
11h 49m
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HarperFast/symphony

All issues in HarperFast/symphony

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.