Repository navigation
lore-server: an open QUIC storage session asks again before every write - #3
Open
TechArtistG wants to merge 2 commits into
Open
TechArtistG wants to merge 2 commits into
TechArtistG wants to merge 2 commits into
Conversation
A QUIC storage session decided write once, at AuthorizeStart, and kept that answer until its token expired. A session opened before its repository became managed, or before the policy dropped its publisher, kept uploading. The session now keeps its verified token, and every mutating command (put, copy, mutable store, CAS) asks again under the managed-repository policy in force. With no policy configured nothing can change while the server runs, so the answer from the start stands. Refs GenRobo/GRID#3445. Signed-off-by: Geordie Moffatt <geordie.moffatt@generalrobotics.company>
…is a write The managed-repository policy was re-read only when the file's size or modification time changed. A replacement that keeps both (a copy that preserves times, an equal-length edit within the clock's resolution) left a removed publisher able to write for as long as the server ran. The file is small, so the server now reads it at every recheck and compares its contents. A storage Verify with the heal flag rewrites index entries and flushes the bucket, but neither transport asked for write: a read grant could reach it, on a managed repository too. gRPC and QUIC now check write for a healing verify and leave a reporting verify open to readers. Tests: the open-session test swaps in a policy of equal size and modification time (it fails on the old reload), and covers healing and reporting verifies on a session; a gRPC test covers the same three callers. Signed-off-by: Geordie Moffatt <geordie.moffatt@generalrobotics.company>
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.
What changes
GRID uses Lore to store versioned simulation asset packs and limit who can publish changes to them. A publisher who lost permission could still upload through a storage connection they had already opened. This PR checks the current publishing rules before each write on that connection, so removing a publisher takes effect without waiting for their sign-in token to expire.
A QUIC storage session decided once, at
AuthorizeStart, whether it may write, and kept that answer until its token expired. A session opened before its repository became managed, or before the policy dropped its publisher, kept uploading.The session now keeps its verified token. Every mutating command (put, copy, mutable store, CAS) asks again under the managed-repository policy in force. With no policy configured nothing can change while the server runs, so the answer from the start stands. An auth-off server is unchanged.
Tests
quic::storage_service_v4::tests::open_sessions_follow_the_managed_policy_in_forcedrives the real v4 handler with signed test tokens and policy-file changes: a wildcard writer's open session is refused once its repository becomes managed, the listed publisher writes, and both are refused once the policy drops the publisher. With the tests of the two PRs below: 114 passed (Windows, debug).Not run: the same over a real QUIC socket; no existing client sends raw store writes with a token.
Base:
feature/managed-repositories. Third of three. The tree at this head is the one qualified on loopback in GenRobo/GRIDsim/lore/TESTING.md.