-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFixOps-Bank-API-Collection.json
More file actions
555 lines (555 loc) · 17.1 KB
/
Copy pathFixOps-Bank-API-Collection.json
File metadata and controls
555 lines (555 loc) · 17.1 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
{
"info": {
"_postman_id": "fixops-bank-api-collection",
"name": "FixOps Decision Engine - Bank Integration",
"description": "Complete API testing suite for FixOps Decision Engine deployment in bank infrastructure. No authentication required - free tool.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "FixOps Enterprise"
},
"item": [
{
"name": "🏥 Health & Monitoring",
"item": [
{
"name": "Health Check (Liveness Probe)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Health check returns 200', function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test('Service is healthy', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData.status).to.eql('healthy');",
" pm.expect(jsonData.service).to.eql('fixops-decision-engine');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/health",
"host": ["{{BASE_URL}}"],
"path": ["health"]
}
}
},
{
"name": "Readiness Check (K8s Probe)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Readiness check returns 200', function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test('All components ready', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData.status).to.eql('ready');",
" pm.expect(jsonData.checks.database).to.be.true;",
" pm.expect(jsonData.checks.cache).to.be.true;",
" pm.expect(jsonData.checks.decision_engine).to.be.true;",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/ready",
"host": ["{{BASE_URL}}"],
"path": ["ready"]
}
}
},
{
"name": "Prometheus Metrics",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Metrics endpoint responds', function () {",
" pm.response.to.have.status(200);",
" pm.expect(pm.response.headers.get('Content-Type')).to.include('text/plain');",
"});",
"",
"pm.test('Prometheus metrics format', function () {",
" const responseText = pm.response.text();",
" pm.expect(responseText).to.include('fixops_decisions_total');",
" pm.expect(responseText).to.include('fixops_decision_latency_seconds');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/metrics",
"host": ["{{BASE_URL}}"],
"path": ["metrics"]
}
}
}
]
},
{
"name": "⚖️ Decision Engine",
"item": [
{
"name": "Make Security Decision (Payment Service)",
"event": [
{
"listen": "pre-request",
"script": {
"exec": [
"// Set correlation ID for tracking",
"pm.request.headers.add({",
" key: 'X-Correlation-ID',",
" value: 'postman-test-' + Date.now()",
"});"
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test('Decision made successfully', function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test('Valid decision response', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData.decision).to.be.oneOf(['ALLOW', 'BLOCK', 'DEFER']);",
" pm.expect(jsonData.confidence_score).to.be.within(0, 1);",
" pm.expect(jsonData.evidence_id).to.match(/^(EVD|DEMO-EVD)-\\d{4}-\\d+$/);",
" pm.expect(jsonData.processing_time_us).to.be.above(0);",
"});",
"",
"// Store evidence ID for later tests",
"const jsonData = pm.response.json();",
"pm.environment.set('LAST_EVIDENCE_ID', jsonData.evidence_id);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"service_name\": \"payment-processor\",\n \"environment\": \"production\",\n \"business_context\": {\n \"jira_ticket\": \"PAY-2847\",\n \"business_criticality\": \"critical\",\n \"data_classification\": \"pii_financial\",\n \"compliance_requirements\": [\"pci_dss\", \"sox\"]\n },\n \"security_findings\": [\n {\n \"severity\": \"medium\",\n \"category\": \"injection\",\n \"title\": \"Potential SQL injection in payment endpoint\",\n \"source\": \"sonarqube\",\n \"confidence\": 0.8\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/api/v1/decisions/make-decision",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "decisions", "make-decision"]
}
},
"response": []
},
{
"name": "Get Decision Engine Metrics",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Metrics retrieved successfully', function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test('Valid metrics structure', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('status');",
" pm.expect(jsonData.data).to.have.property('total_decisions');",
" pm.expect(jsonData.data).to.have.property('demo_mode');",
" pm.expect(jsonData.data).to.have.property('core_components');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/decisions/metrics",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "decisions", "metrics"]
}
}
},
{
"name": "Get Recent Decisions",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/decisions/recent?limit=5",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "decisions", "recent"],
"query": [
{
"key": "limit",
"value": "5"
}
]
}
}
},
{
"name": "Get Evidence Record",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Evidence retrieved or not found', function () {",
" pm.expect(pm.response.code).to.be.oneOf([200, 404]);",
"});",
"",
"if (pm.response.code === 200) {",
" pm.test('Valid evidence structure', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData.status).to.eql('success');",
" pm.expect(jsonData.data).to.have.property('evidence_id');",
" pm.expect(jsonData.data).to.have.property('immutable_hash');",
" });",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/decisions/evidence/{{LAST_EVIDENCE_ID}}",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "decisions", "evidence", "{{LAST_EVIDENCE_ID}}"]
}
}
}
]
},
{
"name": "🏦 CI/CD Bank Integration",
"item": [
{
"name": "CI/CD Decision - Payment Service (SonarQube + Snyk)",
"event": [
{
"listen": "pre-request",
"script": {
"exec": [
"// Set pipeline tracking headers",
"pm.request.headers.add({",
" key: 'X-Pipeline-ID',",
" value: 'jenkins-build-' + Date.now()",
"});",
"pm.request.headers.add({",
" key: 'X-Correlation-ID',",
" value: 'payment-service-deploy-' + Date.now()",
"});"
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test('CI/CD decision successful', function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test('CI/CD response format', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('deployment_approved');",
" pm.expect(jsonData).to.have.property('exit_code');",
" pm.expect(jsonData).to.have.property('recommended_actions');",
" pm.expect(jsonData).to.have.property('compliance_status');",
" pm.expect(jsonData.exit_code).to.be.oneOf([0, 1, 2]);",
"});",
"",
"// Log decision for bank audit",
"const jsonData = pm.response.json();",
"console.log('🏦 Bank CI/CD Decision:', jsonData.decision);",
"console.log('📊 Confidence:', jsonData.confidence_score);",
"console.log('🗃️ Evidence:', jsonData.evidence_id);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"service_name\": \"payment-processor\",\n \"environment\": \"production\",\n \"repository_url\": \"https://git.bank.internal/payments/payment-processor\",\n \"commit_sha\": \"abc123def456\",\n \"branch_name\": \"main\",\n \"sarif_results\": {\n \"runs\": [\n {\n \"tool\": {\n \"driver\": {\n \"name\": \"SonarQube\"\n }\n },\n \"results\": [\n {\n \"ruleId\": \"sql-injection-risk\",\n \"level\": \"warning\",\n \"message\": {\n \"text\": \"Potential SQL injection vulnerability\"\n }\n }\n ]\n }\n ]\n },\n \"sca_results\": {\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-001\",\n \"severity\": \"medium\",\n \"title\": \"Dependency vulnerability in jackson-core\",\n \"packageName\": \"jackson-core\"\n }\n ]\n },\n \"business_criticality\": \"critical\",\n \"compliance_requirements\": [\"pci_dss\", \"sox\", \"ffiec\"]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/api/v1/cicd/decision",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "cicd", "decision"]
}
}
},
{
"name": "CI/CD Decision - User Auth Service (High Risk)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"service_name\": \"user-auth-service\",\n \"environment\": \"production\",\n \"repository_url\": \"https://git.bank.internal/auth/user-auth\",\n \"commit_sha\": \"def456ghi789\",\n \"branch_name\": \"feature/auth-upgrade\",\n \"sarif_results\": {\n \"runs\": [\n {\n \"tool\": {\n \"driver\": {\n \"name\": \"CodeQL\"\n }\n },\n \"results\": [\n {\n \"ruleId\": \"sql-injection\",\n \"level\": \"error\",\n \"message\": {\n \"text\": \"SQL injection vulnerability in authentication endpoint\"\n }\n }\n ]\n }\n ]\n },\n \"sca_results\": {\n \"vulnerabilities\": [\n {\n \"id\": \"CVE-2024-001\",\n \"severity\": \"critical\",\n \"title\": \"Authentication bypass in spring-security\",\n \"packageName\": \"spring-security\"\n }\n ]\n },\n \"business_criticality\": \"critical\",\n \"compliance_requirements\": [\"pci_dss\", \"sox\", \"gdpr\"]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{BASE_URL}}/api/v1/cicd/decision",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "cicd", "decision"]
}
}
}
]
},
{
"name": "📤 File Upload & Scan Ingestion",
"item": [
{
"name": "Upload SARIF File (SonarQube Results)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('File upload successful', function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test('Valid upload response', function () {",
" const jsonData = pm.response.json();",
" pm.expect(jsonData.status).to.eql('success');",
" pm.expect(jsonData.data).to.have.property('findings_processed');",
" pm.expect(jsonData.data).to.have.property('correlations_found');",
" pm.expect(jsonData.data).to.have.property('processing_time_ms');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "sample-sarif.json",
"description": "SARIF file from SonarQube scan"
},
{
"key": "service_name",
"value": "payment-processor",
"type": "text"
},
{
"key": "environment",
"value": "production",
"type": "text"
},
{
"key": "scan_type",
"value": "sarif",
"type": "text"
}
]
},
"url": {
"raw": "{{BASE_URL}}/api/v1/scans/upload",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "scans", "upload"]
}
}
},
{
"name": "Upload SBOM File (CycloneDX)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "sample-sbom.json",
"description": "CycloneDX SBOM file"
},
{
"key": "service_name",
"value": "api-gateway",
"type": "text"
},
{
"key": "environment",
"value": "staging",
"type": "text"
},
{
"key": "scan_type",
"value": "sbom",
"type": "text"
}
]
},
"url": {
"raw": "{{BASE_URL}}/api/v1/scans/upload",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "scans", "upload"]
}
}
}
]
},
{
"name": "🏢 Business Context Integration",
"item": [
{
"name": "Get Jira Context",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/business-context/jira-context/PAY-2847",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "business-context", "jira-context", "PAY-2847"]
}
}
},
{
"name": "Get Confluence Threat Model",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/business-context/confluence-context/payment-security-reqs",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "business-context", "confluence-context", "payment-security-reqs"]
}
}
}
]
},
{
"name": "📊 Analytics & Reporting",
"item": [
{
"name": "Get Dashboard Analytics",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{BASE_URL}}/api/v1/analytics/dashboard",
"host": ["{{BASE_URL}}"],
"path": ["api", "v1", "analytics", "dashboard"]
}
}
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
"// Global pre-request script for FixOps API testing",
"console.log('🏦 FixOps Bank API Test - No Authentication Required');",
"console.log('Testing against:', pm.environment.get('BASE_URL'));"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"// Global test script for all requests",
"pm.test('Response time acceptable for bank SLA', function () {",
" pm.expect(pm.response.responseTime).to.be.below(5000);",
"});",
"",
"pm.test('Security headers present', function () {",
" // Banks expect security headers",
" const headers = pm.response.headers;",
" console.log('Security check - headers available for bank compliance');",
"});"
]
}
}
],
"variable": [
{
"key": "BASE_URL",
"value": "http://localhost:8001",
"type": "string"
}
]
}