Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions documentation/IDTA-01004/modules/ROOT/pages/changelog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ SPDX-License-Identifier: CC-BY-4.0
Bugfixes:

* removed: TREE
* fix: error in datetime BNF ObjectGroup
* fix: naming inconsistencies inside BNF and json schema (https://github.com/admin-shell-io/aas-specs-api/issues/547)
* fix: aligned BNF and json schema to api spec (https://github.com/admin-shell-io/aas-specs-api/issues/547)

== Changes w.r.t. V3.0.1 vs. V3.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
( "DEFATTRIBUTES" <ws> <StringLiteral> <ws> <AttributeGroup> <ws> )*
( "DEFACLS" <ws> <StringLiteral> <ws> <ACL> <ws> )*
( "DEFOBJECTS" <ws> <StringLiteral> <ws> <ObjectGroup> <ws> )*
( "DEFFORMULAS" <ws> <StringLiteral> <ws> <Condition> <ws> )*
( "DEFFORMULAS" <ws> <StringLiteral> <ws> <logicalExpression> <ws> )*
( <AccessPermissionRule> <ws> )*

<AccessPermissionRule> ::=
Expand All @@ -11,6 +11,5 @@
"OBJECTS:" <ws>
( <SingleObject> <ws> )*
( <UseObjectGroup> <ws> )*
"FORMULA:" <ws>
( <Condition> | <UseFormula> ) <ws>
( "FILTER:" <ws> <FragmentObject> <ws> ( <Condition> | <UseFormula> ) <ws> )?
( ( "FORMULA:" <ws> <logicalExpression> <ws> ) | ( <UseFormula> <ws> ) )
( "FILTER:" <ws> <SecurityQueryFilter> )?
20 changes: 10 additions & 10 deletions documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
( "DEFATTRIBUTES" <ws> <StringLiteral> <ws> <AttributeGroup> <ws> )*
( "DEFACLS" <ws> <StringLiteral> <ws> <ACL> <ws> )*
( "DEFOBJECTS" <ws> <StringLiteral> <ws> <ObjectGroup> <ws> )*
( "DEFFORMULAS" <ws> <StringLiteral> <ws> <Condition> <ws> )*
( "DEFFORMULAS" <ws> <StringLiteral> <ws> <logicalExpression> <ws> )*
( <AccessPermissionRule> <ws> )*

<AccessPermissionRule> ::=
Expand All @@ -11,9 +11,12 @@
"OBJECTS:" <ws>
( <SingleObject> <ws> )*
( <UseObjectGroup> <ws> )*
"FORMULA:" <ws>
( <Condition> | <UseFormula> ) <ws>
( "FILTER:" <ws> <FragmentObject> <ws> ( <Condition> | <UseFormula> ) <ws> )?
( ( "FORMULA:" <ws> <logicalExpression> <ws> ) | ( <UseFormula> <ws> ) )
( "FILTER:" <ws> <SecurityQueryFilter> )?

<SecurityQueryFilter> ::=
<FragmentObject> <ws>
( ( "CONDITION:" <ws> <logicalExpression> <ws> ) | ( <UseFormula> <ws> ) )

<ACL> ::=
"ATTRIBUTES:" <ws>
Expand All @@ -23,7 +26,7 @@
"ACCESS:" <ws> <Access> <ws>

<UseACL> ::=
"USEACLS" <ws> <StringLiteral> <ws>
"USEACL" <ws> <StringLiteral> <ws>

Check warning on line 29 in documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEACL'

<Right> ::=
"CREATE" | "READ" | "UPDATE" | "DELETE" | "EXECUTE" | "VIEW" | "ALL"
Expand Down Expand Up @@ -76,10 +79,7 @@
"USEOBJECTS" <ws> <StringLiteral> <ws>

<UseFormula> ::=
"USEFORMULAS" <ws> <StringLiteral> <ws>

<Condition> ::= <logicalExpression> <ws>

"USEFORMULA" <ws> <StringLiteral> <ws>

Check warning on line 82 in documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEFORMULA'

<logicalExpression> ::= <logicalNestedExpression> | <logicalOrExpression> | <logicalAndExpression> |
<logicalNotExpression> | <matchExpression> | <BoolLiteral> | <castToBool> | <singleComparison>
Expand Down Expand Up @@ -166,7 +166,7 @@

<DateTimeLiteral> ::= <datetime> <ws>
<TimeLiteral> ::= <time> <ws>
<datetime> ::= <date> ( "T" | "" ) <time> ( <timezone> )?
<datetime> ::= <date> ( "T" )? <time> ( <timezone> )?
<date> ::= <year> "-" <month> "-" <day>
<year> ::= <digit> <digit> <digit> <digit>
<month> ::= <digit> <digit>
Expand Down
2 changes: 1 addition & 1 deletion documentation/IDTA-01004/modules/ROOT/partials/bnf/acl.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ACCESS:" <ws> <Access> <ws>

<UseACL> ::=
"USEACLS" <ws> <StringLiteral> <ws>
"USEACL" <ws> <StringLiteral> <ws>

Check warning on line 9 in documentation/IDTA-01004/modules/ROOT/partials/bnf/acl.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEACL'

<Right> ::=
"CREATE" | "READ" | "UPDATE" | "DELETE" | "EXECUTE" | "VIEW" | "ALL"
Expand Down
10 changes: 4 additions & 6 deletions documentation/IDTA-01004/modules/ROOT/partials/bnf/formulas.bnf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<UseFormula> ::=
"USEFORMULAS" <ws> <StringLiteral> <ws>

<Condition> ::= <logicalExpression> <ws>
"USEFORMULA" <ws> <StringLiteral> <ws>

Check warning on line 2 in documentation/IDTA-01004/modules/ROOT/partials/bnf/formulas.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEFORMULA'

<logicalExpression> ::= <logicalNestedExpression> | <logicalOrExpression> | <logicalAndExpression> |
<logicalNotExpression> | <matchExpression> | <BoolLiteral> | <castToBool> | <singleComparison>
Expand All @@ -28,8 +26,8 @@

<numericalComparison> ::=
( <numericalOperand> <ws> <allComparisons> <ws> <numericalOperand> <ws> ) |
( <numericalOperand> <ws> <allComparisons> <ws> <FieldIdentifierString> <ws> ) |
( <FieldIdentifierString> <ws> <allComparisons> <ws> <numericalOperand> <ws> )
( <numericalOperand> <ws> <allComparisons> <ws> <FieldIdentifier> <ws> ) |
( <FieldIdentifier> <ws> <allComparisons> <ws> <numericalOperand> <ws> )

<hexComparison> ::=
<hexOperand> <ws> <allComparisons> <ws> <hexOperand> <ws>
Expand All @@ -49,7 +47,7 @@
<operand> ::= <stringOperand> | <numericalOperand> | <hexOperand> | <boolOperand> | <dateTimeOperand> | <timeOperand>

<stringOperand> ::=
<FieldIdentifierString> | <StringLiteral> | <castToString> | <SingleAttribute>
<FieldIdentifier> | <StringLiteral> | <castToString> | <SingleAttribute>

<numericalOperand> ::=
<NumericalLiteral> | <castToNumerical> | <dateTimeToNum>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ACCESSRULE:
)
FILTER:
FRAGMENT "$aasdesc#specificAssetIds[]"
CONDITION:
$or(
$match(
$aasdesc#specificAssetIds[].name $eq "manufacturerPartId",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
)

ACCESSRULE:
USEACLS "acl1"
USEACL "acl1"

Check warning on line 22 in documentation/IDTA-01004/modules/ROOT/partials/examples/reuse-acl-object-formula.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEACL'
OBJECTS:
USEOBJECTS "Properties"
FORMULA:
USEFORMULAS "allowSubjectGroup1"
USEFORMULA "allowSubjectGroup1"

Check warning on line 25 in documentation/IDTA-01004/modules/ROOT/partials/examples/reuse-acl-object-formula.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEFORMULA'
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Common JSON Schema for AAS Queries and Access Rules",
"description": "This schema contains the AAS Access Rule Language.",
"$ref": "#/definitions/AllAccessPermissionRules",
"definitions": {
"standardString": {
"type": "string",
"pattern": "^(?!\\$).*"
"pattern": "^[A-Za-z0-9/\\*\\[\\]\\(\\) _@#\\\\+\\-\\.,:\\$\\^]+$"
},
"modelStringPattern": {
"type": "string",
"pattern": "^(?:\\$aas#(?:idShort|id|assetInformation\\.assetKind|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.(?:specificAssetIds\\[[0-9]*\\](?:\\.(?:name|value|externalSubjectId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(?:type|value))?)?)?)|submodels\\.(?:type|keys\\[\\d*\\](?:\\.(?:type|value))?))|submodels\\.(type|keys\\[\\d*\\](?:\\.(type|value))?))|(?:\\$sm#(?:semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|id))|(?:\\$sme(?:\\.[a-zA-Z][a-zA-Z0-9_]*\\[[0-9]*\\]?(?:\\.[a-zA-Z][a-zA-Z0-9_]*\\[[0-9]*\\]?)*)?#(?:semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|value|valueType|language))|(?:\\$cd#(?:idShort|id)))|(?:\\$aasdesc#(?:idShort|id|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\]?(?:\\.(name|value|externalSubjectId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?)?)|endpoints\\[[0-9]*\\]\\.(interface|protocolinformation\\.href)|submodelDescriptors\\[[0-9]*\\]\\.(semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|id|endpoints\\[[0-9]*\\]\\.(interface|protocolinformation\\.href))))|(?:\\$smdesc#(?:semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|id|endpoints\\[[0-9]*\\]\\.(interface|protocolinformation\\.href)))$"
"pattern": "^(?:\\$aas#(?:idShort|id|assetInformation\\.assetKind|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.specificAssetIds\\[[0-9]*\\]\\.(?:name|value|externalSubjectId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?)|submodels\\[[0-9]*\\]\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))|\\$sm#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|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(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|value|valueType|language)|\\$cd#(?:idShort|id)|\\$aasdesc#(?:idShort|id|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\]\\.(?:name|value|externalSubjectId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?)|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)|submodelDescriptors\\[[0-9]*\\]\\.(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)))|\\$smdesc#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)))$"
},
"hexLiteralPattern": {
"type": "string",
Expand Down Expand Up @@ -650,56 +651,76 @@
"type": "string"
},
"FILTER": {
"type": "object",
"properties": {
"FRAGMENT": { "type": "string" },
"CONDITION": {
"$ref": "#/definitions/logicalExpression",
"additionalProperties": false
},
"USEFORMULA": { "type": "string" }
},
"oneOf": [
{
"required": ["FRAGMENT", "CONDITION"],
"not": { "required": ["USEFORMULA"] }
},
{
"required": ["FRAGMENT", "USEFORMULA"],
"not": { "required": ["CONDITION"] }
}
],
"$ref": "#/definitions/SecurityQueryFilter",
"additionalProperties": false
}
},
"oneOf": [
"allOf": [
{
"required": [
"ACL"
"oneOf": [
{
"required": [
"ACL"
]
},
{
"required": [
"USEACL"
]
}
]
},
{
"required": [
"USEACL"
]
}
],
"oneOf": [
{
"required": [
"OBJECTS"
"oneOf": [
{
"required": [
"OBJECTS"
]
},
{
"required": [
"USEOBJECTS"
]
}
]
},
{
"required": [
"USEOBJECTS"
"oneOf": [
{
"required": [
"FORMULA"
]
},
{
"required": [
"USEFORMULA"
]
}
]
}
],
"additionalProperties": false
},
"SecurityQueryFilter": {
"type": "object",
"properties": {
"FRAGMENT": {
"type": "string"
},
"CONDITION": {
"$ref": "#/definitions/logicalExpression"
},
"USEFORMULA": {
"type": "string"
}
},
"required": [
"FRAGMENT"
],
"oneOf": [
{
"required": [
"FORMULA"
"CONDITION"
]
},
{
Expand All @@ -709,10 +730,23 @@
}
],
"additionalProperties": false
}
},
"type": "object",
"properties": {
},
"Query": {
"type": "object",
"properties": {
"$select": {
"type": "string",
"pattern": "^id$"
},
"$condition": {
"$ref": "#/definitions/logicalExpression"
}
},
"required": [
"$condition"
],
"additionalProperties": false
},
"AllAccessPermissionRules": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -828,8 +862,5 @@
"additionalProperties": false
}
},
"required": [
"AllAccessPermissionRules"
],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,25 +171,7 @@
"type": "string"
},
"FILTER": {
"type": "object",
"properties": {
"FRAGMENT": { "type": "string" },
"CONDITION": {
"$ref": "#/definitions/logicalExpression",
"additionalProperties": false
},
"USEFORMULA": { "type": "string" }
},
"oneOf": [
{
"required": ["FRAGMENT", "CONDITION"],
"not": { "required": ["USEFORMULA"] }
},
{
"required": ["FRAGMENT", "USEFORMULA"],
"not": { "required": ["CONDITION"] }
}
],
"$ref": "#/definitions/SecurityQueryFilter",
"additionalProperties": false
}
},
Expand Down Expand Up @@ -230,6 +212,36 @@
}
],
"additionalProperties": false
},
"SecurityQueryFilter": {
"type": "object",
"properties": {
"FRAGMENT": {
"type": "string"
},
"CONDITION": {
"$ref": "#/definitions/logicalExpression"
},
"USEFORMULA": {
"type": "string"
}
},
"required": [
"FRAGMENT"
],
"oneOf": [
{
"required": [
"CONDITION"
]
},
{
"required": [
"USEFORMULA"
]
}
],
"additionalProperties": false
}
},
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"definitions": {
"standardString": {
"type": "string",
"pattern": "^(?!\\$).*"
"pattern": "^[A-Za-z0-9/\\*\\[\\]\\(\\) _@#\\\\+\\-\\.,:\\$\\^]+$"
},
"modelStringPattern": {
"type": "string",
"pattern": "^(?:\\$aas#(?:idShort|id|assetInformation\\.assetKind|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.(?:specificAssetIds\\[[0-9]*\\](?:\\.(?:name|value|externalSubjectId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(?:type|value))?)?)?)|submodels\\.(?:type|keys\\[\\d*\\](?:\\.(?:type|value))?))|submodels\\.(type|keys\\[\\d*\\](?:\\.(type|value))?))|(?:\\$sm#(?:semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|id))|(?:\\$sme(?:\\.[a-zA-Z][a-zA-Z0-9_]*\\[[0-9]*\\]?(?:\\.[a-zA-Z][a-zA-Z0-9_]*\\[[0-9]*\\]?)*)?#(?:semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|value|valueType|language))|(?:\\$cd#(?:idShort|id)))|(?:\\$aasdesc#(?:idShort|id|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\]?(?:\\.(name|value|externalSubjectId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?)?)|endpoints\\[[0-9]*\\]\\.(interface|protocolinformation\\.href)|submodelDescriptors\\[[0-9]*\\]\\.(semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|id|endpoints\\[[0-9]*\\]\\.(interface|protocolinformation\\.href))))|(?:\\$smdesc#(?:semanticId(?:\\.type|\\.keys\\[\\d*\\](?:\\.(type|value))?)?|idShort|id|endpoints\\[[0-9]*\\]\\.(interface|protocolinformation\\.href)))$"
"pattern": "^(?:\\$aas#(?:idShort|id|assetInformation\\.assetKind|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.specificAssetIds\\[[0-9]*\\]\\.(?:name|value|externalSubjectId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?)|submodels\\[[0-9]*\\]\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))|\\$sm#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|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(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|value|valueType|language)|\\$cd#(?:idShort|id)|\\$aasdesc#(?:idShort|id|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\]\\.(?:name|value|externalSubjectId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?)|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)|submodelDescriptors\\[[0-9]*\\]\\.(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)))|\\$smdesc#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)))$"

Check warning on line 9 in documentation/IDTA-01004/modules/ROOT/partials/json/formulas-and-logical-expressions.json

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'smdesc'

Check warning on line 9 in documentation/IDTA-01004/modules/ROOT/partials/json/formulas-and-logical-expressions.json

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'aasdesc'

Check warning on line 9 in documentation/IDTA-01004/modules/ROOT/partials/json/formulas-and-logical-expressions.json

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'protocolinformation'
},
"hexLiteralPattern": {
"type": "string",
Expand Down Expand Up @@ -476,3 +477,4 @@
"additionalProperties": false
}
}
}
Loading