{ "$id": "rule", "title": "rule", "description": "A rule which may belong to an individual policy or a shared rule template", "definitions": { "networkOrGroupReference": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "network", "networkGroup" ] }, "id": { "$ref": "common#/definitions/mongoObjectId" } }, "required": [ "type", "id" ] }, "serviceOrGroupReference": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "service", "serviceGroup" ] }, "id": { "$ref": "common#/definitions/mongoObjectId" } }, "required": [ "type", "id" ] }, "scheduleReference": { "anyOf": [ { "type": "null" }, { "$ref": "common#/definitions/mongoObjectId" } ] } }, "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "policyType": { "$ref": "common#/definitions/policyType" }, "action": { "type": "string", "enum": [ "permit", "deny", "drop" ] }, "sourceNetworks": { "type": "array", "title": "sourceNetworks", "description": "A referenced list of source networks", "items": { "$ref": "#/definitions/networkOrGroupReference" } }, "destinationNetworks": { "type": "array", "title": "destinationNetworks", "description": "A referenced list of destination networks", "items": { "$ref": "#/definitions/networkOrGroupReference" } }, "services": { "type": "array", "title": "services", "description": "A referenced list of services", "items": { "$ref": "#/definitions/serviceOrGroupReference" } }, "schedule": { "$ref": "#/definitions/scheduleReference" }, "logging": { "type": "boolean" }, "enabled": { "type": "boolean" } }, "required": [ "id", "name", "policyType", "action", "sourceNetworks", "destinationNetworks", "services", "logging", "enabled" ], "additionalProperties": true }