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,38 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: SSH Key Generation
|
||||
|
||||
The system SHALL generate Ed25519 SSH key pairs and encrypt the private key with Fernet.
|
||||
|
||||
#### Scenario: Generate key
|
||||
- **WHEN** an authenticated user requests a new SSH key with a name
|
||||
- **THEN** an Ed25519 key pair is generated
|
||||
- **AND** the private key is encrypted with Fernet
|
||||
- **AND** the public key is stored in OpenSSH format
|
||||
- **AND** the key is associated with the user
|
||||
|
||||
### Requirement: SSH Key Listing
|
||||
|
||||
The system SHALL list all SSH keys for the authenticated user.
|
||||
|
||||
#### Scenario: List keys
|
||||
- **WHEN** an authenticated user views their SSH keys
|
||||
- **THEN** all their keys are listed with name, public key preview, and created date
|
||||
|
||||
### Requirement: SSH Key Display
|
||||
|
||||
The system SHALL display public keys for copying.
|
||||
|
||||
#### Scenario: Copy public key
|
||||
- **WHEN** an authenticated user views an SSH key
|
||||
- **THEN** the full public key is displayed in OpenSSH format
|
||||
- **AND** a copy-to-clipboard button is available
|
||||
|
||||
### Requirement: SSH Key Deletion
|
||||
|
||||
The system SHALL support key removal.
|
||||
|
||||
#### Scenario: Delete key
|
||||
- **WHEN** an authenticated user deletes an SSH key
|
||||
- **THEN** it's removed from the database
|
||||
- **AND** the key files are deleted if stored on disk
|
||||
Reference in New Issue
Block a user