Conditions
Attribute checks that narrow when a permission block applies.
Conditions let a permission block apply only when entity, resource, or request context fields match expected values.
They are useful for rules such as:
Shape
Conditions are a flat JSON object:
All fields must match exactly. Empty {} means there are no extra conditions.
Supported Paths
| Prefix | Meaning |
|---|---|
entity.attributes.* | Attribute on the subject entity. |
resource.attributes.* | Attribute on the protected resource. |
context.* | Extra context supplied by the caller. |
Example
If meter-001 has site = plant-a, it can publish. If it has site = plant-b, this block does not match.
Conditions narrow access. They do not grant anything unless the permission block also covers the requested action and object.