You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A removed domain is released while its route still serves traffic #302
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:
Keep the reservation while the active release, or a deployment in progress, still lists the domain; release it when the route is removed.
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.
Activity
fix(api): three findings of the security audit (#303)