Repository navigation
fix(workcontext): resource owner is an ASCII allowlist; owner-blind readers listed; joint-owner refusal named (r128) - #847
Merged
Conversation
…eaders listed; joint-owner refusal named (r128)
resource_owner_id is now ^[!-)+-~]*$ under max_bytes 512: printable ASCII
other than space and "*". The category-exclusion pattern let invisible and
lookalike characters through (U+034F, U+FE0F, U+3164, U+115F, U+2800, NFD
accents, Cyrillic and fullwidth lookalikes), and Go and Python protovalidate
disagreed on unassigned code points and noncharacters. The vectors live in
workcontext/testdata/resource_owner_vectors.json; Go protovalidate and
Python protovalidate 2.1.0 agree on all 40.
InheritResourceOwner names the reason when only several owners' rows
together cover a scope ("covered only across resource owners ... split it
into one child per owner") instead of "not covered", and documents and
tests that an inherited owner applies to the whole scope: under
[doc:read, doc:write@P], doc:{read,write} becomes doc:{read,write}@p, an
intended fail-closed confinement.
docs/work-context.md lists the owner-blind readers r128 found (the
authority gateway issuer, module-document-store, module-runtime,
saas-sdk-python, the saas-starter accounts adapters) and says exactly what
authority #18 (open) changes: the local issuer refuses owner-naming issue
and delegation requests by name; the gateway issuer stays owner-blind.
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.
Follow-ups to #846 (merged at c1d1430) from security review r128. Its four minors are fixed, applying the maximum-security posture.
Changes
f1 and f2:
resource_owner_idis an ASCII allowlist.^[!-)+-~]*$, withmax_bytes = 512unchanged. It accepts printable ASCII other than space and*.*, not+, because an empty owner means the scope selects no owner. The allowlist needs no empty-string carve-out.workcontext/testdata/resource_owner_vectors.json: 4 accepted and 36 refused.TestResourceOwnerSchemareads them.work_context_pb2, matches on 40 of 40 vectors.buf.validatedescriptor clash, I registered protovalidate's ownvalidate.protothrough a probe shim. Committing that shim to CI would be a workaround.resource_owner_idyet; only test fixtures do (principal-u,principal-owner), and they fit.f3: the reader table in docs/work-context.md is complete.
issuer.go:98-118,state.go:1156);workclaims/claims.go:191-199;installation.go:225andaccounts/authority.go:297;work_context.py:158-163,:322-327and:638-646;f4:
InheritResourceOwnerrefusals and the confined read.[doc:read, doc:write@P]givesdoc:{read,write}@P) is documented as intended fail-closed behaviour. An operation invoked under an owner-scoped capability is confined to that owner's resources, and the operation declares a single scope per kind.Classification
Fix, at the owner of each behaviour: the schema, core's inheritance helper, and core's docs. No hack.
Evidence
make buf-lintis clean.make buf-breaking: no breaking change against origin/main.go build ./...andgo veton workcontext and runnable are ok.go test -race -count=1passes on workcontext, workcontext/conformance, runnable, composition, moduleupdate, policy, policy/testharness and solutionhost.codefly generate protofor both Go and Python. Thebuf.lockbump from the companion's dependency update was reverted.Not verified
🤖 Generated with Claude Code