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 摘要。