RFC: Scoped grants in trustedProducts - #454
Open
filvecchiato wants to merge 3 commits into
Open
Conversation
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.
RFC: Scoped grants in
trustedProductsSummary
Grantedwidens from the singleallwildcard toall | storage | context.storagepre-approves read-only access to the granting product's host-local storage;contextpre-approves reading its account and the identity that follows from it;allstays the unenumerated wildcard covering every mediated interaction, present and future.trustedProductskeeps its existingRecord<string, Granted[]>shape — the values were already an array — so a publisher pre-approves a scope list per product rather than choosing between everything and nothing. Additive: no$vbump, no migration, and the existing ignore-unrecognised-values rule means a Host that implements onlyalldegrades a scoped grant to a prompt.Checklist
docs/rfcs/<slug>.md(no number — CI assigns one on merge)rust/crates/truapi/— n/a: the manifest is a dotNS-published document with no counterpart in the truapi crate, socheck-rfcwill be red on this PR and needs overriding at mergerfcMotivation
allresolves against the complete set of cross-product interactions the Host mediates at the moment the grant is used, so it also covers interactions added after the manifest was published. That is the right default for a product's own companion apps and the wrong one for everything else.A wallet that wants a portfolio tracker to read its holdings has to grant
all, which also pre-approves every account and signing interaction the Host mediates now or later. The publisher's actual intent — "read my stored data, prompt for anything else" — is not expressible. The result is not a missing feature but a pressure to over-grant:allis the only value, soallis what gets published.RFC — Product Manifest Format already reserves this change in its Future Directions, and the array shape is already in place, so the narrower values need no new field and no schema-version bump.
Contents
docs/rfcs/granted-scopes.md— the RFC.docs/rfcs/product-manifest.md— the normative type, the Values bullet, and the Future Directions entry that reserved this change.docs/design/product-manifest.md— the host implementation guide's restatement of the type, a worked scoped example, and the corner-case table.Open questions carried in the RFC
contextthe right name for account-and-identity reads?accountsays it more directly, andcontextsits awkwardly beside thecontextparameter RFC 0020 removed fromcreate_transaction.storageget a write counterpart here, rather than leaving writes reachable only throughall?