A Different Class of Destination

The destinations up to this point were comfortable. Writing to our own storage fails in ways we control, and posting to a customer's HTTP endpoint fails in ways that are well-understood and stateless. Delivering onto a server the customer operates is a different proposition: the platform now stores their credentials, initiates outbound connections to an address they supply, and depends on the state of a machine nobody on the team can log into.

Three problems fall out of that, and each of them shaped a design decision. The platform holds a secret it must never leak. It has to decide whether a remote host is the one it expects. And when a connection does not work, it has to tell somebody something useful about a machine it cannot inspect.

Write-Only Credentials

Passwords are encrypted at rest with a key held outside the database, which is the unremarkable part. The decision worth explaining is that there is no way to read one back. Not a restricted endpoint, not an audited reveal flow for administrators: the capability does not exist in the API surface at all. Reads always return a fixed mask, and the only supported operation is overwriting the value.

That makes the mask do real work. When the client submits a form containing the mask, the server interprets it as an explicit instruction to keep the stored secret unchanged, which is what lets somebody edit a remote path without retyping a password nobody has written down. The sentinel is rejected in the one context where it would be meaningless: an ad-hoc connection test for a profile that does not exist yet has nothing stored to keep, so submitting the mask there is an error rather than a silent no-op.

Trusting the Host, and Letting It Change

Accepting whatever host key a server presents means a machine that answers on the right address can receive customer data. Requiring the key up front means every onboarding starts with an email asking somebody to read out a fingerprint. The compromise is trust-on-first-use: the key is pinned during the first successful test connection and verified on every connection afterwards.

The refinement that makes it usable in practice is that the pin is scoped to the target it was recorded against. If the host or port is edited, the stored pin no longer applies and the next connection pins afresh. A customer migrating to a new server is doing something legitimate, and the system should not require an engineer to clear state by hand before they can complete it. A changed key on the same address, which is the case that should worry you, still fails loudly.