A removed domain is released while its route still serves traffic

未關閉
#302 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
docker, typescript
領域
backend, devops

研究方向

Start with apps/api/src/modules/apps/infrastructure/prisma-application.store.ts and the syncDomains behavior described in the issue. Then trace how the deployment pipeline tracks active releases and route changes, since the fix must coordinate reservation release with route removal. Add a test for removing a domain without redeploying and attempting to claim it from another application; done means the claim is rejected while the route still exists or is switching.

由索引模型根據 Issue 內容生成。

描述

needs-decision

What

Removing a domain from an application's configuration deletes its reservation at once (syncDomains in apps/api/src/modules/apps/infrastructure/prisma-application.store.ts). The release that is still running keeps serving that domain through Caddy until the next successful deployment, and for longer if that deployment fails.

Meanwhile another application of the same organization can claim the domain. The reservation and the live route then name two different applications, and traffic can reach the wrong service.

Found by a security audit of the repository on 8 November 2026, still true on main. The audit reproduced the reassignment at the store level; the full behavior with Caddy has not been tested.

Design question

A reservation should last as long as something can serve the domain. Options:

  1. Keep the reservation while the active release, or a deployment in progress, still lists the domain; release it when the route is removed.
  2. Mark it as "releasing" and refuse new claims until the route is gone.

Both need the deployment pipeline to tell the apps module when a route was removed.

Done when

  • A domain cannot be claimed by another application while a route for it exists or is being switched.
  • A test covers: remove the domain, do not redeploy, try to claim it from another application.
主要語言
TypeScript
星號
2
分支
1
平均合併
7 小時 17 分鐘
30 天內合併 PR
197

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

shipkeepdev/shipkeep 的其他 Issue

查看 shipkeepdev/shipkeep 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。