[V3.1.3 Backport] fix(bnf,schema): harmonize SecurityQueryFilter and add FILTERLIST#610
Open
sebbader-sap wants to merge 2 commits into
Open
Conversation
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": { |
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.
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
SecurityQueryFilterand the missingFILTERLISTconstruct.Core Problem: The API and Security specs defined
SecurityQueryFilterdifferently, making them syntactically incompatible. Additionally, the API grammar lackedFILTERLISTentirely.Solution: The Security spec's definition is adopted as canonical. The PR rewrites
<SecurityQueryFilter>to use"FRAGMENT:" <FieldIdentifierFragment>instead of<FragmentObject>, addsFILTERLISTsupport to<AccessPermissionRule>, and ports the<FieldIdentifierFragment>production family from the security spec.Changes
FILTERLISTblockFragmentFieldIdentifierdefinition with regex validationRelated