Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ include::partial$examples/allow-read-complete-api.json[]
include::partial$examples/allow-read-list-semanticids.json[]
----

== Allow READ access for Anonymous to submodels only if machine not-running

[source,json,linenums]
----
include::partial$examples/allow-read-list-semanticids-machinestate.json[]
----

== Allow READ and UPDATE for specific authenticated users

[source,json,linenums]
Expand Down Expand Up @@ -74,3 +81,10 @@ include::partial$examples/allow-read-submodels-id-pattern.json[]
----
include::partial$examples/filter.json[]
----

== Allow only to add elements to the CertificateSet in any Submodel

[source,json,linenums]
----
include::partial$examples/allow-create-only-specific.json[]
----
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ include::partial$examples/allow-read-complete-api.bnf[]
include::partial$examples/allow-read-list-semanticids.bnf[]
----

== Allow READ access for Anonymous to submodels only if machine not-running

[source,bnf,linenums]
----
include::partial$examples/allow-read-list-semanticids-machinestate.bnf[]
----

== Allow READ and UPDATE for specific authenticated users

[source,bnf,linenums]
Expand Down Expand Up @@ -69,6 +76,13 @@ include::partial$examples/allow-read-all-users-of-company-for-submodel.bnf[]
include::partial$examples/allow-read-submodels-id-pattern.bnf[]
----

== Allow only to add elements to the CertificateSet in any Submodel

[source,bnf,linenums]
----
include::partial$examples/allow-create-only-specific.bnf[]
----

== Example with FILTER statement

[source,bnf,linenums]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ACCESSRULE:

Check warning on line 1 in documentation/IDTA-01004/modules/ROOT/partials/examples/allow-create-only-specific.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'ACCESSRULE'

Check warning

Code scanning / QDJVMC

Typo Warning documentation

Typo: In word 'ACCESSRULE'
ATTRIBUTES:
CLAIM("Role")
RIGHTS: CREATE
ACCESS: ALLOW
OBJECTS:
IDENTIFIABLE $sm("*")
FORMULA:
$and(
CLAIM("Role") $eq "person with legitimate interest",
$sme#semanticId $eq "CertificateSet"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"AllAccessPermissionRules": {
"rules": [
{
"ACL": {
"ATTRIBUTES": [
{
"CLAIM": "Role"
}
],
"RIGHTS": [
"READ"
],
"ACCESS": "ALLOW"
},
"OBJECTS": [
{
"IDENTIFIABLE": "$sm(\"*\")"
}
],
"FORMULA": {
"$and": [
{
"$eq": [
{
"CLAIM": "Role"
},
{
"$strVal": "person with legitimate interest"
}
]
},
{
"$eq": [
{
"$field": "$sme#semanticId"
},
{
"$strVal": "CertificateSet"
}
]
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ACCESSRULE:

Check warning on line 1 in documentation/IDTA-01004/modules/ROOT/partials/examples/allow-read-list-semanticids-machinestate.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'ACCESSRULE'

Check warning

Code scanning / QDJVMC

Typo Warning documentation

Typo: In word 'ACCESSRULE'
ATTRIBUTES:
GLOBAL(ANONYMOUS)
RIGHTS: READ
ACCESS: ALLOW
OBJECTS:
ROUTE "*"
FORMULA:
$and(
REFERENCE($sme("SubmodelID-OperationalData").machineState#value) $eq "not-running",
$or(
$sm#semanticId $eq "SemanticID-Nameplate",
Copy link
Contributor

Choose a reason for hiding this comment

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

semanticId examples do not fit to "not-running", should be operational data

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$sm#semanticId $eq "SemanticID-Nameplate",
$sm#semanticId $eq "SemanticID-OperationalData",

$sm#semanticId $eq "SemanticID-TechnicalData"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$sm#semanticId $eq "SemanticID-TechnicalData"
$sm#semanticId $eq "SemanticID-PerformanceData"

)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"AllAccessPermissionRules": {
"rules": [
{
"ACL": {
"ATTRIBUTES": [
{
"GLOBAL": "ANONYMOUS"
}
],
"RIGHTS": [
"READ"
],
"ACCESS": "ALLOW"
},
"OBJECTS": [
{
"ROUTE": "*"
}
],
"FORMULA": {
"$and": [
{
"$eq": [
{
"REFERENCE": {
"$sme(\"SubmodelID-OperationalData\").machineState#value"
}
},
{
"$strVal": "not-running"
}
]
},
{
"$or": [
{
"$eq": [
{
"$field": "$sm#semanticId"
},
{
"$strVal": "SemanticID-Nameplate"
}
]
},
{
"$eq": [
{
"$field": "$sm#semanticId"
},
{
"$strVal": "SemanticID-TechnicalData"
}
]
}
]
}
]
}
}
]
}
}
Loading