Repository navigation
Check lease targets when acquire returns and reach leases by the client's key - #46
Conversation
A cloud peer now refuses a provider target that no client could use (url and ssh both set, a non-HTTP URL, a bad SSH name, a malformed host key) as soon as acquire returns, with the same check configured peers and clients use, so its machine is released at once instead of at acquire_timeout. Clients offer their lease key to an ssh target whether or not the cloud peer pinned its host key, pool SSH connections by the host key and keys they trust, so an unpinned connection is never reused for a pinned lease, and compare SSH keys by type and data without comments. errand makes its SSH keys itself, so a client needs no ssh-keygen, and a device let into a lease by name is named against all the cloud peer's leases. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf2d4d697e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
An unpinned lease registered for a user@host that an earlier lease had pinned kept the old host key, so a long-lived cloud peer would refuse the new machine at a reused address. A registration with another host key, or none, now replaces what the process trusted about the target, and a target left with no pin and no keys is an ordinary peer again, sharing its pool. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72c20e9d53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A key whose data was any decodable base64, such as "ssh-ed25519 AAAA", passed as a lease target's host key, so the cloud peer waited out acquire_timeout on a machine no client could trust. The key data is now parsed as SSH's wire format: the type inside must match the declared one, and the fields must be those of ed25519, RSA, NIST ECDSA (with the point on its curve), or their security-key forms, with nothing left over. Strict base64 gives every key one spelling. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5cb66ba648
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
errand no longer reads its private keys back: a key and its public half are written into a directory of their own that is renamed into place, so a reader finds the pair or nothing, and a process that loses the race uses the winner's. The client's lease key and the Lambda cloud peer's key move into such directories; keys in the old places are left alone and new ones are made. Keys are accepted only as OpenSSH host keys: ed25519, NIST ECDSA and RSA with a 1024 to 16384 bit modulus and an odd exponent of at least 3. A test checks the rule against ssh-keygen when it is installed. Each SSH endpoint keeps one connection pool, tagged with the trust it was opened with. When the trust for its target changes, a new pool replaces it and the old one's idle connections close, so trust that rotates with every lease at one address no longer grows the pools. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
The Lambda install check keeps main's private copy of errand_binary and drops its ssh-keygen requirement, since errand makes its SSH keys itself. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea548f0114
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keeps the Lambda catalog from main. The install check needs only ssh, since errand makes its SSH keys itself, and the docs no longer ask for ssh-keygen. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Keeps both sides' lease tests in leases_interrupt_test.go. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
You have reached your Codex usage limits for security reviews. Please try again later. |
… them Narrow the leased-machine admission guarantee to include the offer's allow_users and leave provider-command machines to their operator; say only the Lambda provider installs errand; limit the bounded-output guarantee to the cloud peer's provider and SSH commands; describe max_leases as a cap on new leases and when the Lambda price is checked; note that a restart starts a fresh idle window; and add the target check on acquire that #46 brought. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LXfrreiGwp7WUvn3ubCMTS
* Bring the security policy up to date with cloud leases and Windows SECURITY.md predated cloud peers, the Windows runner and the runner heartbeat. It now describes leases and their owners, what a leased machine admits, how cloud peer secrets and installs are handled, the release rules, the lease-specific accepted limitations, the Windows process scope and batch argument refusal, and that a lost heartbeat never resubmits a job. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LXfrreiGwp7WUvn3ubCMTS * Describe lease admission, limits and target checks as main implements them Narrow the leased-machine admission guarantee to include the offer's allow_users and leave provider-command machines to their operator; say only the Lambda provider installs errand; limit the bounded-output guarantee to the cloud peer's provider and SSH commands; describe max_leases as a cap on new leases and when the Lambda price is checked; note that a restart starts a fresh idle window; and add the target check on acquire that #46 brought. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LXfrreiGwp7WUvn3ubCMTS * Qualify lease revocation, release and lost-runner guarantees A failed EndAll leaves leases until the next request, idle and lifetime rules start a release rather than cutting access, Lambda release also accepts preempted or vanished instances, and a stalled stream reports the runner's state when it still answers. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LXfrreiGwp7WUvn3ubCMTS * Cover Windows job environment, tailnet capability grants and Lambda gaps List the Windows job environment allowlist, count tailnet capability grants on the lease tag among those a Lambda machine admits, say that admitted callers have root on Lambda machines, and describe two gaps as they are on main: the tailnet auth key is removed only after the runner starts, and configured Lambda offers have no price cap. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LXfrreiGwp7WUvn3ubCMTS * Keep lease guarantees to what the cloud peer enforces Say that whether to lease is the client's choice, scope the archive guarantee to what it carries, drop the Lambda release-confirmation detail that docs/CLOUD.md owns, qualify the spending limits, limit the root note to callers that can run jobs, and say unknown state is reported whenever the runner returns none. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LXfrreiGwp7WUvn3ubCMTS --------- Co-authored-by: Claude <[email protected]>
Before: a provider command could return a target no client can use (both
urlandssh, a non-HTTP URL, a bad SSH name, a malformedhost_key). The cloud peer accepted it and kept the machine untilacquire_timeout. A target withsshbut nohost_keynever offered the client's errand key, so a machine that only admits that key turned the client away. Starting any lease neededssh-keygenon the client, even for a URL-only lease. An SSH connection opened to a host before its lease host key was pinned could be reused for the lease. A.pubrebuilt without theerrandcomment counted as a different key, which hid ready leases from that device. A device let into a lease by name could be shown a short peer name that another lease also matched.After: the cloud peer checks the target as soon as acquire exits, using the same rules as configured peers and clients. A bad target fails the launch with
provider target: ..., and the machine is released right away. Clients offer their lease key to every SSH lease target. If the host key is pinned, only that key is offered. If it isn't, the key is offered alongside the user's own keys andknown_hostsapplies. errand makes its own ed25519 keys (the client lease key and the Lambda host key), so neither the client nor the cloud peer needsssh-keygen. Clients and the cloud peer compare SSH keys by type and data only. A device let into a lease by name gets a name that is unambiguous among all of the cloud peer's leases.How: a new
proto.CheckPeerTransportholds the url/ssh/remote_command/remote_socket rules, andconfig.PeerURLuses it.LeaseTarget.Checkbuilds on it and adds the host key rules. The broker'scheckTargetand the client'sleaseTargetPeerboth callCheck.proto.SSHKeyBody/SameSSHKeyreplacecloud.ValidSSHPublicKey, the Lambda provider'ssshKeyBodyand the client's host key parsing. They accept only keys OpenSSH loads as host keys: ed25519, NIST ECDSA (point on the curve) and RSA (1024 to 16384 bit modulus, odd exponent of at least 3). This is a check of form, not a cryptographic audit, and a test compares it withssh-keygenwhen that is installed. EachTrustSSHHostregistration replaces what an earlier one said about its target, and it now accepts an identity without a host key. The SSH round tripper keeps one pool per endpoint, tagged with the trust it was opened under. When that trust changes, a new pool replaces the old one, whose idle connections close. Ordinary SSH peers have no trust entry, so their pool never changes, at the cost of one extra map lookup per request.client.NewSSHKeywrites OpenSSH's unencrypted key format with the Go standard library. A key and its.pubare written into a directory of their own that is renamed into place whole, so errand never reads private keys back. The client's lease key and the Lambda cloud peer's key move into such directories (ssh/lease/andlambda/key/under the state directory). A key in the old place is left alone, and a new one is made and admitted on first use.Closes items in #33: Lease identity dropped without a host key; Invalid provider targets accepted; Lease setup needs ssh-keygen; SSH transport pool ignores pinned trust; SSH keys compared with their comments; An admitted lease peer can get a too-short name.
🤖 Generated with Claude Code
https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
Generated by Claude Code
Generated by Claude Code