-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontextsafe-engagement-v1.schema.json
More file actions
116 lines (116 loc) · 3.38 KB
/
Copy pathcontextsafe-engagement-v1.schema.json
File metadata and controls
116 lines (116 loc) · 3.38 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://contextsafe.invalid/schemas/contextsafe-engagement-v1.schema.json",
"title": "ContextSafe non-production engagement contract v1",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"engagement_id",
"partner_profile_id",
"environment",
"allowed_hosts",
"synthetic_namespace",
"owners",
"cleanup",
"valid_from",
"review_by"
],
"properties": {
"schema_version": {"const": "contextsafe.engagement/1.0.0"},
"engagement_id": {"$ref": "#/$defs/id"},
"partner_profile_id": {"$ref": "#/$defs/id"},
"environment": {"$ref": "#/$defs/environment"},
"allowed_hosts": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"uniqueItems": true,
"items": {"$ref": "#/$defs/host"}
},
"synthetic_namespace": {"$ref": "#/$defs/namespace"},
"owners": {"$ref": "#/$defs/owners"},
"cleanup": {"$ref": "#/$defs/cleanup"},
"valid_from": {"$ref": "#/$defs/date"},
"review_by": {"$ref": "#/$defs/date"}
},
"$defs": {
"id": {"type": "string", "pattern": "^[A-Z][A-Z0-9-]{2,63}$"},
"safe_token": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9][A-Za-z0-9:/_.-]{0,127}$"
},
"date": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"host": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"pattern": "^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)(\\.([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?))*$",
"not": {
"pattern": "^(0x[0-9a-f]+|0[0-7]*|[0-9]+)(\\.(0x[0-9a-f]+|0[0-7]*|[0-9]+)){0,3}$"
}
},
"environment": {
"type": "object",
"additionalProperties": false,
"required": [
"classification",
"name",
"non_production_attested",
"production_access_prohibited"
],
"properties": {
"classification": {"enum": ["sandbox", "staging", "test"]},
"name": {"$ref": "#/$defs/safe_token"},
"non_production_attested": {"const": true},
"production_access_prohibited": {"const": true}
}
},
"namespace": {
"type": "object",
"additionalProperties": false,
"required": ["system", "value_prefix"],
"properties": {
"system": {"const": "urn:contextsafe:synthetic"},
"value_prefix": {"const": "CSYN-"}
}
},
"owners": {
"type": "object",
"additionalProperties": false,
"required": [
"technical_owner_id",
"clinical_owner_id",
"privacy_owner_id",
"cleanup_owner_id"
],
"properties": {
"technical_owner_id": {"$ref": "#/$defs/safe_token"},
"clinical_owner_id": {"$ref": "#/$defs/safe_token"},
"privacy_owner_id": {"$ref": "#/$defs/safe_token"},
"cleanup_owner_id": {"$ref": "#/$defs/safe_token"}
}
},
"cleanup": {
"type": "object",
"additionalProperties": false,
"required": ["owner_id", "system_ids", "due_on"],
"properties": {
"owner_id": {"$ref": "#/$defs/safe_token"},
"system_ids": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {"$ref": "#/$defs/id"}
},
"due_on": {"$ref": "#/$defs/date"}
}
}
}
}