Repository navigation
fix(gitops): deliver explicit owner-aware and installation-owned role scopes - #1167
Merged
Merged
Conversation
…rity A solution's module contract can declare, per role, installation_owned_scopes (core#839): scopes the authority grants only on what the installation owns. gitops.Roles now carries them into the authority document as RoleV1.installation_owned_scopes (field 3, codefly-dev/authority#7), beside scopes, through one workScopes helper. Pins core at core#839's head (75333b54) and authority-client at authority#7's head (1b6d3018); both re-pin after they merge. Core main's ProtobufProcedures now takes the endpoint (core#836), so the contract surface passes it, and the module-contract kit's render supplies the audience slots core main's role fixtures declare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
that referenced
this pull request
Oct 26, 2026
…ence regenerated Re-pins core to v0.19.7-0.20261026023455-8b5ddef6d55a, #843 as merged. That commit also carries core#845 (WorkScopeV1.resource_owner_id) and core#835's module-contract kit fixture roles-grant-bindings. - docs/cli-reference.md: regenerated with `go test ./cmd -run TestCLIReferenceIsCurrent -update-reference` for this branch's new `generate runnables` help text. - The round-trip test exempts WorkScopeV1.resource_owner_id by name: core refuses an operation that declares an owner, so the document has nothing to carry. TestRunnablesRefusesADeclaredResourceOwner proves the refusal reaches `codefly generate runnables` with core's reason. - The module-contract kit's staging composition supplies the audiences roles-grant-bindings resolves (the same line as #1167, so the two merge cleanly). The document-store oracle digest is unchanged (4b72d393...). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core #850 keeps the refusal and now explains owner inheritance. Assert the current named reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin Core's owner-aware module contract and authority main. Carry the explicit boolean in the signed composition declaration and generation fingerprint. Prove real authority person issuance from the delivered solution, including named refusals when absent or false and installation-owned scope bounds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use Core 7c040767 and tidy the dependency checksums after validation. Co-Authored-By: Claude Opus 5.5 <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.
A solution declaring installation-owned role scopes could deliver those scopes but still fail person issuance: its module contract had no way to declare the owner-aware checking required by authority. Carry the explicit
owner_aware: truedeclaration from Core's contract into the signed composition authority document, alongside each role'sinstallation_owned_scopes.Classification: fix at the owning seams. Core owns the contract and strict decoding; CLI owns projection into
AuthorityManifestV1and delivery. Reusesmodulecontract.Load, the existing contract readers, signedCompositionDelivery, generation fingerprint and withdrawal path. No inferred declaration, CLI-side validation, alternate delivery mechanism or generated-file edits. The declaration participates in generation changes; withdrawals read and carry no live declaration.Dependencies and merge order:
7c040767911929cc40bcead3f56e72d435441ea6, pinned asv0.19.7-0.20261026150808-7c0407679119. Merge Core first with a merge commit as coordinated; that preserves this exact pinned head without a merge-commit repin.authority-client/goand test dependencyauthority-core/gonow pin authority main67b85b14a942(v0.0.0-20261026143932-67b85b14a942). Core test: replace real names with generic placeholders #839 and authority impr: convert all CLI main into the Action framework #7 are already merged. Go minimum-version selection also raisesdelivery/goto000d44495d93and addsresources/go, required by the real authority library.The regression delivers an actual contract over the existing gRPC composition test peer, decodes the received authority document, projects it into authority's domain and invokes the real authority-core issuer and verifier. A declared owner-aware solution issues for a person, preserving its installation seal and resource-owner selector; absent and false declarations refuse by name without a token. The delivered installation-owned role scope remains bounded to the installation's resource IDs. The transport peer is controlled; this test does not run authority's deployed composition plugin.
Verification at
9f501cdd8d61d206fae7a0c5510a176aa1e06a04:go vet ./...andgolangci-lint run ./...pass (0 lint issues).owner_awarefield makes the positive issuance test fail withshop does not declare owner-aware checking; the unmodified implementation passes.go test -race ./pkg/gitops ./cmd/run ./cmd/generate ./pkg/gitops/cellfile -count=1passes. Local Git fixtures use native Git; every actual GitHub fetch/push uses the required private helper. CI is green on9f501cdd8d61d206fae7a0c5510a176aa1e06a04: 15 passed, 1 skipped, including full race, coverage and lint.590c2562. Core's full-repository lint baseline has 1,298 uncapped findings, reproduced identically before/after this change.The existing adaptations to Core main remain:
ProtobufProceduresreceives its endpoint; contract-kit tests supply the required audience slots; the runnable-refusal assertion follows Core's current wording.Follow-ups:
Rolesreader still projects literal roles rather thanResolved.Rolesbinding grants; that pre-existing delivery gap is owned by CLI.Not verified locally: full CLI race suite, deployed Kubernetes/native authority plugin, or hosted accounts integration. No PR is merged by this task.