Implement ssh_keys model and attach to users #4

Open
opened 2025-09-23 14:35:16 +00:00 by boris · 0 comments
Owner

As an end user, I want to register my SSH public keys so that I can request access to servers using those keys.

Acceptance Criteria (G/W/T)

  • Given a valid JWT, when I POST /api/v1/keys with name, public_key (ed25519 or ecdsa-p256), optional expires_at, then the key is stored and returned with id, algo, is_active=true.
  • Given I have keys, when I GET /api/v1/keys, then I see only my keys.
  • Given an invalid key format/algorithm, when I attempt to add it, then I get 422 with a clear error.
  • Given a key I own, when I DELETE /api/v1/keys/{id} or PATCH to deactivate, then the key is no longer active and won’t be deployed by agents.

Notes / Non-functional

  • Enforce allowed algos (default: ssh-ed25519, ecdsa-sha2-nistp256).
  • Store original key string; parse/validate on write.
  • Add index (user_id, is_active) for quick lookups.
As an end user, I want to register my SSH public keys so that I can request access to servers using those keys. Acceptance Criteria (G/W/T) - [ ] Given a valid JWT, when I POST /api/v1/keys with name, public_key (ed25519 or ecdsa-p256), optional expires_at, then the key is stored and returned with id, algo, is_active=true. - [ ] Given I have keys, when I GET /api/v1/keys, then I see only my keys. - [ ] Given an invalid key format/algorithm, when I attempt to add it, then I get 422 with a clear error. - [ ] Given a key I own, when I DELETE /api/v1/keys/{id} or PATCH to deactivate, then the key is no longer active and won’t be deployed by agents. Notes / Non-functional - [ ] Enforce allowed algos (default: ssh-ed25519, ecdsa-sha2-nistp256). - [ ] Store original key string; parse/validate on write. - [ ] Add index (user_id, is_active) for quick lookups.
boris added this to the Minimum Viable Product milestone 2025-09-23 14:35:16 +00:00
boris added the
Kind/Feature
Priority
Critical
1
labels 2025-09-23 14:35:16 +00:00
boris self-assigned this 2025-09-23 14:35:16 +00:00
boris added this to the Keywarden project 2025-09-23 14:35:16 +00:00
boris added the
Status
Blocked
1
label 2025-09-23 14:35:26 +00:00
Sign in to join this conversation.
No description provided.