Skip to content

Commit a0c00a5

Browse files
committed
add the schema
1 parent 1c7f811 commit a0c00a5

File tree

1 file changed

+185
-0
lines changed

1 file changed

+185
-0
lines changed

004/schema/schema.json

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "http://ail-project.org/ail-example.json",
4+
"type": "object",
5+
"default": {},
6+
"title": "Root Schema",
7+
"required": [
8+
"format",
9+
"version",
10+
"type"
11+
],
12+
"properties": {
13+
"format": {
14+
"type": "string",
15+
"default": "",
16+
"title": "The format Schema",
17+
"examples": [
18+
"ail", "intelmq", "passive-ssh"
19+
]
20+
},
21+
"version": {
22+
"type": "integer",
23+
"default": 1,
24+
"title": "The version Schema",
25+
"examples": [
26+
1
27+
]
28+
},
29+
"type": {
30+
"type": "string",
31+
"default": "item",
32+
"title": "The type Schema",
33+
"examples": [
34+
"item", "event", "screenshot", "username", "cryptocurrency", "pgp-dump", "binary", "misp-object"
35+
]
36+
},
37+
"meta": {
38+
"type": "object",
39+
"default": {},
40+
"title": "The meta Schema",
41+
"required": [
42+
"uuid"
43+
],
44+
"properties": {
45+
"uuid": {
46+
"type": "string",
47+
"default": "",
48+
"title": "The uuid of the item in the payload",
49+
"examples": [
50+
"03c51929-eeab-4d47-9dc0-c667f94c7d2c"
51+
]
52+
},
53+
"uuid_org": {
54+
"type": "string",
55+
"default": "",
56+
"title": "The UUID of the org emitting the message",
57+
"examples": [
58+
"28bc3db3-16da-461c-b20b-b944f4058708"
59+
]
60+
},
61+
"uuid_instance": {
62+
"type": "string",
63+
"default": "",
64+
"title": "The UUID of the instance (sensor) sending the data",
65+
"examples": [
66+
"28bc3db3-16da-461c-b20b-b944f4058708"
67+
]
68+
},
69+
"tags": {
70+
"type": "array",
71+
"default": [],
72+
"title": "List of tags",
73+
"items": {
74+
"type": "string",
75+
"title": "A Schema",
76+
"examples": [
77+
"mails",
78+
"custom_tag1", "custom_tag2"
79+
]
80+
},
81+
"examples": [
82+
["mails",
83+
"custom_tag1", "custom_tag2"
84+
]
85+
]
86+
},
87+
"encoding": {
88+
"type": "string",
89+
"default": "",
90+
"title": "The encoding Schema",
91+
"examples": [
92+
"base64"
93+
]
94+
},
95+
"compress": {
96+
"type": "string",
97+
"default": "",
98+
"title": "The compression used (before encoding)",
99+
"examples": [
100+
"gzip", "bzip2", "lzma"
101+
]
102+
},
103+
"ail:id": {
104+
"type": "string",
105+
"default": "",
106+
"title": "The ail:id. Note that any item with a prefix like in 'prefix:key' is custom to the format. It MAY be freely defined by the formats authors",
107+
"examples": [
108+
"object_id"
109+
]
110+
},
111+
"ail:mime-type": {
112+
"type": "string",
113+
"default": "",
114+
"title": "The ail:mime-type. Note that any item with a prefix like in 'prefix:key' is custom to the format. It MAY be freely defined by the formats authors",
115+
"examples": [
116+
"text/plain"
117+
]
118+
},
119+
"ail:subtype": {
120+
"type": "string",
121+
"default": "",
122+
"title": "The ail:subtype Schema",
123+
"examples": [
124+
"foobar"
125+
]
126+
}
127+
},
128+
"examples": [{
129+
"uuid": "03c51929-eeab-4d47-9dc0-c667f94c7d2c",
130+
"uuid_org": "28bc3db3-16da-461c-b20b-b944f4058708",
131+
"tags": [
132+
"mails",
133+
"custom_tag"
134+
],
135+
"encoding": "base64",
136+
"compress": "gzip",
137+
"ail:id": "object_id",
138+
"ail:mime-type": "text/plain",
139+
"ail:subtype": "foobar"
140+
}]
141+
},
142+
"payload": {
143+
"type": "object",
144+
"default": {},
145+
"title": "The payload Schema",
146+
"required": [
147+
"raw"
148+
],
149+
"properties": {
150+
"raw": {
151+
"type": "string",
152+
"default": "",
153+
"title": "The raw Schema",
154+
"examples": [
155+
"MjhiYzNkYjMtMTZkYS00NjFjLWIyMGItYjk0NGY0MDU4NzA4Cg=="
156+
]
157+
}
158+
},
159+
"examples": [{
160+
"raw": "MjhiYzNkYjMtMTZkYS00NjFjLWIyMGItYjk0NGY0MDU4NzA4Cg=="
161+
}]
162+
}
163+
},
164+
"examples": [{
165+
"format": "ail",
166+
"version": 1,
167+
"type": "item",
168+
"meta": {
169+
"uuid": "03c51929-eeab-4d47-9dc0-c667f94c7d2c",
170+
"uuid_org": "28bc3db3-16da-461c-b20b-b944f4058708",
171+
"tags": [
172+
"mails",
173+
"custom_tag"
174+
],
175+
"encoding": "base64",
176+
"compress": "gzip",
177+
"ail:id": "object_id",
178+
"ail:mime-type": "text/plain",
179+
"ail:subtype": "foobar"
180+
},
181+
"payload": {
182+
"raw": "MjhiYzNkYjMtMTZkYS00NjFjLWIyMGItYjk0NGY0MDU4NzA4Cg=="
183+
}
184+
}]
185+
}

0 commit comments

Comments
 (0)