A PartitionAccessPolicy under a satellite segment, or with an id other than _Policy, is stored but never applied by the permission fold
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- authorization
Direzione di ricerca
Read PermissionEvaluator.ObserveScopePolicies and StorageAdapterMeshQueryProvider.IsExcludedFromResults, then inspect fix PR #7017 and RuntimeInheritanceBreakingPolicyTest in Graph.Test. The issue describes a deployed production verification and a read-only sweep for existing misplaced policies; done means deployed refusal is observed and every sweep finding is resolved.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
A PartitionAccessPolicy node created at runtime in either of two placements is stored, can be read back by its path, and is never applied by the permission fold:
- a path under a configured satellite segment (for example
{partition}/_Storage/_Policy, or any path containing_Thread,_Activity,_Access,_Comment, … — seeSatelliteTableMapping.Defaults); - any id other than
_Policy(for example{scope}/MyPolicy).
A restricting policy in either placement (for example BreaksInheritance, or a narrowed permission set) therefore has no effect: the inherited grants keep granting. Nothing is logged and the write succeeds, so the author has every reason to believe the restriction is in force. That is a silently wrong access result, hence sev:H.
What it is not: it does not widen any existing grant or bypass an existing policy. The failure is that a new restriction does not take effect.
Root cause
PermissionEvaluator.ObserveScopePolicies reads a partition's runtime policies through a content query:
path:{partition} scope:descendants id:_Policy nodeType:PartitionAccessPolicy
- A content query resolves to one storage table. Without a satellite segment in the query path, that table is
mesh_nodes. Rows placed under a satellite segment live in that segment's own table on Postgres (_Storage→storage,_Thread→threads, …), and the in-memory provider drops them on purpose to mirror Postgres (StorageAdapterMeshQueryProvider.IsExcludedFromResults). So placement 1 is never returned. - The fold also skips any node whose id is not
_Policy. So placement 2 is never considered.
A statically declared policy of the same shape does apply, because static policies are collected straight from the static node providers and never pass through the query. This static/runtime difference is how the defect surfaced (see #7013's review thread).
Fix
#7017 adds PolicyPlacementValidator to the creation chain. On Create it refuses a PartitionAccessPolicy in either placement, and the refusal names the main-node scope where the policy belongs. Pinned by RuntimeInheritanceBreakingPolicyTest (Graph.Test), including a repro on unmodified main and a negative control with the validator unregistered.
What is NOT established
- The fix refuses new writes only. It neither removes nor applies a policy that already exists in either placement. Whether any such row exists on a deployed portal is what the read-only sweep below checks; its result is posted as a comment.
- The sweep runs as one caller and is row-level-security filtered: partitions that caller reads only in part, and partitions it cannot read at all, are not covered. A clean sweep is therefore a floor, not a proof of absence, and the sweep comment states its denominator.
- Paths that reach a policy write other than a generic create (for example an import that bypasses the creation chain) were not audited beyond what the PR states: a move's copy leg and an import's create branch go through the same chain.
Closing condition
sev:H closes on post-roll production verification, not on merge:
- the running portal(s) refuse such a create (the validator's refusal is observed on the deployed image), and
- the sweep for existing misplaced policies is clean, or every finding has been resolved by the owner (moved to the main-node
_Policyscope or deleted).
Fix PR: #7017
- Lingua principale
- C#
- Stelle
- 12
- Fork
- 5
- Merge medio
- 5h 57m
- PR unite (30g)
- 967
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Systemorph/MeshWeaver
-
bug sev:L
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Systemorph/MeshWeaver#7002 ·
I maintainer di solito rispondono entro 1 giorno
-
bug sev:L
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Systemorph/MeshWeaver#7003 ·
I maintainer di solito rispondono entro 1 giorno
-
Terminal NotFound NACK undeliverable to a portal hub whose pod-hub registration was already releasedApertabug sev:L
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Systemorph/MeshWeaver#7001 ·
I maintainer di solito rispondono entro 1 giorno
-
bug sev:H
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Systemorph/MeshWeaver#6989 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area:hosting area:storage bug sev:H
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Systemorph/MeshWeaver#6983 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Systemorph/MeshWeaver
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
KnifeLemon/Filee#363 ·
I maintainer di solito rispondono entro 1 giorno
-
[CI] .trgen-ignore required for several grammars.Forse già presa @kaby76 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
antlr/grammars-v4#5073 ·
I maintainer di solito rispondono entro 1 giorno
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeApertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#2317 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
joinrpg/joinrpg-net#5752 ·
I maintainer di solito rispondono entro 1 giorno