RFC 0001-P6: UI-edit encryption proxy
- Dominant language
- Go
- Stars
- 55
- Forks
- 16
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 87
Description
Phase 6: unblock pool-password and miner-credential edits from the cloud UI in `--mode=server` deployments via an agent-mediated encryption proxy, so the cloud never persists plaintext.
## Acceptance criteria
- New `EncryptSecret` `ControlMessage` plus UI-facing `UpdatePoolSecret` / `UpdateMinerCredentials` Connect-RPC endpoints.
- Cloud forwards new plaintext on `ControlStream` to one online agent in the org; agent encrypts under the org data key with the current `key_version` and returns the ciphertext; cloud writes it to `pool.password_enc` / `miner_credentials.*`.
- Plaintext lives in cloud memory only for the duration of one round-trip; never persisted.
- Fails closed with a clear UI error if no agent is online ("no agent online; retry when one connects"); cloud does not persist the plaintext for retry.
- Unblocks `UpdateMiningPools` and `UpdateMinerPassword` in `--mode=server` deployments (which were rejected with a clear "deferred" error in phase 2).
- Tests: plaintext is never written to PG; cross-org leakage isn't possible (cloud picks an agent in the same org as the affected secret).
## Reference
RFC 0001 Phase 6: https://github.com/block/proto-fleet/pull/145
Contributor guide
Research direction
Start by reading RFC 0001 Phase 6 and tracing the existing UpdateMiningPools and UpdateMinerPassword server-mode flows, including their deferred handling and the ControlStream path. Completion means meeting the listed EncryptSecret, UpdatePoolSecret, and UpdateMinerCredentials criteria, with no plaintext written to PostgreSQL and agent selection restricted to the affected organization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgres
- Domain
- api, backend, databases, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100