tripwire-server 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -13
  3. data/lib/tripwire/server/client.rb +171 -16
  4. data/lib/tripwire/server/crypto_support.rb +49 -0
  5. data/lib/tripwire/server/gate_delivery.rb +298 -0
  6. data/lib/tripwire/server/sealed_token.rb +2 -0
  7. data/lib/tripwire/server/version.rb +1 -1
  8. data/lib/tripwire/server.rb +12 -0
  9. data/spec/README.md +37 -6
  10. data/spec/fixtures/api/fingerprints/detail.json +70 -0
  11. data/spec/fixtures/api/fingerprints/list.json +37 -0
  12. data/spec/fixtures/api/gate/agent-token-verify.json +12 -0
  13. data/spec/fixtures/api/gate/login-session-consume.json +10 -0
  14. data/spec/fixtures/api/gate/login-session-create.json +12 -0
  15. data/spec/fixtures/api/gate/registry-detail.json +45 -0
  16. data/spec/fixtures/api/gate/registry-list.json +47 -0
  17. data/spec/fixtures/api/gate/service-create.json +49 -0
  18. data/spec/fixtures/api/gate/service-detail.json +49 -0
  19. data/spec/fixtures/api/gate/service-disable.json +49 -0
  20. data/spec/fixtures/api/gate/service-update.json +49 -0
  21. data/spec/fixtures/api/gate/services-list.json +51 -0
  22. data/spec/fixtures/api/gate/session-ack.json +10 -0
  23. data/spec/fixtures/api/gate/session-create.json +13 -0
  24. data/spec/fixtures/api/gate/session-poll.json +36 -0
  25. data/spec/fixtures/api/sessions/detail.json +405 -0
  26. data/spec/fixtures/api/sessions/list.json +36 -0
  27. data/spec/fixtures/api/teams/api-key-create.json +21 -0
  28. data/spec/fixtures/api/teams/api-key-list.json +26 -0
  29. data/spec/fixtures/api/teams/api-key-revoke.json +20 -0
  30. data/spec/fixtures/api/teams/api-key-rotate.json +21 -0
  31. data/spec/fixtures/api/teams/team-create.json +14 -0
  32. data/spec/fixtures/api/teams/team-update.json +14 -0
  33. data/spec/fixtures/api/teams/team.json +14 -0
  34. data/spec/fixtures/errors/invalid-api-key.json +3 -3
  35. data/spec/fixtures/errors/missing-api-key.json +2 -2
  36. data/spec/fixtures/errors/not-found.json +4 -4
  37. data/spec/fixtures/errors/validation-error.json +6 -7
  38. data/spec/fixtures/gate-delivery/approved-webhook-payload.valid.json +20 -0
  39. data/spec/fixtures/gate-delivery/delivery-request.json +9 -0
  40. data/spec/fixtures/gate-delivery/env-policy.json +40 -0
  41. data/spec/fixtures/gate-delivery/vector.v1.json +28 -0
  42. data/spec/fixtures/gate-delivery/webhook-signature.json +9 -0
  43. data/spec/fixtures/manifest.json +179 -0
  44. data/spec/fixtures/sealed-token/vector.v1.json +37 -24
  45. data/spec/openapi.json +4905 -779
  46. data/spec/sealed-token.md +36 -17
  47. metadata +36 -14
  48. data/spec/fixtures/public-api/fingerprints/detail.json +0 -40
  49. data/spec/fixtures/public-api/fingerprints/list.json +0 -31
  50. data/spec/fixtures/public-api/sessions/detail.json +0 -47
  51. data/spec/fixtures/public-api/sessions/list.json +0 -33
  52. data/spec/fixtures/public-api/teams/api-key-create.json +0 -18
  53. data/spec/fixtures/public-api/teams/api-key-list.json +0 -23
  54. data/spec/fixtures/public-api/teams/api-key-rotate.json +0 -18
  55. data/spec/fixtures/public-api/teams/team-create.json +0 -11
  56. data/spec/fixtures/public-api/teams/team-update.json +0 -11
  57. data/spec/fixtures/public-api/teams/team.json +0 -11
  58. /data/spec/fixtures/{public-api/teams/api-key-revoke.json → api/gate/agent-token-revoke.json} +0 -0
