Skip to content

[V3.1.3 Backport] fix(bnf,schema): harmonize SecurityQueryFilter and add FILTERLIST#610

Open
sebbader-sap wants to merge 2 commits into
IDTA-01001-3-1-3_workingfrom
backport/v3.1.3/pr579-security-query-filter
Open

[V3.1.3 Backport] fix(bnf,schema): harmonize SecurityQueryFilter and add FILTERLIST#610
sebbader-sap wants to merge 2 commits into
IDTA-01001-3-1-3_workingfrom
backport/v3.1.3/pr579-security-query-filter

Conversation

@sebbader-sap
Copy link
Copy Markdown
Contributor

Backport from PR #579

This is a backport of the bugfix from PR #579 to the V3.1.3 release branch.

Original PR Description

This PR addresses incompatibilities between the API and Security specifications regarding SecurityQueryFilter and the missing FILTERLIST construct.

Core Problem: The API and Security specs defined SecurityQueryFilter differently, making them syntactically incompatible. Additionally, the API grammar lacked FILTERLIST entirely.

Solution: The Security spec's definition is adopted as canonical. The PR rewrites <SecurityQueryFilter> to use "FRAGMENT:" <FieldIdentifierFragment> instead of <FragmentObject>, adds FILTERLIST support to <AccessPermissionRule>, and ports the <FieldIdentifierFragment> production family from the security spec.

Changes

  • BNF: Harmonized filter definitions; added optional FILTERLIST block
  • JSON Schema: New FragmentFieldIdentifier definition with regex validation

Related

The API and Security specs gave two incompatible definitions for
SecurityQueryFilter, and the API grammar lacked FILTERLIST entirely.

BNF (partials/bnf/grammar.bnf):
- <SecurityQueryFilter> now uses "FRAGMENT:" <FieldIdentifierFragment>
  instead of <FragmentObject>, aligning with aas-specs-security.
- <AccessPermissionRule> now accepts an optional FILTERLIST block.
- Added the <FieldIdentifierFragment> production family (AAS, SM, SME,
  CD, AAS Descriptor, SM Descriptor) together with the supporting
  *Fragment clauses (SpecificAssetIds, SemanticId, Reference, Endpoint,
  SmDescriptor).

JSON Schema (partials/query-json-schema.json and pages/schema.adoc):
- Added FragmentFieldIdentifier definition (regex sibling of
  modelStringPattern, restricted to fragment-legal fields).
- SecurityQueryFilter.FRAGMENT now $refs FragmentFieldIdentifier
  (was: plain string).
- AccessPermissionRule gains FILTERLIST (array of SecurityQueryFilter).

Refs: Review Finding T-02
Made-with: Cursor
},
"FragmentFieldIdentifier": {
"type": "string",
"pattern": "^(?:\\$aas#(?:idShort|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.specificAssetIds\\[[0-9]*\\](?:\\.externalSubjectId(?:\\.keys\\[[0-9]*\\])?)?|submodels\\[[0-9]*\\](?:\\.keys\\[[0-9]*\\])?)|\\$sm#(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|id)|\\$sme(?:\\.[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?(?:\\[[0-9]*\\])*(?:\\.[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?(?:\\[[0-9]*\\])*)*)?(?:#(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|value|valueType|language))?|\\$cd#idShort|\\$aasdesc#(?:idShort|description|displayName|extension|administration|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\](?:\\.externalSubjectId(?:\\.keys\\[[0-9]*\\])?)?|endpoints\\[[0-9]*\\]|submodelDescriptors\\[[0-9]*\\](?:\\.(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|endpoints\\[[0-9]*\\]))?)|\\$smdesc#(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|endpoints\\[[0-9]*\\]))$"
"$ref": "#/definitions/SecurityQueryFilter",
"additionalProperties": false
},
"FILTERLIST": {
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