-
Notifications
You must be signed in to change notification settings - Fork 4
/
cosec-policy.schema.json
83 lines (81 loc) · 1.75 KB
/
cosec-policy.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"$schema": "http://json-schema.org/draft-04/schema",
"$id": "https://github.com/Ahoo-Wang/CoSec/blob/main/schema/cosec-policy.schema.json",
"title": "CoSec Policy Schema",
"type": "object",
"properties": {
"id": {
"description": "The id of the policy",
"type": "string"
},
"category": {
"description": "The category of the policy",
"type": "string"
},
"name": {
"description": "The name of the policy",
"type": "string"
},
"description": {
"description": "The description of the policy",
"type": "string"
},
"tenantId": {
"description": "The tenantId of the policy",
"type": "string"
},
"type": {
"description": "The type of the policy",
"$ref": "#/definitions/policyType"
},
"condition": {
"description": "The condition of the policy",
"$ref": "condition.schema.json"
},
"statements": {
"type": "array",
"items": {
"$ref": "#/definitions/statement"
}
}
},
"required": [
"category",
"name",
"description",
"tenantId",
"type",
"statements"
],
"definitions": {
"policyType": {
"enum": [
"global",
"system",
"custom"
]
},
"statement": {
"type": "object",
"properties": {
"name": {
"description": "The name of the Statement",
"type": "string"
},
"effect": {
"$ref": "definitions.schema.json#/definitions/effect",
"default": "allow"
},
"action": {
"$ref": "action.schema.json"
},
"condition": {
"$ref": "condition.schema.json"
}
},
"required": [
"action"
]
}
}
}