Skip to content

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

docs(kmip): add API reference pages for KMIP server endpoints

bernie-g1deba4c5e091
diff --git a/backend/src/ee/routes/v1/kmip-server-router.ts b/backend/src/ee/routes/v1/kmip-server-router.ts
index fe1c24b67e..53d344d2a0 100644
--- a/backend/src/ee/routes/v1/kmip-server-router.ts
+++ b/backend/src/ee/routes/v1/kmip-server-router.ts
@@ -4,6 +4,7 @@ import { KmipServersSchema } from "@app/db/schemas";
import { EventType, UserAgentType } from "@app/ee/services/audit-log/audit-log-types";
import { validateAccountIds, validatePrincipalArns } from "@app/ee/services/resource-auth-method/aws-auth-validators";
import { ResourceAuthMethodType } from "@app/ee/services/resource-auth-method/resource-auth-method-fns";
+import { ApiDocsTags } from "@app/lib/api-docs";
import { BadRequestError, UnauthorizedError } from "@app/lib/errors";
import { ms } from "@app/lib/ms";
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
@@ -105,6 +106,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/",
config: { rateLimit: writeLimit },
schema: {
+ operationId: "createKmipServer",
+ tags: [ApiDocsTags.KmipServers],
description: "Create a new KMIP server with an initial auth method.",
body: z.object({
name: slugSchema({ min: 1, max: 32, field: "name" }),
@@ -170,6 +173,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/:kmipServerId",
config: { rateLimit: readLimit },
schema: {
+ operationId: "getKmipServer",
+ tags: [ApiDocsTags.KmipServers],
params: z.object({ kmipServerId: z.string().uuid() }),
response: {
200: KmipServerWithAuthMethodSchema
@@ -199,6 +204,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/",
config: { rateLimit: readLimit },
schema: {
+ operationId: "listKmipServers",
+ tags: [ApiDocsTags.KmipServers],
response: {
200: z.array(SanitizedKmipServerSchema.omit({ canRevoke: true }))
}
@@ -215,6 +222,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/:kmipServerId",
config: { rateLimit: writeLimit },
schema: {
+ operationId: "updateKmipServer",
+ tags: [ApiDocsTags.KmipServers],
params: z.object({ kmipServerId: z.string().uuid() }),
body: z.object({
hostnamesOrIps: hostnamesOrIpsField.optional(),
@@ -307,6 +316,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/:kmipServerId/token-auth/generate-enrollment-token",
config: { rateLimit: writeLimit },
schema: {
+ operationId: "generateKmipServerEnrollmentToken",
+ tags: [ApiDocsTags.KmipServers],
params: z.object({ kmipServerId: z.string().uuid() }),
response: {
200: z.object({ token: z.string(), expiresAt: z.date() })
@@ -338,9 +349,11 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/:kmipServerId/revoke",
config: { rateLimit: writeLimit },
schema: {
+ operationId: "revokeKmipServerAccess",
+ tags: [ApiDocsTags.KmipServers],
params: z.object({ kmipServerId: z.string().uuid() }),
response: {
- 200: z.object({ method: z.string(), deletedTokenCount: z.number() })
+ 200: z.object({ method: z.string() })
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
@@ -359,13 +372,12 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
resourceType: "kmip",
resourceId: req.params.kmipServerId,
method: result.method,
- resourceName: result.resourceName,
- deletedTokenCount: result.deletedTokenCount
+ resourceName: result.resourceName
}
}
});
- return { method: result.method, deletedTokenCount: result.deletedTokenCount };
+ return { method: result.method };
}
});
@@ -375,6 +387,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/:kmipServerId",
config: { rateLimit: writeLimit },
schema: {
+ operationId: "deleteKmipServer",
+ tags: [ApiDocsTags.KmipServers],
params: z.object({ kmipServerId: z.string().uuid() }),
response: {
200: SanitizedKmipServerSchema.omit({ canRevoke: true })
@@ -406,6 +420,8 @@ export const registerKmipServerRouter = async (server: FastifyZodProvider) => {
url: "/login",
config: { rateLimit: loginRateLimit },
schema: {
+ operationId: "loginKmipServer",
+ tags: [ApiDocsTags.KmipServers],
body: z.discriminatedUnion("method", [
z.object({
method: z.literal(ResourceAuthMethodType.Aws),
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index b3fc088a92..c8622d6409 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -91,7 +91,8 @@ export enum ApiDocsTags {
LdapSso = "LDAP SSO",
Scim = "SCIM",
Events = "Event Subscriptions",
- GatewaysV3 = "Gateways"
+ GatewaysV3 = "Gateways",
+ KmipServers = "KMIP Servers"
}
export const GROUPS = {
diff --git a/docs/api-reference/endpoints/kmip-servers/create.mdx b/docs/api-reference/endpoints/kmip-servers/create.mdx
new file mode 100644
index 0000000000..9eb9b3ec8c
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/create.mdx
@@ -0,0 +1,4 @@
+---
+title: "Create KMIP Server"
+openapi: "POST /api/v1/kmip/servers"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/delete.mdx b/docs/api-reference/endpoints/kmip-servers/delete.mdx
new file mode 100644
index 0000000000..98fe7ab1b9
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: "Delete KMIP Server"
+openapi: "DELETE /api/v1/kmip/servers/{kmipServerId}"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/generate-enrollment-token.mdx b/docs/api-reference/endpoints/kmip-servers/generate-enrollment-token.mdx
new file mode 100644
index 0000000000..0b5d6ce27b
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/generate-enrollment-token.mdx
@@ -0,0 +1,4 @@
+---
+title: "Generate Enrollment Token"
+openapi: "POST /api/v1/kmip/servers/{kmipServerId}/token-auth/generate-enrollment-token"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/get.mdx b/docs/api-reference/endpoints/kmip-servers/get.mdx
new file mode 100644
index 0000000000..48767eb274
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/get.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get KMIP Server"
+openapi: "GET /api/v1/kmip/servers/{kmipServerId}"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/list.mdx b/docs/api-reference/endpoints/kmip-servers/list.mdx
new file mode 100644
index 0000000000..357f435527
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/list.mdx
@@ -0,0 +1,4 @@
+---
+title: "List KMIP Servers"
+openapi: "GET /api/v1/kmip/servers"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/login.mdx b/docs/api-reference/endpoints/kmip-servers/login.mdx
new file mode 100644
index 0000000000..490c45f274
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/login.mdx
@@ -0,0 +1,4 @@
+---
+title: "Login"
+openapi: "POST /api/v1/kmip/servers/login"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/revoke.mdx b/docs/api-reference/endpoints/kmip-servers/revoke.mdx
new file mode 100644
index 0000000000..2404bc628b
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/revoke.mdx
@@ -0,0 +1,4 @@
+---
+title: "Revoke Access"
+openapi: "POST /api/v1/kmip/servers/{kmipServerId}/revoke"
+---
diff --git a/docs/api-reference/endpoints/kmip-servers/update.mdx b/docs/api-reference/endpoints/kmip-servers/update.mdx
new file mode 100644
index 0000000000..fc2880028f
--- /dev/null
+++ b/docs/api-reference/endpoints/kmip-servers/update.mdx
@@ -0,0 +1,4 @@
+---
+title: "Update KMIP Server"
+openapi: "PATCH /api/v1/kmip/servers/{kmipServerId}"
+---
diff --git a/docs/cli/commands/kmip.mdx b/docs/cli/commands/kmip.mdx
index 2ea97b744b..00fdbe4b37 100644
--- a/docs/cli/commands/kmip.mdx
+++ b/docs/cli/commands/kmip.mdx
@@ -27,7 +27,7 @@ description: "Run the Infisical KMIP server or manage its systemd service"
The Infisical KMIP server provides Key Management Interoperability Protocol (KMIP) support for integration with KMIP-compatible clients. It acts as a proxy between your KMIP clients and Infisical KMS, enabling standardized key management operations.
-The server is created as an entity in the Infisical UI and then enrolled from the host where you run it, using either a one-time enrollment **token** or **AWS** authentication. The deploy command (including the enrollment token) can be copied from the server's detail page via **Show deploy command**.
+The server is created in Infisical and then enrolled from the host where you run it, using either a one-time enrollment **token** or **AWS** authentication. The deploy command (including the enrollment token) can be copied from the server's detail page via **Show deploy command**.
The server's certificate configuration (hostnames/IPs, TTL, and key algorithm) is defined on the server entity in the UI. The CLI fetches it on start, so you do not pass it on the command line. To change the certificate, edit the configuration in the UI and restart the server.
diff --git a/docs/docs.json b/docs/docs.json
index 46d332a5e3..1c833cb580 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -3452,6 +3452,19 @@
}
]
},
+ {
+ "group": "KMIP Servers",
+ "pages": [
+ "api-reference/endpoints/kmip-servers/list",
+ "api-reference/endpoints/kmip-servers/get",
+ "api-reference/endpoints/kmip-servers/create",
+ "api-reference/endpoints/kmip-servers/update",
+ "api-reference/endpoints/kmip-servers/delete",
+ "api-reference/endpoints/kmip-servers/generate-enrollment-token",
+ "api-reference/endpoints/kmip-servers/revoke",
+ "api-reference/endpoints/kmip-servers/login"
+ ]
+ },
{
"group": "External Migrations",
"pages": [