Add an opt-in SSH operations adapter for capabilities missing from the gateway API #49

Open
opened 2026-08-23 14:30:15 +00:00 by kayg · 0 comments
Owner

Scope

This is explicitly deferred. It is not part of the current mixed-selection/application-purge block.

Requirements

  • The gateway API is always primary. If an API capability exists, SSH is prohibited for that operation.
  • Add an optional plugin/Adapter registered at the composition-root capability seam. If it is omitted, the capability must report an explicit unavailable state.
  • Do not add scattered if sshEnabled checks or global SSH state.
  • The first version supports key-based authentication only. Credentials and private keys must be managed through macOS Keychain or the system SSH agent, never through repository configuration or logs.
  • Enforce strict host-key verification. Never use StrictHostKeyChecking=no.
  • Use a command allowlist and a structured operation interface. Never expose arbitrary shell text to views.
  • Destructive operations require one human-readable confirmation and an audit result containing host, operation, status, and no secret output.
  • Do not use SSH fallback for session purge once the gateway purge API exists.
  • Show UI progress only while a real SSH operation is in flight. Unavailable and static states are not spinners.
  • Do not connect or probe hosts on launch. Connect only when an operation is invoked.

Tests

Cover an in-memory fake Adapter, Adapter omission, host-key failure, authentication failure, command allowlist enforcement, cancellation, and output redaction.

## Scope This is explicitly deferred. It is not part of the current mixed-selection/application-purge block. ## Requirements - The gateway API is always primary. If an API capability exists, SSH is prohibited for that operation. - Add an optional plugin/Adapter registered at the composition-root capability seam. If it is omitted, the capability must report an explicit unavailable state. - Do not add scattered `if sshEnabled` checks or global SSH state. - The first version supports key-based authentication only. Credentials and private keys must be managed through macOS Keychain or the system SSH agent, never through repository configuration or logs. - Enforce strict host-key verification. Never use `StrictHostKeyChecking=no`. - Use a command allowlist and a structured operation interface. Never expose arbitrary shell text to views. - Destructive operations require one human-readable confirmation and an audit result containing host, operation, status, and no secret output. - Do not use SSH fallback for session purge once the gateway purge API exists. - Show UI progress only while a real SSH operation is in flight. Unavailable and static states are not spinners. - Do not connect or probe hosts on launch. Connect only when an operation is invoked. ## Tests Cover an in-memory fake Adapter, Adapter omission, host-key failure, authentication failure, command allowlist enforcement, cancellation, and output redaction.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/hermternal-apple#49
No description provided.