Skip to content

docs(access-rules): add normative Evaluation Semantics clause#79

Open
aorzelskiGH wants to merge 1 commit into
IDTA-01004-3-1_Workingfrom
docs/evaluation-semantics
Open

docs(access-rules): add normative Evaluation Semantics clause#79
aorzelskiGH wants to merge 1 commit into
IDTA-01004-3-1_Workingfrom
docs/evaluation-semantics

Conversation

@aorzelskiGH
Copy link
Copy Markdown
Contributor

Summary

Add a normative Evaluation Semantics clause to access-rule-model.adoc so that rule combination, error cases and filter combination behave deterministically across implementations.

Problem

The current specification describes the syntax of access rules in detail, but leaves several evaluation questions implicit:

  • how are multiple matching rules combined?
  • what happens if a CLAIM is missing, a cast fails, or a FieldIdentifier does not resolve on the target?
  • how must FILTER / FILTERLIST be combined across matching rules?
  • how do access rules interact with the Query Language (IDTA-01002)?

Without normative rules, implementations diverge (fail-open vs. fail-closed vs. error), blocking conformance testing.

Solution

Introduce Evaluation Semantics (normative) covering:

  • Rule combination: permit-overrides; DISABLED rules are ignored; applicability requires OBJECT/RIGHT/field resolution plus a FORMULA = true.
  • Error handling: missing CLAIM, failing cast or Descriptor FieldIdentifier in a non-Registry profile => rule is "not applicable"; unresolved FieldIdentifier inside a comparison => false; unresolved USEACL/USEOBJECTS/USEFORMULA/USEATTRIBUTES or schema-invalid document => reject at load time.
  • Filter combination: same-FRAGMENT FILTERs across ALLOW rules are OR-combined; different-FRAGMENT FILTERs are applied independently; empty FILTERLIST equals no filter.
  • Interaction with Query Language: fixed pipeline (parse -> candidates -> rules -> FILTER/FILTERLIST); implementations may optimise as long as the outcome is preserved.

Affected files

  • documentation/IDTA-01004/modules/ROOT/pages/access-rule-model.adoc

Review notes

Refs: Review Finding T-15

Specify how the Access Rule Model MUST be evaluated so that
implementations behave deterministically:

- Rule combination
    permit-overrides; DISABLED rules are ignored at enforcement;
    applicability requires OBJECT/RIGHT/field resolution plus a
    FORMULA evaluating to true; no applicable ALLOW => deny.
- Error handling
    missing CLAIM, failing cast, or Descriptor-based FieldIdentifier
    in a non-Registry profile => rule is "not applicable" (neither
    grants nor denies, MUST NOT fail evaluation);
    unresolvable FieldIdentifier inside a comparison => false;
    unresolved USEACL/USEOBJECTS/USEFORMULA/USEATTRIBUTES or
    schema-invalid document => reject at load time.
- Filter combination
    FILTERs on the same FRAGMENT across applicable ALLOW rules are
    OR-combined; FILTERs on different FRAGMENTs are applied
    independently; empty FILTERLIST is equivalent to no filter;
    absence of FILTER/FILTERLIST exposes the full matched object.
- Interaction with the Query Language
    fixed order (parse -> candidate set -> apply rules -> apply
    FILTER/FILTERLIST); implementations may optimise as long as the
    observable outcome is preserved.

Refs: Review Finding T-15
Made-with: Cursor

* a required CLAIM is not present in the access token;
* a cast produces an invalid value (e.g. `dateTime("abc")`);
* a Descriptor-based FieldIdentifier is used in a non-Registry profile (see xref:#descriptor-applicability[Descriptor FieldIdentifier Applicability]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants