Repository navigation
Login receipts - #107
Closed
plotnick wants to merge 4 commits into
Closed
Login receipts#107plotnick wants to merge 4 commits into
plotnick wants to merge 4 commits into
Conversation
plotnick
force-pushed
the
login-receipts
branch
from
October 27, 2026 23:42
5440903 to
6328e2a
Compare
A voucher's tag now names the role its key serves, so a key vouched for one role can't serve as another. Voucher verification moves from the client to common, behind the verify-vouchers feature. Permslip uses common without that feature, so it doesn't depend on attest-data. Co-authored-by: Claude <noreply@anthropic.com>
A sush server with a vouched key returns a receipt for each challenge login: its signature over the login's credentials, with the chain that vouches for its key. Another server accepts that receipt in place of a fresh nonce if it links to the issuing sled, and adopts the login without gossiping it. The client keeps the receipt with its credentials, and presents it to a sled that refuses a request before asking for a touch. The /iam endpoint now takes an IamRequest and returns an IamResponse. Co-authored-by: Claude <noreply@anthropic.com>
plotnick
force-pushed
the
login-receipts
branch
from
October 28, 2026 01:23
6dd786d to
22ea0b9
Compare
Co-authored-by: Claude <noreply@anthropic.com>
plotnick
force-pushed
the
login-receipts
branch
from
October 28, 2026 02:22
a1f1a82 to
01860a9
Compare
plotnick
marked this pull request as ready for review
October 28, 2026 13:59
Collaborator
Author
|
Superseded by #108. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a YubiKey for authentication, require just one touch per login instead of (up to) one touch per sled per login. Running distributed jobs on Dublin (4 sleds) sometimes required multiple (up to 4) touches. This will matter more as we run on bigger racks (e.g., Dogfood & Colo).
The problem turned out to be a race between client polls and gossiped
IdentityRequest::Loginmessages. It could bite any time the client sent requests to two or more sleds in quick succession, such assush job start -w -T '*'(run a job on every sled and poll for status). If aLoginwas received via gossip before the client request arrived, the credentials were accepted and everything was fine. But if the request arrived first, the server didn't recognize the login, and so returned401, forcing the client to re-authenticate:Before:
sequenceDiagram participant C as Client participant A as Sled A participant B as Sled B C->>A: request A-->>C: 401, nonce Note over C: touch C->>A: login A--)B: gossip login C->>B: request B-->>C: 401, nonce Note over C: touch again C->>B: loginOur solution here is to use login receipts, which are verifiable signatures over login requests. They allow one server to trust credentials that don't match its nonce, but which are accompanied by proof that they did match a peer's. Receipts are signed by a vouched, ephemeral server key, very much like the proxy TLS key already in use. Servers can verify each other's receipts by checking signatures, which means that the user only has to sign a login challenge once:
After:
sequenceDiagram participant C as Client participant A as Sled A participant B as Sled B C->>A: request A-->>C: 401, nonce Note over C: touch C->>A: login A-->>C: receipt C->>B: request B-->>C: 401, nonce C->>B: login, receiptReceipts are never written to disk or gossiped among peers; they are only returned by the
/iamendpoint of the HTTP API, and may optionally be included in a client'sPOSTto the same endpoint. They are not secret or sensitive. They carry complete cert chains, which each server must verify against the platform roots.The constraints that led to this design were:
Receipts as implemented here are a somewhat heavyweight mechanism, with a new server key and a cert chain on every receipt). However, with them we no longer need to gossip logins (6dd786d), and if we were (in a follow-up) to gossip server keys and certs, we could shrink receipts down to just a signature. Signing gossip messages and job output also become possible.