@@ -0,0 +1,405 @@
1
+ {
2
+ "data": {
3
+ "object": "session",
4
+ "id": "sid_0123456789abcdefghjkmnpqrs",
5
+ "created_at": "2026-03-24T20:00:00.000Z",
6
+ "decision": {
7
+ "event_id": "evt_23456789abcdefghjkmnpqrstv",
8
+ "automation_status": "automated",
9
+ "risk_score": 94,
10
+ "evaluation_phase": "behavioral",
11
+ "decision_status": "final",
12
+ "evaluated_at": "2026-03-24T20:00:05.000Z"
13
+ },
14
+ "highlights": [
15
+ {
16
+ "key": "browser_automation",
17
+ "effect": "increases_risk",
18
+ "importance": "high",
19
+ "summary": "Browser automation markers were detected.",
20
+ "evidence": [
21
+ {
22
+ "signal": "webdriver_detected",
23
+ "name": "WebDriver detected"
24
+ },
25
+ {
26
+ "signal": "anti_detect_browser_indicators",
27
+ "name": "Anti-detect browser indicators"
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "key": "network_anonymity",
33
+ "effect": "increases_risk",
34
+ "importance": "medium",
35
+ "summary": "This session originated from a VPN-associated network.",
36
+ "evidence": [
37
+ {
38
+ "signal": "vpn_associated_ip",
39
+ "name": "VPN-associated IP"
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "key": "runtime_anomalies",
45
+ "effect": "increases_risk",
46
+ "importance": "medium",
47
+ "summary": "Runtime integrity checks found suspicious environment traits.",
48
+ "evidence": [
49
+ {
50
+ "signal": "virtualization_indicators",
51
+ "name": "Virtualization indicators"
52
+ },
53
+ {
54
+ "signal": "developer_tools_detected",
55
+ "name": "Developer tools detected"
56
+ },
57
+ {
58
+ "signal": "privacy_hardening_indicators",
59
+ "name": "Privacy hardening indicators"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "key": "browser_profile_consistent",
65
+ "effect": "reduces_risk",
66
+ "importance": "medium",
67
+ "summary": "Browser identity and device capabilities are internally consistent for a desktop Chromium environment."
68
+ },
69
+ {
70
+ "key": "known_visitor_fingerprint",
71
+ "effect": "context",
72
+ "importance": "medium",
73
+ "summary": "This visitor fingerprint has been seen before.",
74
+ "evidence": [
75
+ {
76
+ "signal": "returning_visitor_fingerprint",
77
+ "name": "Seen 14 times"
78
+ }
79
+ ]
80
+ }
81
+ ],
82
+ "automation": {
83
+ "category": "automation",
84
+ "confidence": 0.97,
85
+ "provider": "browserless",
86
+ "product": "playwright",
87
+ "framework": "playwright",
88
+ "concealment_style": "stealth",
89
+ "organization": "Browserless",
90
+ "facets": {
91
+ "category": {
92
+ "value": "automation",
93
+ "confidence": 0.97,
94
+ "relation": "is"
95
+ },
96
+ "provider_family": {
97
+ "value": "browserless",
98
+ "confidence": 0.92,
99
+ "relation": "resembles"
100
+ },
101
+ "product_identity": {
102
+ "value": "playwright",
103
+ "confidence": 0.89,
104
+ "relation": "is"
105
+ },
106
+ "execution_framework": {
107
+ "value": "playwright",
108
+ "confidence": 0.89,
109
+ "relation": "is"
110
+ },
111
+ "concealment_style": {
112
+ "value": "stealth",
113
+ "confidence": 0.73,
114
+ "relation": "is"
115
+ },
116
+ "organization": {
117
+ "value": "Browserless",
118
+ "confidence": 0.68,
119
+ "relation": "is"
120
+ }
121
+ }
122
+ },
123
+ "web_bot_auth": {
124
+ "status": "verified",
125
+ "domain": "browserless.io"
126
+ },
127
+ "network": {
128
+ "ip_address": "203.0.113.9",
129
+ "ip_version": "ipv4",
130
+ "status": "ready",
131
+ "summary": "This IP appears associated with VPN traffic.",
132
+ "location": {
133
+ "city": "San Francisco",
134
+ "region": "California",
135
+ "country": "United States",
136
+ "country_code": "US",
137
+ "latitude": 37.7749,
138
+ "longitude": -122.4194,
139
+ "timezone": "America/Los_Angeles",
140
+ "postal_code": "94103",
141
+ "accuracy_radius_km": 10
142
+ },
143
+ "routing": {
144
+ "asn": "64512",
145
+ "organization": "Example Networks"
146
+ },
147
+ "anonymity": {
148
+ "vpn": true,
149
+ "proxy": false,
150
+ "tor": false,
151
+ "relay": false,
152
+ "hosting": false,
153
+ "residential_proxy": false,
154
+ "callback_proxy": false,
155
+ "provider": "Example VPN"
156
+ },
157
+ "reputation": {
158
+ "listed": true,
159
+ "categories": [
160
+ "vpn"
161
+ ],
162
+ "suspicious_network": false
163
+ },
164
+ "evidence": {
165
+ "risk_signals": [
166
+ "vpn"
167
+ ],
168
+ "operator_tags": [
169
+ "vpn"
170
+ ],
171
+ "client_types": [
172
+ "consumer"
173
+ ],
174
+ "client_count": 3
175
+ },
176
+ "evaluated_at": "2026-03-24T20:00:05.000Z"
177
+ },
178
+ "runtime_integrity": {
179
+ "tampering_detected": true,
180
+ "developer_tools_detected": true,
181
+ "emulation_suspected": false,
182
+ "virtualization_suspected": true,
183
+ "privacy_hardening_suspected": true
184
+ },
185
+ "visitor_fingerprint": {
186
+ "object": "visitor_fingerprint",
187
+ "id": "vid_456789abcdefghjkmnpqrstvwx",
188
+ "confidence": 93,
189
+ "identified_at": "2026-03-24T20:00:01.000Z",
190
+ "lifecycle": {
191
+ "first_seen_at": "2026-03-01T18:22:11.000Z",
192
+ "last_seen_at": "2026-03-24T20:00:05.000Z",
193
+ "seen_count": 14
194
+ }
195
+ },
196
+ "connection_fingerprint": {
197
+ "ja4": {
198
+ "hash": "t13d1516h2_8daaf6152771_02713d6af862",
199
+ "profile": "chrome",
200
+ "family": "chromium",
201
+ "product": "edge",
202
+ "confidence": "exact",
203
+ "deterministic": true
204
+ },
205
+ "http2": {
206
+ "akamai_fingerprint": "1:65536;4:131072;5:16384|12517377|0|m,p,a,s",
207
+ "profile": "chrome"
208
+ },
209
+ "user_agent_alignment": "match"
210
+ },
211
+ "previous_decisions": [
212
+ {
213
+ "event_id": "evt_3456789abcdefghjkmnpqrstvw",
214
+ "automation_status": "uncertain",
215
+ "risk_score": 41,
216
+ "evaluation_phase": "snapshot",
217
+ "decision_status": "preliminary",
218
+ "evaluated_at": "2026-03-24T20:00:01.000Z"
219
+ }
220
+ ],
221
+ "request": {
222
+ "url": "https://example.com/signup",
223
+ "referrer": "https://example.com/",
224
+ "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.6312.86 Safari/537.36"
225
+ },
226
+ "browser": {
227
+ "name": "Chromium",
228
+ "version": "123.0.0.0",
229
+ "major_version": "123",
230
+ "engine": "blink"
231
+ },
232
+ "device": {
233
+ "form_factor": "desktop",
234
+ "operating_system": {
235
+ "name": "macOS",
236
+ "version": "14.4.0"
237
+ },
238
+ "architecture": "arm",
239
+ "screen": {
240
+ "size": "1440x900",
241
+ "color_depth": 24,
242
+ "pixel_ratio": 2,
243
+ "orientation_type": "landscape-primary"
244
+ },
245
+ "locale": {
246
+ "timezone": "America/Los_Angeles",
247
+ "primary_language": "en-US",
248
+ "languages": [
249
+ "en-US",
250
+ "en"
251
+ ]
252
+ },
253
+ "capabilities": {
254
+ "touch": {
255
+ "available": false,
256
+ "max_touch_points": 0
257
+ },
258
+ "storage": {
259
+ "cookies": true,
260
+ "local_storage": true,
261
+ "indexed_db": true,
262
+ "service_worker": true,
263
+ "window_name": true
264
+ },
265
+ "webgpu": {
266
+ "available": false
267
+ },
268
+ "platform_authenticator": {
269
+ "available": true,
270
+ "conditional_mediation": true
271
+ },
272
+ "media_devices": {
273
+ "available": true
274
+ },
275
+ "speech_synthesis": {
276
+ "available": false
277
+ }
278
+ }
279
+ },
280
+ "analysis_coverage": {
281
+ "browser": true,
282
+ "device": true,
283
+ "network": true,
284
+ "runtime": true,
285
+ "behavioral": true,
286
+ "visitor_identity": true
287
+ },
288
+ "signals_fired": [
289
+ {
290
+ "signal": "webdriver_detected",
291
+ "role": "risk",
292
+ "category": "environment",
293
+ "strength": "definitive",
294
+ "signal_score": 100
295
+ },
296
+ {
297
+ "signal": "anti_detect_browser_indicators",
298
+ "role": "risk",
299
+ "category": "environment",
300
+ "strength": "strong",
301
+ "signal_score": 84
302
+ },
303
+ {
304
+ "signal": "software_rendered_graphics_path",
305
+ "role": "risk",
306
+ "category": "fingerprint",
307
+ "strength": "strong",
308
+ "signal_score": 73
309
+ },
310
+ {
311
+ "signal": "virtualization_indicators",
312
+ "role": "risk",
313
+ "category": "environment",
314
+ "strength": "strong",
315
+ "signal_score": 61
316
+ }
317
+ ],
318
+ "client_telemetry": {
319
+ "navigator": {
320
+ "platform": "macOS",
321
+ "vendor": "Google Inc.",
322
+ "hardware_concurrency": null,
323
+ "device_memory": null,
324
+ "max_touch_points": 0,
325
+ "pdf_viewer_enabled": true,
326
+ "cookie_enabled": true,
327
+ "product_sub": "20030107",
328
+ "primary_language": "en-US",
329
+ "languages": [
330
+ "en-US",
331
+ "en"
332
+ ],
333
+ "mime_types_count": 5,
334
+ "plugins": [
335
+ "PDF Viewer",
336
+ "Chrome PDF Viewer"
337
+ ]
338
+ },
339
+ "storage": {
340
+ "cookies": true,
341
+ "local_storage": true,
342
+ "session_storage": true,
343
+ "indexed_db": true,
344
+ "service_worker": true,
345
+ "window_name": true
346
+ },
347
+ "canvas": {
348
+ "hash": 123456,
349
+ "geometry_hash": 998877,
350
+ "text_hash": 112233,
351
+ "winding": null,
352
+ "noise_detected": true,
353
+ "offscreen_consistent": true
354
+ },
355
+ "graphics": {
356
+ "webgl": {
357
+ "vendor": "Google Inc.",
358
+ "renderer": "ANGLE (Apple, ANGLE Metal Renderer)",
359
+ "version": "WebGL 1.0",
360
+ "shading_language_version": "WebGL GLSL ES 1.0",
361
+ "parameters_hash": "params_123",
362
+ "extensions_hash": 333444,
363
+ "extension_parameters_hash": "webgl2_456",
364
+ "shader_precision_hash": 777888
365
+ },
366
+ "webgpu": {
367
+ "available": false,
368
+ "adapter_vendor": "Apple",
369
+ "adapter_architecture": "metal",
370
+ "fallback_adapter": false,
371
+ "features_hash": 0,
372
+ "limits_hash": 0
373
+ }
374
+ },
375
+ "audio": {
376
+ "hash": 124.0434,
377
+ "sample_rate": 48000,
378
+ "channel_count": null,
379
+ "voice_count": 3,
380
+ "local_voice_count": 2,
381
+ "default_voice_lang": "en-US",
382
+ "noise_detected": true
383
+ },
384
+ "fonts": {
385
+ "detected_count": 2,
386
+ "tested_count": null,
387
+ "enumeration_hash": 3649417752,
388
+ "metrics_hash": 223344,
389
+ "preferences_hash": null,
390
+ "emoji_hash": 112233
391
+ },
392
+ "media": {
393
+ "device_count": 1,
394
+ "counts_by_kind": {
395
+ "audiooutput": 1
396
+ },
397
+ "blank_label_count": 1,
398
+ "topology_hash": 123
399
+ }
400
+ }
401
+ },
402
+ "meta": {
403
+ "request_id": "req_0123456789abcdef0123456789abcdef"
404
+ }
405
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "object": "session",
5
+ "id": "sid_0123456789abcdefghjkmnpqrs",
6
+ "created_at": "2026-03-24T20:00:00.000Z",
7
+ "latest_decision": {
8
+ "event_id": "evt_23456789abcdefghjkmnpqrstv",
9
+ "verdict": "human",
10
+ "risk_score": 9,
11
+ "phase": "behavioral",
12
+ "is_provisional": false,
13
+ "manipulation": {
14
+ "score": 0,
15
+ "verdict": "none"
16
+ },
17
+ "evaluation_duration_ms": 142,
18
+ "evaluated_at": "2026-03-24T20:00:05.000Z"
19
+ },
20
+ "visitor_fingerprint": {
21
+ "object": "visitor_fingerprint",
22
+ "id": "vid_456789abcdefghjkmnpqrstvwx",
23
+ "confidence": 94,
24
+ "identified_at": "2026-03-24T20:00:05.000Z"
25
+ }
26
+ }
27
+ ],
28
+ "pagination": {
29
+ "limit": 50,
30
+ "has_more": true,
31
+ "next_cursor": "cur_sessions_page_2"
32
+ },
33
+ "meta": {
34
+ "request_id": "req_0123456789abcdef0123456789abcdef"
35
+ }
36
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "data": {
3
+ "object": "api_key",
4
+ "id": "key_6789abcdefghjkmnpqrstvwxyz",
5
+ "public_key": "pk_live_example",
6
+ "name": "Production",
7
+ "environment": "live",
8
+ "allowed_origins": [
9
+ "https://example.com"
10
+ ],
11
+ "rate_limit": 600,
12
+ "status": "active",
13
+ "created_at": "2026-03-24T19:00:00.000Z",
14
+ "rotated_at": null,
15
+ "revoked_at": null,
16
+ "secret_key": "sk_live_example"
17
+ },
18
+ "meta": {
19
+ "request_id": "req_0123456789abcdef0123456789abcdef"
20
+ }
21
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "object": "api_key",
5
+ "id": "key_6789abcdefghjkmnpqrstvwxyz",
6
+ "public_key": "pk_live_example",
7
+ "name": "Production",
8
+ "environment": "live",
9
+ "allowed_origins": [
10
+ "https://example.com"
11
+ ],
12
+ "rate_limit": 600,
13
+ "status": "active",
14
+ "created_at": "2026-03-24T19:00:00.000Z",
15
+ "rotated_at": null,
16
+ "revoked_at": null
17
+ }
18
+ ],
19
+ "pagination": {
20
+ "limit": 50,
21
+ "has_more": false
22
+ },
23
+ "meta": {
24
+ "request_id": "req_0123456789abcdef0123456789abcdef"
25
+ }
26
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "data": {
3
+ "object": "api_key",
4
+ "id": "key_6789abcdefghjkmnpqrstvwxyz",
5
+ "public_key": "pk_live_example",
6
+ "name": "Production",
7
+ "environment": "live",
8
+ "allowed_origins": [
9
+ "https://example.com"
10
+ ],
11
+ "rate_limit": 600,
12
+ "status": "revoked",
13
+ "created_at": "2026-03-24T19:00:00.000Z",
14
+ "rotated_at": null,
15
+ "revoked_at": "2026-03-24T20:05:00.000Z"
16
+ },
17
+ "meta": {
18
+ "request_id": "req_0123456789abcdef0123456789abcdef"
19
+ }
20
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "data": {
3
+ "object": "api_key",
4
+ "id": "key_789abcdefghjkmnpqrstvwxyz0",
5
+ "public_key": "pk_live_rotated",
6
+ "name": "Production",
7
+ "environment": "live",
8
+ "allowed_origins": [
9
+ "https://example.com"
10
+ ],
11
+ "rate_limit": 600,
12
+ "status": "active",
13
+ "created_at": "2026-03-24T19:00:00.000Z",
14
+ "rotated_at": "2026-03-24T20:00:00.000Z",
15
+ "revoked_at": null,
16
+ "secret_key": "sk_live_rotated"
17
+ },
18
+ "meta": {
19
+ "request_id": "req_0123456789abcdef0123456789abcdef"
20
+ }
21
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "data": {
3
+ "object": "team",
4
+ "id": "team_56789abcdefghjkmnpqrstvwxy",
5
+ "name": "Example Team",
6
+ "slug": "example-team",
7
+ "status": "active",
8
+ "created_at": "2026-03-24T19:00:00.000Z",
9
+ "updated_at": "2026-03-24T19:10:00.000Z"
10
+ },
11
+ "meta": {
12
+ "request_id": "req_0123456789abcdef0123456789abcdef"
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "data": {
3
+ "object": "team",
4
+ "id": "team_56789abcdefghjkmnpqrstvwxy",
5
+ "name": "Example Team",
6
+ "slug": "example-team",
7
+ "status": "suspended",
8
+ "created_at": "2026-03-24T19:00:00.000Z",
9
+ "updated_at": "2026-03-24T19:12:00.000Z"
10
+ },
11
+ "meta": {
12
+ "request_id": "req_0123456789abcdef0123456789abcdef"
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "data": {
3
+ "object": "team",
4
+ "id": "team_56789abcdefghjkmnpqrstvwxy",
5
+ "name": "Example Team",
6
+ "slug": "example-team",
7
+ "status": "active",
8
+ "created_at": "2026-03-24T19:00:00.000Z",
9
+ "updated_at": "2026-03-24T19:10:00.000Z"
10
+ },
11
+ "meta": {
12
+ "request_id": "req_0123456789abcdef0123456789abcdef"
13
+ }
14
+ }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "error": {
3
3
  "code": "auth.invalid_api_key",
4
- "message": "The provided API key is invalid. Check the key and retry.",
4
+ "message": "The bearer token was not recognized. Verify that the token is active and matches the correct environment before retrying.",
5
5
  "status": 401,
6
6
  "retryable": false,
7
- "requestId": "req_invalid_api_key",
8
- "docsUrl": "https://tripwire.com/docs/api-reference/introduction"
7
+ "request_id": "req_0123456789abcdef0123456789abcdef",
8
+ "docs_url": "https://tripwirejs.com/docs/api-reference/introduction"
9
9
  }
10
10
  }
@@ -4,7 +4,7 @@
4
4
  "message": "Missing Authorization header. Send Authorization: Bearer <token> to authenticate this request.",
5
5
  "status": 401,
6
6
  "retryable": false,
7
- "requestId": "req_missing_api_key",
8
- "docsUrl": "https://tripwire.com/docs/api-reference/introduction"
7
+ "request_id": "req_0123456789abcdef0123456789abcdef",
8
+ "docs_url": "https://tripwirejs.com/docs/api-reference/introduction"
9
9
  }
10
10
  }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "error": {
3
- "code": "resource.not_found",
4
- "message": "The requested session was not found.",
3
+ "code": "request.not_found",
4
+ "message": "No session with id \"sid_0123456789abcdefghjkmnpqrs\" was found. Verify the identifier and retry.",
5
5
  "status": 404,
6
6
  "retryable": false,
7
- "requestId": "req_not_found",
8
- "docsUrl": "https://tripwire.com/docs/api-reference/sessions"
7
+ "request_id": "req_0123456789abcdef0123456789abcdef",
8
+ "docs_url": "https://tripwirejs.com/docs/api-reference/sessions"
9
9
  }
10
10
  }
