Skip to content

feat(access-rules): add supplementalSemanticIds to FieldIdentifier (align with IDTA-01002)#77

Open
aorzelskiGH wants to merge 1 commit into
IDTA-01004-3-1_Workingfrom
feat/supplemental-semantic-ids
Open

feat(access-rules): add supplementalSemanticIds to FieldIdentifier (align with IDTA-01002)#77
aorzelskiGH wants to merge 1 commit into
IDTA-01004-3-1_Workingfrom
feat/supplemental-semantic-ids

Conversation

@aorzelskiGH
Copy link
Copy Markdown
Contributor

Summary

Add supplementalSemanticIds support to the Security Access Rules grammar and JSON Schemas, aligning them with the field identifiers that the API spec (IDTA-01002) already exposes via modelStringPattern.

Problem

The API query language supports scoping by supplementalSemanticIds on $sm, $sme, $aasdesc#submodelDescriptors.* and $smdesc, e.g.:

$sm#supplementalSemanticIds[].keys[0].value $eq "https://example.com/ids/IEC61360"

The corresponding Security Access Rules grammar and JSON Schemas did not include supplementalSemanticIds. Rules that try to gate access on supplemental semantics were therefore formally invalid against the Security schema, even though they would parse against the API query language.

Solution

Extend SemanticIdClause (and its Fragment counterpart) to accept supplementalSemanticIds with an optional index and an optional <ReferenceClause> tail, matching the API's modelStringPattern regex. Widen the Security schema FieldIdentifier / FragmentFieldIdentifier and the FieldIdentifierAAS pattern in formulas-and-logical-expressions.json accordingly.

Affected files

  • documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf
  • documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json
  • documentation/IDTA-01004/modules/ROOT/partials/json/formulas-and-logical-expressions.json
  • documentation/IDTA-01004/modules/ROOT/partials/examples/allow-read-supplemental-semantic-id.bnf (new)
  • documentation/IDTA-01004/modules/ROOT/partials/examples/allow-read-supplemental-semantic-id.json (new)

Review notes

  • Additive change: any previously valid rule remains valid.
  • The regex extensions mirror the API modelStringPattern (IDTA-01002 schema.adoc) to guarantee byte-level cross-spec parity for $sm#, $sme#, $aasdesc#submodelDescriptors.*, $smdesc#.
  • New example demonstrates a rule that allows READ access if any supplementalSemanticId in the submodel references the IEC 61360 concept.

Refs: Review Finding T-05

…ifier

Align the Security Access Rules BNF and JSON Schema with the
supplementalSemanticIds extensions that the API spec already uses in
its modelStringPattern (IDTA-01002 FieldIdentifier).

Previously, the Security grammar allowed only semanticId under
$sm#, $sme#, $aasdesc#submodelDescriptors.* and $smdesc#. Access
rules that want to scope permissions by supplementalSemanticIds were
therefore formally invalid against the Security schema, even though
the API query language supports them.

Changes:

- access-rules.bnf
    <SemanticIdClause> and <SemanticIdClauseFragment> extended to
    accept
        "supplementalSemanticIds" ( "[" [0-9]* "]" )?
            ( "." <ReferenceClause> )?
    in addition to the existing semanticId forms.

- aas-queries-and-access-rules-schema.json
  formulas-and-logical-expressions.json
    FieldIdentifier / FieldIdentifierAAS and FragmentFieldIdentifier
    patterns widened to include supplementalSemanticIds under $sm#,
    $sme#, $aasdesc#submodelDescriptors.*, $smdesc#, mirroring the
    API modelStringPattern.

- new example allow-read-supplemental-semantic-id.(bnf|json)
    demonstrates a rule scoped by supplementalSemanticIds.

Additive change; all previously valid rules stay valid.

Refs: Review Finding T-05
Made-with: Cursor
@@ -0,0 +1,9 @@
ACCESSRULE:
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