pomerium/pkg/policy/parser/schema.json
Caleb Doxsey e138054cb9
Pomerium Policy Language (#2202)
* policy: add parser and generator for Pomerium Policy Language

* add criteria

* add additional criteria
2021-05-17 15:30:51 -06:00

45 lines
1,021 B
JSON

{
"$ref": "#/definitions/policy",
"definitions": {
"policy": {
"anyOf": [
{ "$ref": "#/definitions/rules" },
{
"type": "array",
"items": { "$ref": "#/definitions/rules" }
}
]
},
"rules": {
"type": "object",
"properties": {
"allow": { "$ref": "#/definitions/rule_body" },
"deny": { "$ref": "#/definitions/rule_body" }
}
},
"rule_body": {
"type": "object",
"properties": {
"and": {
"type": "array",
"items": { "$ref": "#/definitions/criteria" }
},
"not": {
"type": "array",
"items": { "$ref": "#/definitions/criteria" }
},
"or": {
"type": "array",
"items": { "$ref": "#/definitions/criteria" }
}
},
"additionalProperties": false
},
"criteria": {
"type": "object",
"additionalProperties": true,
"minProperties": 1,
"maxProperties": 1
}
}
}