Repository navigation
[Fusion] Mark deniable selections with synthetic skip variables and node conditions in the planner - #37
Merged
Conversation
…ode conditions in the planner
…tion requirements
…r node still runs
…ration authorization set-once
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.
Ticket: hc-fork-2-jzk.2 (Planner authorization marking)
The planner marks deniable selections so the middleware (jzk.4) can skip denied data per request without re-planning.
HasAuthorizationonFusionOutputFieldDefinition, aFieldDefinitionFlagsbit, so an unprotected field costs one flag check. This is the commit that was reviewed earlier under the retracted jzk.7.@skip(if: $__fusion_auth_N), with variables allocated by the planner in sequence. Type-conditioned selections of one field share a variable.Operation.Authorization(OperationAuthorization) holds thePolicyDescriptorentries per compiled selection. TheIPolicyis pinned at plan time throughIPolicyResolver. Requirements are read from field-levelAuthorizationonly, and composition has already flattened type-level requirements.OperationPlanner.Versiongoes from 2.0.0 to 2.1.0, because protected operations plan differently. The plan JSON shape is unchanged, so there is no schema change.History: the first implementer was lost to a network error, and a second one continued from its uncommitted work.
Verified:
dotnet build src/All.slnx: 0 errors, before the final rebase.mst/policy-v2with [Fusion] Add tests documenting how lookup keys count in the transitive authorization check #36 merged, on net10: Authorization 55/55, Planning 273/273,FusionAuthorizationDirectiveTests7/7.Not verified:
$__fusion_auth_Nvariables before jzk.4, so there is no end-to-end execution.Authorization = nulland no variables by design.Open points from review, all minor and not fixed:
OperationPlannerconstructor defaults the policy resolver to built-ins only, and 13 call sites were left unchanged. This runs against the "no optional parameters to avoid call sites" rule. The planner needs to rule on it.Operation.Authorizationhas an internal setter that the planner assigns after compilation. It is not built once.UnresolvedPolicythat throws at evaluation, with the policy name in the message. jzk.4 must keep that message out of client errors.