feat: implement SSH key management
- Add backend API endpoints for SSH key CRUD (POST, GET, DELETE) - Implement Ed25519 key generation with Fernet-encrypted private keys - Add frontend SSH keys page with generate, list, and delete functionality - Include copy-to-clipboard for public keys - Add responsive CSS styles for key cards - Register ssh_keys router in main.py - Add basic auth tests for SSH key endpoints Quality gates: ruff ✓, mypy ✓, typecheck ✓, lint ✓
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { apiClient } from "./client";
|
||||
|
||||
export interface SSHKey {
|
||||
id: string;
|
||||
name: string;
|
||||
public_key: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface SSHKeyCreate {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export async function listSSHKeys(): Promise<SSHKey[]> {
|
||||
const response = await apiClient.get<SSHKey[]>("/ssh-keys");
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function createSSHKey(data: SSHKeyCreate): Promise<SSHKey> {
|
||||
const response = await apiClient.post<SSHKey>("/ssh-keys", data);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function deleteSSHKey(keyId: string): Promise<void> {
|
||||
await apiClient.delete(`/ssh-keys/${keyId}`);
|
||||
}
|
||||
Reference in New Issue
Block a user