Skip to content

Commit 9def0c3

Browse files
author
tradel
committed
more test files for event parsing
1 parent 7b9e497 commit 9def0c3

File tree

2 files changed

+251
-0
lines changed

2 files changed

+251
-0
lines changed

tests/data/event_v2_no_user.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"id": "26b10ef2-d31d-4ac1-bafa-7ee25da01722",
3+
"org_id": "c121d8d8-f319-498c-b107-480be7cf5fea",
4+
"org_name": "",
5+
"severity": "INFO",
6+
"action": "Authorized",
7+
"type": "Access",
8+
"sub_type": "Resource",
9+
"message": "Authorized",
10+
"result": "",
11+
"created_at": 1602206351114,
12+
"user_principal": {
13+
"device": {
14+
"id": "55e59806-8b8c-4d82-8f64-4326da073784",
15+
"friendly_name": "",
16+
"mac_address": "",
17+
"serial_number": "C02C40NTMD6M",
18+
"unregistered": false,
19+
"compromised_status": "",
20+
"compliance_status": "",
21+
"oem_info": "",
22+
"model": "",
23+
"platform": "",
24+
"ownership": "",
25+
"architecture": "",
26+
"udid": "",
27+
"source": "",
28+
"last_mdm_data_synced_at": 0
29+
},
30+
"client": {
31+
"user_agent": "",
32+
"ip_address": "24.6.80.4:63134"
33+
}
34+
},
35+
"workload_principal": {
36+
"workload_set": {
37+
"container_name": "",
38+
"container_id": "",
39+
"image": "",
40+
"repo": "",
41+
"tag": "",
42+
"labels": "",
43+
"container_ips": "24.6.80.4:63134",
44+
"app_name": "dsrini-edge-plain-web-service.shaobo.bnn"
45+
},
46+
"host": {
47+
"host_ips": "",
48+
"host_name": "",
49+
"cluster_id": "",
50+
"port_map": ""
51+
}
52+
},
53+
"role": [
54+
{
55+
"id": "ba5c9726-c28a-4855-b017-afefb02efc54",
56+
"name": "all-users-role",
57+
"version": "6",
58+
"bound_by": "",
59+
"bound_at": 0
60+
},
61+
{
62+
"id": "88194f7e-f2ea-4a6d-9c7b-f74dff6c9284",
63+
"name": "banyan",
64+
"version": "1",
65+
"bound_by": "",
66+
"bound_at": 0
67+
}
68+
],
69+
"trustscore": {
70+
"id": "C02C40NTMD6M",
71+
"type": "Device",
72+
"timestamp": 1585714986708092970,
73+
"score": 79
74+
},
75+
"service": {
76+
"id": "dsrini-edge-plain-web-service.shaobo.bnn",
77+
"name": "dsrini-edge-plain-web-service.shaobo.bnn",
78+
"type": "",
79+
"version": ""
80+
},
81+
"policy": {
82+
"id": "5992b549-31d4-4506-9755-747a3ccd1003",
83+
"name": "Web.preview",
84+
"version": "5",
85+
"attached_by": "",
86+
"attached_at": 0,
87+
"enabled": false
88+
},
89+
"channel": {
90+
"access_level": {
91+
"resource": "l7resource"
92+
},
93+
"sni_data": {
94+
"name_requested": "dsrini-edge-plain-web-service.dn.bnntest.com",
95+
"name_matched": "dsrini-edge-plain-web-service.dn.bnntest.com"
96+
},
97+
"request_data": {
98+
"protocol": "http",
99+
"type": "GET",
100+
"query_crud_types": "READ",
101+
"query_resources": "/"
102+
}
103+
},
104+
"link": {
105+
"source": {
106+
"container_id": "",
107+
"container_name": "",
108+
"service_id": "",
109+
"service_name": "",
110+
"service_version": "",
111+
"host_name": "",
112+
"ip": "24.6.80.4:63134"
113+
},
114+
"destination": {
115+
"container_id": "",
116+
"container_name": "",
117+
"service_id": "dsrini-edge-plain-web-service.shaobo.bnn",
118+
"service_name": "dsrini-edge-plain-web-service.shaobo.bnn",
119+
"service_version": "",
120+
"host_name": "",
121+
"ip": "10.128.0.25:80",
122+
"port": ""
123+
}
124+
}
125+
}

