mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 00:10:45 +02:00
* policy: add parser and generator for Pomerium Policy Language * add criteria * add additional criteria
45 lines
1,021 B
JSON
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
|
|
}
|
|
}
|
|
}
|