Repository navigation
fix(core): a module page's roles can be set up and conformance-tested on a payload-serving host - #61
Merged
Conversation
…load can run module_page_roles
module_page_roles delivers a module page whose frontend names no payload. A
host that prepares a page's signed payload before it applies the delivery
refuses that page ("frontend declares no signed payload"), so it could not run
the case at all. Fixture.PagePayload names the payload the delivered page
carries; nil keeps the bare declaration the local authority accepts.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s a solution's ReviewOffer refused every module, so the one Setup UI could not show or grant the roles a module page now declares. It reads a role-gated module (decide.RoleGated) as it reads a solution: the roles, their grants and the installation. Install still refuses a module: composition installs it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
codefly-dev/authority #61 review (head 1417734, base a61acf9)
BlockersNone. Follow-ups (ranked)
Hunt results
VERDICT: merge (nothing widens: the same tenancy check runs before the lookup, and the gaps above are follow-ups) |
…ent tuple Offers lists the module pages that declare roles beside the solutions, so an administrator's Setup reaches them; a page withdrawing its roles leaves the list. Reviewing a module page answers its roles and installation but no consent tuple, since composition installs it and Install refuses a module: the review no longer offers an approval that leads nowhere. Conformance asserts the listing, the administrator's and the role holder's review with no tuple, and the refusal of a member holding no role. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
This follows #59 (a module that declares a page declares roles like a solution). Two gaps stopped a host from adopting that rule.
What changed
module_page_rolesdelivered a module page whose frontend names no payload. A host that prepares a page's signed payload before applying the delivery refuses that page with "frontend declares no signed payload", so the case could not run there at all.Fixture.PagePayloadnames the signed payload the delivered page carries.ReviewOffer. It refused every module ("a module is installed by composition"), so the one Setup UI (<SolutionSetup>) could neither show nor grant a module page's roles.decide.RoleGated) as it reads a solution: its roles, their grants and its installation.Installstill refuses a module, because composition installs it.Classification
Both are fixes at the owning place. The suite now delivers a page that such a host can apply. The core's offer review now follows the core's own role-gating rule.
Tests
authority/module_page_test.go: an administrator reviews the module page's offer and gets its two roles and its installation. The review carries no consent tuple, throughReviewOfferandReviewalike.Installrefuses it, both with no tuple and with a well-formed made-up one.Offerslists it beside the solutions but not the bare store, and refuses a member. Once it is redelivered without roles, the review is refused and the page leavesOffers. The new assertions fail whenconsent.gois reverted (checked).go test ./...,go vetandgofmtare clean in authority-core, conformance, authority-client and the local authority.module_page_roleswith a prepared payload. It is pinned to this branch's head in its own PR.Review
A fresh-context security bug-hunter reviewed head 1417734 and found no blocker (verdict: merge). It confirmed:
PagePayloadis signed fixture data);Its three findings are fixed in f32d30b:
ReviewOfferon the module page.module_page_roles.gonow checks, underReviewOfferNotServedlike the declaration case:ListOfferslists the page;ReviewOfferanswers[installer viewer]and the page's installation to the administrator and to the role holder;ViewerToken, which holds no role there, is refused;Reverting
consent.gofails it ("offers ... do not list conformance-page-module").reviewOffer(consent.go:113) mints the tuple only for a solution, soReviewandReviewOffergive a module page an empty approval.module_page_test.gonow requires that.Offerslisted solutions only.Offers(consent.go:197) now lists solutions and module pages that declare roles, under the same administrator-of-org check, so the Setup list (edge/code/setup.go:243) shows a module page. The localListOfferscomment says so. Core test added.go test ./...,go vetandgofmtare clean in authority-core, conformance and the local authority. Accounts has not run the new assertions yet (module-saas-starter#1282).🤖 Generated with Claude Code