Core-backed shares RPC for sub-store, plus the platform target alias - #52
Merged
Conversation
…lias "Copy this subscription's link" is the primary action of a subscription manager, and the plugin cannot implement it alone: share tokens live in core on purpose — the sandbox boundary keeps them out of plugin reach. So the link crosses the boundary the same way NetGuard's firewall state does: a core-backed service the signed manifest names, dispatched by the gateway under the caller's principal. latticenet.sub-store/shares (v1, method "list") returns, for each share sourced from a sub-store subscription record: subscription_id, share_id, slug, enabled, default_format, expires_at, the serve path, and the absolute URL when the server knows its public base. Other plugins' shares and proxy-user shares never appear. The handler re-checks proxy:admin itself — the scope the REST share API sits behind — so a misdeclared manifest scope list can never widen who reads share URLs. The serve path also accepts ?platform= as upstream's alias for ?target=, normalizing into the same render variant: both spellings share one cache entry, and target wins when both are present. Tested: new contract test (ownership registration, filtering, URL/path shape, denial without proxy:admin, denial without a principal, unknown method) plus platform-alias cache-hit and precedence assertions in the target-parameter test; full internal/server suite green; gofmt/vet clean. Not-tested: the plugin UI consumer (rides in the next sub-store plugin PR, which declares the interface with backing "core").
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.
P-2 server half of SUBSTORE-PARITY.md. latticenet.sub-store/shares list method (core-backed, NetGuard pattern): plugin UI can resolve its records' share URLs without tokens entering the sandbox store; handler independently re-checks proxy:admin. Serve path gains ?platform= as a target alias sharing the same cache variant. Full suite green.