Skip to content

Components

Detailed breakdown of each component in the SSH-KLM architecture.

The API server handles all client requests and orchestrates operations.

  • REST API endpoints
  • WebSocket connections for real-time updates
  • Authentication and authorization
  • Request validation
  • Rate limiting
api:
port: 8081
workers: 4
timeout: 30s
cors:
origins: ["https://app.example.com"]

Background workers process asynchronous tasks.

WorkerPurposeConcurrency
DiscoveryScan hosts for SSH keys10 parallel
RotationExecute key rotations5 parallel
NotificationSend alerts/emails20 parallel
CleanupArchive old data1
// Example job structure
{
"id": "job-12345",
"type": "rotation",
"payload": {
"keyId": "KEY-abc",
"algorithm": "ed25519"
},
"priority": "high",
"retries": 3
}

Primary data store for all persistent data.

TablePurpose
hostsTarget server inventory
ssh_keysDiscovered key metadata
rotationsRotation job history
policiesRotation/access policies
audit_logsAll operations logged

High-performance caching and job queue.

  • Session storage
  • API response caching
  • Job queue (Bull/BullMQ)
  • Rate limit counters
  • Real-time pub/sub

Lightweight daemon on target hosts.

  • Local key discovery
  • Key rotation execution
  • Real-time file monitoring
  • Secure communication
ResourceTypical Usage
Memory50-100 MB
CPU< 1% idle
Disk10 MB