Skip to content

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

feat(kmip): remove certificate TTL from UI, keep API support

bernie-g9913004e831a
diff --git a/backend/src/ee/routes/v1/kmip-server-router.ts b/backend/src/ee/routes/v1/kmip-server-router.ts
index 48d09cd796..344651b424 100644
--- a/backend/src/ee/routes/v1/kmip-server-router.ts
+++ b/backend/src/ee/routes/v1/kmip-server-router.ts
@@ -29,9 +29,16 @@ const SanitizedKmipServerSchema = KmipServersSchema.pick({
canRevoke: z.boolean()
});
-// Cert config lives on the server entity (set in the UI). The daemon's /connect call reads it,
-// rather than passing it on every launch. ttl/keyAlgorithm get sensible defaults.
-const ttlField = z.string().refine((val) => ms(val) > 0, "TTL must be a positive number");
+// Cert config lives on the server entity. The daemon's /connect call reads it, rather than
+// passing it on every launch. TTL is API-only (no UI field) and defaults to 1y.
+// ms() throws on unparseable input (including ""), so guard it to return a clean 400.
+const ttlField = z.string().refine((val) => {
+ try {
+ return ms(val) > 0;
+ } catch {
+ return false;
+ }
+}, "TTL must be a positive number");
// hostnamesOrIps is stored in a varchar(4096) column (matching the issued cert's altNames), so cap
// the resolved SAN list there to surface a clean 400 instead of a DB "value too long" error.
diff --git a/docs/cli/commands/kmip.mdx b/docs/cli/commands/kmip.mdx
index 2a04714ce9..3b5217a522 100644
--- a/docs/cli/commands/kmip.mdx
+++ b/docs/cli/commands/kmip.mdx
@@ -29,7 +29,7 @@ The Infisical KMIP server provides Key Management Interoperability Protocol (KMI
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. The running server renews its certificate automatically before it expires, with no restart required. To change the certificate configuration, edit it in the UI; the change applies at the next automatic renewal, or restart the server to apply it immediately.
+The server's certificate configuration (hostnames/IPs 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. The running server renews its certificate automatically before it expires, with no restart required. To change the certificate configuration, edit it in the UI; the change applies at the next automatic renewal, or restart the server to apply it immediately.
For detailed information about KMIP integration, PKI setup, and client configuration, see the [KMIP Integration Guide](/documentation/platform/kms/kmip).
diff --git a/docs/documentation/platform/kms/kmip.mdx b/docs/documentation/platform/kms/kmip.mdx
index 374c3a8b99..76b3eb78bd 100644
--- a/docs/documentation/platform/kms/kmip.mdx
+++ b/docs/documentation/platform/kms/kmip.mdx
@@ -65,9 +65,10 @@ A KMIP server is created as an organization-wide entity in Infisical and then en
2. Click **Create KMIP Server** and fill in:
- **Name** of the server.
- **Hostnames or IPs**: a comma-separated list of the hostnames or IPs that KMIP clients will use to reach this server (for example `kmip.example.com` or `10.0.1.50`). These become the Subject Alternative Names (SANs) of the server's TLS certificate, so they must match how clients connect.
- - **Certificate TTL** (optional): validity period of the server certificate (for example `1y`). Defaults to `1y`. The server renews its certificate automatically before it expires, so this value mainly controls how often that happens.
- **Key Algorithm**: key algorithm used to sign the server certificate.
+ The server certificate is issued with a one-year validity period and renews automatically before it expires, so there is no TTL to configure. If you need a custom validity period (for example, to meet a compliance requirement), set `ttl` via the [API](/api-reference/endpoints/kmip-servers/update).
+
This certificate configuration is stored on the server entity. The CLI reads it on start, so you do not pass it on the command line. You can change it later from the server's detail page (edit the **Certificate Configuration** card); changes apply at the server's next automatic certificate renewal, or immediately if you restart it.
3. (Optional) Open the new server's detail page and click the edit icon next to **Authentication** to switch the auth method. Two methods are supported:
- **Token** (default): a one-time enrollment token (1h expiry) bootstraps the server.
@@ -153,7 +154,7 @@ A KMIP server is created as an organization-wide entity in Infisical and then en
</Warning>
<Note>
- The server's certificate configuration (hostnames/IPs, TTL, key algorithm) is read from the server entity you configured in the UI, so the deploy command does not include it. To change the certificate, edit the **Certificate Configuration** card on the server's detail page. Changes apply at the next automatic certificate renewal, or restart the server to apply them immediately.
+ The server's certificate configuration (hostnames/IPs, key algorithm) is read from the server entity you configured in the UI, so the deploy command does not include it. To change the certificate, edit the **Certificate Configuration** card on the server's detail page. Changes apply at the next automatic certificate renewal, or restart the server to apply them immediately.
</Note>
<Note>
@@ -187,7 +188,7 @@ A KMIP server is created as an organization-wide entity in Infisical and then en
From the KMIP server's detail page (under **Infisical KMS > KMIP Servers**):
- **Show deploy command** — Generates a fresh enrollment token (token method) or re-displays the AWS start command. For token-method servers this does not disconnect a running server; the next enrollment with the new token supersedes the old one.
-- **Edit certificate configuration**: Update the hostnames/IPs, TTL, or key algorithm used for the server's TLS certificate. Changes take effect at the next automatic certificate renewal; restart the server to apply them immediately.
+- **Edit certificate configuration**: Update the hostnames/IPs or key algorithm used for the server's TLS certificate. Changes take effect at the next automatic certificate renewal; restart the server to apply them immediately.
- **Edit authentication** — Switch between Token and AWS, or update the AWS allowlists.
- **Options → Revoke Access** — Invalidates the server's outstanding access tokens and enrollment tokens. The server must re-enroll to reconnect.
- **Options → Delete** — Permanently removes the KMIP server entity.
diff --git a/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerCertConfig/KmipServerCertConfigModal.tsx b/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerCertConfig/KmipServerCertConfigModal.tsx
index 91571f9436..f895d1ed11 100644
--- a/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerCertConfig/KmipServerCertConfigModal.tsx
+++ b/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerCertConfig/KmipServerCertConfigModal.tsx
@@ -39,7 +39,6 @@ const schema = z.object({
.trim()
.min(1, "At least one hostname or IP is required")
.max(4096, "Hostnames or IPs must be at most 4096 characters"),
- ttl: z.string().trim().max(64, "TTL is too long").optional(),
keyAlgorithm: z.nativeEnum(CertKeyAlgorithm)
});
@@ -57,7 +56,6 @@ export const KmipServerCertConfigModal = ({ isOpen, onOpenChange, kmipServer }:
const defaults: FormData = {
hostnamesOrIps: kmipServer.hostnamesOrIps ?? "",
- ttl: kmipServer.ttl ?? "",
keyAlgorithm: (kmipServer.keyAlgorithm as CertKeyAlgorithm) ?? CertKeyAlgorithm.RSA_2048
};
@@ -81,7 +79,6 @@ export const KmipServerCertConfigModal = ({ isOpen, onOpenChange, kmipServer }:
await updateKmipServer({
kmipServerId: kmipServer.id,
hostnamesOrIps: form.hostnamesOrIps,
- ttl: form.ttl || null,
keyAlgorithm: form.keyAlgorithm
});
createNotification({
@@ -122,19 +119,6 @@ export const KmipServerCertConfigModal = ({ isOpen, onOpenChange, kmipServer }:
</Field>
)}
/>
- <Controller
- control={control}
- name="ttl"
- render={({ field, fieldState: { error } }) => (
- <Field>
- <FieldLabel>Certificate TTL</FieldLabel>
- <FieldContent>
- <Input {...field} isError={Boolean(error)} placeholder="1y" />
- <FieldError errors={[error]} />
- </FieldContent>
- </Field>
- )}
- />
<Controller
control={control}
name="keyAlgorithm"
diff --git a/frontend/src/pages/organization/KmipServersPage/components/components/KmipServerDeployModal.tsx b/frontend/src/pages/organization/KmipServersPage/components/components/KmipServerDeployModal.tsx
index 2869d8f677..45c4dedf0c 100644
--- a/frontend/src/pages/organization/KmipServersPage/components/components/KmipServerDeployModal.tsx
+++ b/frontend/src/pages/organization/KmipServersPage/components/components/KmipServerDeployModal.tsx
@@ -30,7 +30,6 @@ const schema = z.object({
.trim()
.min(1, "At least one hostname or IP is required")
.max(4096, "Hostnames or IPs must be at most 4096 characters"),
- ttl: z.string().trim().max(64, "TTL is too long").optional(),
keyAlgorithm: z.nativeEnum(CertKeyAlgorithm)
});
@@ -57,7 +56,6 @@ export const KmipServerDeployModal = ({ isOpen, onOpenChange }: Props) => {
defaultValues: {
name: "",
hostnamesOrIps: "",
- ttl: "",
keyAlgorithm: CertKeyAlgorithm.RSA_2048
}
});
@@ -67,7 +65,6 @@ export const KmipServerDeployModal = ({ isOpen, onOpenChange }: Props) => {
const kmipServer = await createKmipServer({
name: form.name,
hostnamesOrIps: form.hostnamesOrIps,
- ttl: form.ttl || undefined,
keyAlgorithm: form.keyAlgorithm,
authMethod: { method: "token" }
});
@@ -128,20 +125,6 @@ export const KmipServerDeployModal = ({ isOpen, onOpenChange }: Props) => {
</FormControl>
)}
/>
- <Controller
- control={control}
- name="ttl"
- render={({ field, fieldState: { error } }) => (
- <FormControl
- label="Certificate TTL"
- isError={Boolean(error)}
- errorText={error?.message}
- helperText="Validity period of the server certificate, e.g. 2 days, 1d, 2h, 1y. Defaults to 1y. The server renews its certificate automatically before it expires."
- >
- <Input {...field} placeholder="1y" />
- </FormControl>
- )}
- />
<Controller
control={control}
name="keyAlgorithm"