@@ -1,21 +1,20 @@
1
1
  {
2
2
  "error": {
3
3
  "code": "request.validation_failed",
4
- "message": "Session list query parameters are invalid. Check limit, cursor, and verdict before retrying.",
5
- "status": 400,
4
+ "message": "Invalid session list query. Use limit between 1 and 200 and the supported cursor/search/verdict filters only.",
5
+ "status": 422,
6
6
  "retryable": false,
7
- "requestId": "req_validation_error",
8
- "docsUrl": "https://tripwire.com/docs/api-reference/sessions",
7
+ "request_id": "req_0123456789abcdef0123456789abcdef",
9
8
  "details": {
10
- "fieldErrors": [
9
+ "fields": [
11
10
  {
12
- "field": "limit",
11
+ "name": "limit",
13
12
  "issue": "invalid_integer",
14
13
  "expected": "integer between 1 and 200",
15
14
  "received": "999"
16
15
  }
17
16
  ],
18
- "query": "sessions"
17
+ "parameter_set": "sessions"
19
18
  }
20
19
  }
21
20
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "event": "gate.session.approved",
3
+ "service_id": "tripwire",
4
+ "gate_session_id": "gate_0123456789abcdefghjkmnpqrs",
5
+ "gate_account_id": "gacct_0123456789abcdefghjkmnpqrs",
6
+ "account_name": "Acme",
7
+ "metadata": {
8
+ "plan": "pro"
9
+ },
10
+ "tripwire": {
11
+ "verdict": "human",
12
+ "score": 0.12
13
+ },
14
+ "delivery": {
15
+ "version": 1,
16
+ "algorithm": "x25519-hkdf-sha256/aes-256-gcm",
17
+ "key_id": "LyGqfpvB0SCaX4P0inVpMJTAjCNJVWq_3OE87it2ZYo",
18
+ "public_key": "bn6szfMIS-7pLl01PqvssrrGRoW1SVTkUuqeg0hfrW0"
19
+ }
20
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "delivery": {
3
+ "version": 1,
4
+ "algorithm": "x25519-hkdf-sha256/aes-256-gcm",
5
+ "key_id": "LyGqfpvB0SCaX4P0inVpMJTAjCNJVWq_3OE87it2ZYo",
6
+ "public_key": "bn6szfMIS-7pLl01PqvssrrGRoW1SVTkUuqeg0hfrW0"
7
+ },
8
+ "derived_key_id": "LyGqfpvB0SCaX4P0inVpMJTAjCNJVWq_3OE87it2ZYo"
9
+ }