Repository navigation
Keep EventLogServer session auth challenges on their connection - #10211
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: d2f8ca7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Read the clock once per Hello and inline the consumed challenge in Authenticate. Behaviour is unchanged: overlapping Hellos still share an unexpired challenge and Authenticate still consumes it before verifying.
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
The clock advances by one time to live only while the challenge bytes are drawn. A Hello whose expiry is anchored before generation then hands out an already-expired challenge, and the immediate Authenticate fails.
Merged
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.
Summary
EventLogServer.layerRpcHandlersstoredHellochallenges in a server-wideCachekeyed by RPC client id, with unbounded capacity. Expiry is lazy, so a client that sentHelloand disconnected withoutAuthenticateleft its challenge retained by the server indefinitely.The pending challenge now lives in the connection's
Rpc.ServerClientannotations, together with its expiry time:Hellostores a challenge on the connection, reusing an unexpired pending one so overlappingHellos share it, as they did with the cache.Authenticatetakes and clears it, and rejects it when it is missing or pastSessionAuthChallengeTimeToLiveMillis.RpcServerdrops a client'sServerClienton disconnect, so the challenge is released with its connection, whichever server the handlers are mounted on.Tests
Authenticate rejects a challenge issued to a disconnected client: a client id that reconnects can no longer authenticate with a challenge issued before the disconnect.Authenticate rejects a challenge older than its time to live: guards the TTL now that it is no longer enforced byCache.Authenticate accepts the challenge from an earlier overlapping Hello: a repeatedHellodoes not invalidate the challenge returned by the first.Closes EFF-3187