-
Notifications
You must be signed in to change notification settings - Fork 5
/
cosec-app-permission.schema.json
85 lines (83 loc) · 1.91 KB
/
cosec-app-permission.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
82
83
{
"$schema": "http://json-schema.org/draft-04/schema",
"$id": "https://github.com/Ahoo-Wang/CoSec/blob/main/schema/cosec-app-permission.schema.json",
"title": "CoSec App Permission Schema",
"type": "object",
"properties": {
"id": {
"description": "The id of the app permission",
"type": "string"
},
"condition": {
"description": "The condition of the app permission",
"$ref": "condition.schema.json"
},
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/permissionGroup"
}
}
},
"required": [
"id",
"groups"
],
"definitions": {
"permissionGroup": {
"type": "object",
"properties": {
"name": {
"description": "The name of the permission group",
"type": "string"
},
"description": {
"description": "The description of permission group",
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/permission"
}
}
},
"required": [
"name",
"permissions"
]
},
"permission": {
"type": "object",
"properties": {
"id": {
"description": "The id of the permission",
"type": "string"
},
"name": {
"description": "The name of the permission",
"type": "string"
},
"description": {
"description": "The description of the permission",
"type": "string"
},
"effect": {
"$ref": "definitions.schema.json#/definitions/effect",
"default": "allow"
},
"action": {
"$ref": "action.schema.json"
},
"condition": {
"$ref": "condition.schema.json"
}
},
"required": [
"id",
"name",
"action"
]
}
}
}