Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

chore: add missing route

Scott Wilson275e3c0ed51f
diff --git a/backend/src/ee/routes/v1/removed-product-tombstone-router.ts b/backend/src/ee/routes/v1/removed-product-tombstone-router.ts
new file mode 100644
index 0000000000..010972d353
--- /dev/null
+++ b/backend/src/ee/routes/v1/removed-product-tombstone-router.ts
@@ -0,0 +1,33 @@
+import { readLimit } from "@app/server/config/rateLimiter";
+
+// The SSH and Agent Sentinel (AI MCP) products were removed (ENG-5432), but shipped
+// clients still call their endpoints: the Infisical CLI's `infisical ssh` commands
+// (via go-sdk) hit /api/v1/ssh/*, and MCP clients hit /api/v1/ai/mcp/*. A bare 404
+// gives those users no hint the product is gone, so the old prefixes answer
+// 410 Gone with an explanation instead.
+//
+// Deliberately unauthenticated: the response reveals nothing, performs no work, and
+// must reach clients whose tokens are expired or invalid. Remove together with the
+// deprecated permission subjects (see ProjectPermissionV2Schema) in a future
+// breaking release.
+export const registerRemovedProductTombstoneRouter =
+ (message: string) => async (server: FastifyZodProvider) => {
+ server.route({
+ method: ["GET", "POST", "PUT", "PATCH", "DELETE"],
+ url: "/*",
+ config: {
+ rateLimit: readLimit
+ },
+ schema: {
+ hide: true
+ },
+ handler: async (req, res) => {
+ void res.status(410).send({
+ reqId: req.id,
+ statusCode: 410,
+ error: "Gone",
+ message
+ });
+ }
+ });
+ };