generated from coulomb/repo-seed
Implement canonical schema foundation
This commit is contained in:
33
schemas/policy_fixture.schema.json
Normal file
33
schemas/policy_fixture.schema.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://flex-auth.netkingdom/schemas/policy_fixture.schema.json",
|
||||
"title": "PolicyFixture",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "request", "expect"],
|
||||
"properties": {
|
||||
"id": {"type": "string", "minLength": 1},
|
||||
"request": {"$ref": "https://flex-auth.netkingdom/schemas/check_request.schema.json"},
|
||||
"expect": {"$ref": "#/$defs/decision_expectation"},
|
||||
"metadata": {"type": "object", "additionalProperties": true}
|
||||
},
|
||||
"$defs": {
|
||||
"decision_expectation": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["effect"],
|
||||
"properties": {
|
||||
"effect": {"enum": ["allow", "deny", "redact", "audit_only", "not_applicable"]},
|
||||
"reason": {"type": "string", "minLength": 1},
|
||||
"obligations": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "https://flex-auth.netkingdom/schemas/decision_envelope.schema.json#/$defs/obligation"}
|
||||
},
|
||||
"conformance_findings": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "https://flex-auth.netkingdom/schemas/caring_access_descriptor.schema.json#/$defs/conformance_finding"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user