Skip to content

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

Draft
aorzelskiGH wants to merge 2 commits into
IDTA-01004-3-2_Workingfrom
docs/evaluation-semantics
Draft

docs(access-rules): add normative Evaluation Semantics clause#79
aorzelskiGH wants to merge 2 commits into
IDTA-01004-3-2_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
Comment thread documentation/IDTA-01004/modules/ROOT/pages/access-rule-model.adoc Fixed

=== Filter Combination

* If several applicable ALLOW rules define a `FILTER` on the same `FRAGMENT`, the individual `CONDITION`s are combined with logical OR: the union of matching fragments is exposed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only the case when implementaion supports combined access rules handling. make this more clear

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also explain that multiple filters within a single access rule are handled as a logical AND. Correlating filters across multiple rules are handled as a logical OR.

@Martin187187 Martin187187 self-assigned this Jun 8, 2026
The following situations MUST NOT cause evaluation to fail; instead the referencing rule is classified as *inapplicable* and does not contribute to the ALLOW set:

* a required CLAIM is not present in the access token;
* a cast produces an invalid value (e.g. `dateTime("abc")`);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably too strict. Incorrect casts on FieldIdentifier should not cause the operation to fail. Instead, only the casts that are valid should be applied, and the others should be ignored.


When access rules restrict the result set of a query (see IDTA-01002 `query-language.adoc`), the following order MUST be observed:

1. The query is parsed and validated.
* a required CLAIM is not present in the access token;
* a Descriptor-based FieldIdentifier is used in a non-Registry profile where descriptors are not available.

The following situations MUST produce a *comparison result of `false`*, so the containing formula continues to evaluate normally:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use SHALL

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the containing formula continues to evaluate normally
-> is self explainory

* a cast cannot produce any valid value for the containing comparison, e.g. all values of a FieldIdentifier fail `dateTime(...)` conversion;
* a list-valued FieldIdentifier is evaluated against a comparison operator whose right-hand side is a scalar and no element matches.

The following situations MUST cause the access rule set to be *rejected at load time*; evaluation MUST NOT begin:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to the top

@BirgitBoss
BirgitBoss changed the base branch from IDTA-01004-3-1_Working to IDTA-01004-3-2_Working August 4, 2026 09:45

@Martin187187 Martin187187 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has to be inspected in detail

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.

3 participants