feat: display SSH cert principals in expanded certificate details

This commit is contained in:
Ubuntu
2026-05-07 20:51:30 +00:00
parent 16fb2b4e41
commit c217b36799
3 changed files with 8 additions and 2 deletions
+3
View File
@@ -291,6 +291,9 @@ function CertificateRow({ cert }: { cert: AdminUserSshCertificate }) {
<span className="text-muted-foreground">CA ID</span>
<span className="font-mono truncate">{cert.ca_id}</span>
<span className="text-muted-foreground">Principals</span>
<span className="font-mono">{cert.principals.join(", ")}</span>
{cert.request_ip && (
<>
<span className="text-muted-foreground">Request IP</span>
+3
View File
@@ -47,6 +47,7 @@ import {
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { useToast } from "@/hooks/use-toast";
import { useOrg } from "@/contexts/OrgContext";
import { api, SSHKey, SSHCertificate, ApiError, PrincipalOption, MyPrincipalsOrg, DeptCertPolicy } from "@/lib/api";
import { formatDate as _formatDate } from "@/lib/date";
@@ -87,6 +88,7 @@ function CopyButton({ text }: { text: string }) {
export default function SSHKeysPage() {
const { toast } = useToast();
const { selectedOrgId } = useOrg();
// Key list state
const [keys, setKeys] = useState<SSHKey[]>([]);
@@ -379,6 +381,7 @@ export default function SSHKeysPage() {
principals.length > 0 ? principals : undefined,
certType,
parsedExpiry,
selectedOrgId ?? undefined,
);
setCertResult(result.certificate);
fetchCerts(); // refresh certs list