Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
misc: ux improvements
Sheen Capadngan82f29858ea8d
diff --git a/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/CreateHsmConnectorWizard.tsx b/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/CreateHsmConnectorWizard.tsxindex e8ef6d21b5..34f60b5c40 100644--- a/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/CreateHsmConnectorWizard.tsx+++ b/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/CreateHsmConnectorWizard.tsx@@ -243,23 +243,6 @@ export const CreateHsmConnectorWizard = ({ projectId, isOpen, onOpenChange }: Pr</div><div className="mt-auto space-y-3">- {step === 1 && (- <div className="max-w-full space-y-2 rounded-md border border-border bg-mineshaft-800 p-3 text-xs">- <p className="font-semibold text-foreground">No HSM-capable Gateway yet?</p>- <p className="text-muted">- Follow the{" "}- <a- href="https://infisical.com/docs/documentation/platform/pki/settings/hsm-connectors"- target="_blank"- rel="noreferrer"- className="text-primary hover:underline"- >- HSM Connectors guide- </a>{" "}- for the step-by-step Gateway setup.- </p>- </div>- )}{isLast && (<p className="text-xs leading-relaxed text-muted">Infisical runs a Verify against your HSM before saving. A wrong PIN, slot, ordiff --git a/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/HostStep.tsx b/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/HostStep.tsxindex 64a168b12b..58853753a1 100644--- a/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/HostStep.tsx+++ b/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/HostStep.tsx@@ -1,4 +1,6 @@+import { useCallback } from "react";import { Controller, useForm } from "react-hook-form";+import { Link, useParams } from "@tanstack/react-router";import { ServerIcon } from "lucide-react";import {@@ -25,71 +27,99 @@ type Props = {isLoading: boolean;};-export const HostStep = ({ form, options, isLoading }: Props) => (- <FieldGroup>- <Controller- name="reachedFrom"- control={form.control}- render={({ field, fieldState: { error } }) => (- <Field>- <FieldLabel>- Gateway <span className="text-danger">*</span>- </FieldLabel>- <FieldContent>- <FilterableSelect<ReachedFromOption>- isLoading={isLoading}- options={options}- value={options.find((o) => o.value === field.value) ?? null}- onChange={(selected) => {- const opt = selected as ReachedFromOption | null;- field.onChange(opt?.value ?? "");- }}- getOptionLabel={(opt) => opt.label}- getOptionValue={(opt) => opt.value}- groupBy={options.length > 0 ? "group" : undefined}- getGroupHeaderLabel={- options.length > 0- ? (group: ReachedFromOption["group"]) =>- group === "gateway" ? "Gateways" : "Gateway Pools"- : undefined- }- placeholder="Select a Gateway or Gateway Pool..."- noOptionsMessage={() => "No Gateways connected to an HSM yet."}- isError={Boolean(error)}- />- <FieldDescription>- A{" "}- <a- href="https://infisical.com/docs/documentation/platform/gateways/overview"- target="_blank"- rel="noreferrer"- className="underline"- >- Gateway- </a>{" "}- is a lightweight agent you run inside your own network. Infisical sends signing- requests to it, and it talks to the HSM directly. Only Gateways started with your- HSM's PKCS#11 driver appear here.- </FieldDescription>- <FieldError errors={[error]} />- </FieldContent>- </Field>- )}- />+export const HostStep = ({ form, options, isLoading }: Props) => {+ const { orgId } = useParams({ strict: false });++ const noOptionsMessage = useCallback(+ () => (+ <div className="space-y-1 py-2">+ <p>No Gateways connected to an HSM yet.</p>+ <Link+ to="/organizations/$orgId/networking"+ params={{ orgId: orgId ?? "" }}+ className="underline hover:text-foreground"+ >+ Configure one in Networking+ </Link>+ </div>+ ),+ [orgId]+ );++ return (+ <FieldGroup>+ <Controller+ name="reachedFrom"+ control={form.control}+ render={({ field, fieldState: { error } }) => (+ <Field>+ <FieldLabel>+ Gateway <span className="text-danger">*</span>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect<ReachedFromOption>+ isLoading={isLoading}+ options={options}+ value={options.find((o) => o.value === field.value) ?? null}+ onChange={(selected) => {+ const opt = selected as ReachedFromOption | null;+ field.onChange(opt?.value ?? "");+ }}+ getOptionLabel={(opt) => opt.label}+ getOptionValue={(opt) => opt.value}+ groupBy={options.length > 0 ? "group" : undefined}+ getGroupHeaderLabel={+ options.length > 0+ ? (group: ReachedFromOption["group"]) =>+ group === "gateway" ? "Gateways" : "Gateway Pools"+ : undefined+ }+ placeholder="Select a Gateway or Gateway Pool..."+ noOptionsMessage={noOptionsMessage}+ isError={Boolean(error)}+ />+ <FieldDescription>+ A{" "}+ <a+ href="https://infisical.com/docs/documentation/platform/gateways/overview"+ target="_blank"+ rel="noreferrer"+ className="underline"+ >+ Gateway+ </a>{" "}+ is a lightweight agent that performs HSM operations on Infisical's behalf. It runs+ inside your network and handles the communication with your HSM.+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>+ )}+ />- {!isLoading && options.length === 0 && (- <div className="rounded-md border border-border bg-mineshaft-800 p-4">- <div className="flex items-start gap-3">- <ServerIcon className="mt-0.5 size-4 shrink-0 text-mineshaft-400" />- <div className="min-w-0 flex-1 space-y-2 text-sm">- <p className="font-medium text-foreground">No Gateways are connected to an HSM yet</p>- <p className="text-muted">Start a Gateway on a machine that can reach your HSM:</p>- <pre className="overflow-x-auto rounded bg-mineshaft-900 p-2 text-xs text-mineshaft-200">- infisical gateway start my-gateway --pkcs11-module=/path/to/HSM-vendor.so- </pre>+ {!isLoading && options.length === 0 && (+ <div className="rounded-md border border-border bg-mineshaft-800 p-4">+ <div className="flex items-start gap-3">+ <ServerIcon className="mt-0.5 size-4 shrink-0 text-mineshaft-400" />+ <div className="min-w-0 flex-1 space-y-2 text-sm">+ <p className="font-medium text-foreground">No Gateways are connected to an HSM yet</p>+ <p className="text-muted">+ A Gateway with PKCS#11 support must be running on a machine that can reach your HSM.+ This is set up by someone with network and infrastructure access.{" "}+ <a+ href="https://infisical.com/docs/documentation/platform/pki/settings/hsm-connectors"+ target="_blank"+ rel="noreferrer"+ className="text-primary hover:underline"+ >+ Read the HSM Connectors setup guide+ </a>+ .+ </p>+ </div></div></div>- </div>- )}- </FieldGroup>-);+ )}+ </FieldGroup>+ );+};diff --git a/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/types.ts b/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/types.tsindex c5f1708503..296824e439 100644--- a/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/types.ts+++ b/frontend/src/pages/cert-manager/SettingsPage/components/HsmConnectorsTab/CreateHsmConnectorWizard/types.ts@@ -42,7 +42,7 @@ export const STEPS: WizardStep[] = [subtitle: "Choose the Gateway that connects Infisical to your HSM.",rightLabel: "CONNECTION",rightDescription:- "A Gateway is a lightweight agent you run inside your own network. Infisical sends signing requests to it, and it talks to the HSM directly. Only Gateways connected to an HSM appear here. If the list is empty, follow the HSM Connectors guide to set one up."+ "Select which Gateway will route signing requests to your HSM. Only Gateways with PKCS#11 support enabled appear in the list."},{name: "Credentials",