tests/data/event_v2_null_user.json

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"id": "26b10ef2-d31d-4ac1-bafa-7ee25da01722",
3+
"org_id": "c121d8d8-f319-498c-b107-480be7cf5fea",
4+
"org_name": "",
5+
"severity": "INFO",
6+
"action": "Authorized",
7+
"type": "Access",
8+
"sub_type": "Resource",
9+
"message": "Authorized",
10+
"result": "",
11+
"created_at": 1602206351114,
12+
"user_principal": {
13+
"user": null,
14+
"device": {
15+
"id": "55e59806-8b8c-4d82-8f64-4326da073784",
16+
"friendly_name": "",
17+
"mac_address": "",
18+
"serial_number": "C02C40NTMD6M",
19+
"unregistered": false,
20+
"compromised_status": "",
21+
"compliance_status": "",
22+
"oem_info": "",
23+
"model": "",
24+
"platform": "",
25+
"ownership": "",
26+
"architecture": "",
27+
"udid": "",
28+
"source": "",
29+
"last_mdm_data_synced_at": 0
30+
},
31+
"client": {
32+
"user_agent": "",
33+
"ip_address": "24.6.80.4:63134"
34+
}
35+
},
36+
"workload_principal": {
37+
"workload_set": {
38+
"container_name": "",
39+
"container_id": "",
40+
"image": "",
41+
"repo": "",
42+
"tag": "",
43+
"labels": "",
44+
"container_ips": "24.6.80.4:63134",
45+
"app_name": "dsrini-edge-plain-web-service.shaobo.bnn"
46+
},
47+
"host": {
48+
"host_ips": "",
49+
"host_name": "",
50+
"cluster_id": "",
51+
"port_map": ""
52+
}
53+
},
54+
"role": [
55+
{
56+
"id": "ba5c9726-c28a-4855-b017-afefb02efc54",
57+
"name": "all-users-role",
58+
"version": "6",
59+
"bound_by": "",
60+
"bound_at": 0
61+
},
62+
{
63+
"id": "88194f7e-f2ea-4a6d-9c7b-f74dff6c9284",
64+
"name": "banyan",
65+
"version": "1",
66+
"bound_by": "",
67+
"bound_at": 0
68+
}
69+
],
70+
"trustscore": {
71+
"id": "C02C40NTMD6M",
72+
"type": "Device",
73+
"timestamp": 1585714986708092970,
74+
"score": 79
75+
},
76+
"service": {
77+
"id": "dsrini-edge-plain-web-service.shaobo.bnn",
78+
"name": "dsrini-edge-plain-web-service.shaobo.bnn",
79+
"type": "",
80+
"version": ""
81+
},
82+
"policy": {
83+
"id": "5992b549-31d4-4506-9755-747a3ccd1003",
84+
"name": "Web.preview",
85+
"version": "5",
86+
"attached_by": "",
87+
"attached_at": 0,
88+
"enabled": false
89+
},
90+
"channel": {
91+
"access_level": {
92+
"resource": "l7resource"
93+
},
94+
"sni_data": {
95+
"name_requested": "dsrini-edge-plain-web-service.dn.bnntest.com",
96+
"name_matched": "dsrini-edge-plain-web-service.dn.bnntest.com"
97+
},
98+
"request_data": {
99+
"protocol": "http",
100+
"type": "GET",
101+
"query_crud_types": "READ",
102+
"query_resources": "/"
103+
}
104+
},
105+
"link": {
106+
"source": {
107+
"container_id": "",
108+
"container_name": "",
109+
"service_id": "",
110+
"service_name": "",
111+
"service_version": "",
112+
"host_name": "",
113+
"ip": "24.6.80.4:63134"
114+
},
115+
"destination": {
116+
"container_id": "",
117+
"container_name": "",
118+
"service_id": "dsrini-edge-plain-web-service.shaobo.bnn",
119+
"service_name": "dsrini-edge-plain-web-service.shaobo.bnn",
120+
"service_version": "",
121+
"host_name": "",
122+
"ip": "10.128.0.25:80",
123+
"port": ""
124+
}
125+
}
126+
}

0 commit comments

Comments
 (0)