import { AlertCircle, Plus, Server, ServerCog, ShieldAlert, User } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent } from "@/components/ui/card"; import { OrgCA } from "@/lib/api"; import { CADetailCard } from "./CADetailCard"; import { IssueHostCertPanel } from "./IssueHostCertPanel"; interface CASectionProps { caType: "user" | "host"; ca: OrgCA | null; onCreateClick: (caType: "user" | "host") => void; onEdit: (ca: OrgCA) => void; onRotate: (ca: OrgCA) => void; onDelete: (ca: OrgCA) => void; } const SECTION_META = { user: { title: "User CA", subtitle: "Signs SSH user certificates. Servers trust users who present a valid cert by adding this CA's public key to TrustedUserCAKeys.", emptyDescription: "No User CA configured. Generate a key pair to start issuing SSH user certificates.", }, host: { title: "Host CA", subtitle: "Signs SSH host certificates. Clients trust servers whose cert is signed by this CA. The CA public key goes in the client's known_hosts — not HostCertificate (that is issued per-server separately).", emptyDescription: "No Host CA configured. Generate a key pair to start issuing SSH host certificates.", }, } as const; // ── Tiny numbered step label used in the Host CA flow ──────────────────────── function StepLabel({ n, label }: { n: number; label: string }) { return (
{subtitle}
)}Using server-configured CA
Certificates are being signed by a CA key loaded from the server configuration, not managed through this UI. Generate a managed key below to take full control of certificate issuance from Gatehouse.
No {title} configured
{emptyDescription}