-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
12197 lines (12194 loc) · 357 KB
/
openapi.yaml
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
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
components:
schemas:
.attributes:
properties:
message:
type: string
status:
type: string
url:
type: string
required:
- status
- message
- url
.data:
properties:
attributes:
$ref: '#/components/schemas/.attributes'
type:
type: string
required:
- type
- attributes
.status:
properties:
reason:
type: string
required:
- reason
activity.v1.ActivityData:
properties:
decision:
$ref: '#/components/schemas/services.authz.decision.Decision'
duration:
format: int64
type: integer
request:
$ref: '#/components/schemas/activity.v1.RequestData'
response:
$ref: '#/components/schemas/activity.v1.ResponseData'
required:
- request
- response
- duration
activity.v1.ActivityPostRequest:
properties:
class_type:
description: audit or activity
type: string
count:
default: 256
description: 'max count of records to return: max(4096)'
format: int32
type: integer
end_time:
description: filter time range end_time
format: date-time
type: string
forward:
default: false
description: search from start(true) or end(false) of table
type: boolean
request_id:
description: filter on matching request_id
type: string
start_time:
description: filter time range start_time
format: date-time
type: string
activity.v1.ActivityPostResponse:
properties:
request_id:
type: string
result:
$ref: '#/components/schemas/activity.v1.ActivityResult'
required:
- result
activity.v1.ActivityResult:
properties:
data:
items:
$ref: '#/components/schemas/activity.v1.ActivityData'
type: array
required:
- data
activity.v1.RequestData:
properties:
class:
type: string
errors:
$ref: '#/components/schemas/activity.v1.RequestErrors'
host:
type: string
id:
type: string
method:
type: string
path:
type: string
request_body:
type: string
requested_by:
type: string
requested_through:
type: string
timestamp:
format: date-time
type: string
required:
- id
- host
- method
- path
- timestamp
activity.v1.RequestErrors:
properties:
evaluation:
type: string
activity.v1.ResponseData:
properties:
errors:
$ref: '#/components/schemas/activity.v1.ResponseErrors'
status_code:
format: int32
type: integer
timestamp:
format: date-time
type: string
required:
- timestamp
- status_code
activity.v1.ResponseErrors:
properties:
processing:
type: string
activity.v2.ActivityGetResponse:
properties:
request_id:
type: string
results:
$ref: '#/components/schemas/activity.v1.ActivityData'
required:
- results
activity.v2.ActivitySearchResponse:
properties:
cursor:
type: string
request_id:
type: string
results:
items:
$ref: '#/components/schemas/activity.v1.ActivityData'
type: array
required:
- results
analysis.v1.AllowedValue:
properties:
error:
type: string
value:
type: boolean
analysis.v1.ColumnValue:
properties:
error:
type: string
key:
type: string
type:
type: string
value:
$ref: '#/components/schemas/analysis.v1.ColumnValue.value'
required:
- key
analysis.v1.ColumnValue.value: {}
analysis.v1.DecisionResponse:
properties:
request_id:
type: string
result:
$ref: '#/components/schemas/analysis.v1.ElasticSearchDecision'
required:
- result
analysis.v1.DecisionSearchResult:
properties:
cursor:
type: string
items:
items:
$ref: '#/components/schemas/analysis.v1.ElasticSearchDecision'
type: array
required:
- items
analysis.v1.DecisionsGetRequest:
properties:
compact:
default: false
description: return only essential decision fields
type: boolean
cursor:
description: continue from cursor position of previous query
type: string
default_timezone:
description: client time zone offset. Local time expressions in query are adjusted with this offset
type: string
end_time:
description: maximum decision time
format: date-time
type: string
limit:
default: 100
description: maximum number of decisions to return
format: int64
type: integer
order:
default: DESC
description: ASC, DESC
type: string
result_kind:
default: ALL
description: comma-separated list of ALL, UNKNOWN, ADVICE, ALLOWED, DENIED, ERROR
type: string
search:
description: search query
type: string
stack:
description: stack ID
type: string
start_time:
description: minimum decision time
format: date-time
type: string
system:
description: system ID
type: string
analysis.v1.DecisionsResponse:
properties:
request_id:
type: string
result:
$ref: '#/components/schemas/analysis.v1.DecisionSearchResult'
required:
- result
analysis.v1.ElasticSearchDecision:
properties:
agent_id:
type: string
allowed:
$ref: '#/components/schemas/analysis.v1.AllowedValue'
bundles:
additionalProperties:
$ref: '#/components/schemas/logs.BundleInfoV1'
description: configured bundles
type: object
columns:
items:
$ref: '#/components/schemas/analysis.v1.ColumnValue'
type: array
cursor:
type: string
decision_id:
description: unique decision ID
type: string
decision_type:
format: byte
type: integer
erased:
description: erased fields
items:
type: string
type: array
error:
$ref: '#/components/schemas/analysis.v1.LogEntry.error'
filtered_fields:
items:
type: string
type: array
input:
$ref: '#/components/schemas/analysis.v1.LogEntry.input'
kafka_topic:
type: string
labels:
additionalProperties:
type: string
description: OPA labels
type: object
metrics:
description: decision metrics
type: object
nd_builtin_cache:
additionalProperties:
$ref: '#/components/schemas/analysis.v1.LogEntry.nd_builtin_cache'
description: OPA-side cache that stores results of builtin non-deterministic operations
type: object
path:
description: evaluated path
type: string
policy_type:
type: string
processed:
format: date-time
type: string
query:
description: ad-hoc query
type: string
reason:
$ref: '#/components/schemas/analysis.v1.ReasonValue'
received:
format: date-time
type: string
req_id:
description: request ID
format: integer
type: integer
requested_by:
description: requested by IP:port
type: string
result:
$ref: '#/components/schemas/analysis.v1.LogEntry.result'
revision:
description: bundle revision
type: string
stacks:
items:
type: string
type: array
system_id:
type: string
system_type:
type: string
timestamp:
description: OPA-side decision timestamp
format: date-time
type: string
required:
- columns
- decision_type
analysis.v1.LogEntry.error: {}
analysis.v1.LogEntry.input: {}
analysis.v1.LogEntry.nd_builtin_cache:
type: object
analysis.v1.LogEntry.result: {}
analysis.v1.ReasonValue:
properties:
error:
type: string
value:
type: string
authz.v1.CheckPermissionInput:
properties:
action:
type: string
body:
type: object
check_option:
type: string
operation:
type: string
path:
type: string
required:
- check_option
- operation
- action
- path
- body
authz.v1.CheckPermissionOutput:
properties:
allowed:
type: boolean
body:
type: object
check_option:
type: string
eval_error:
type: boolean
operation:
type: string
path:
type: string
required:
- check_option
- operation
- path
- allowed
- eval_error
authz.v1.CheckPermissionsPostResponse:
properties:
request_id:
type: string
result:
items:
$ref: '#/components/schemas/authz.v1.CheckPermissionOutput'
type: array
required:
- result
authz.v1.RoleBindingConfig:
properties:
description:
type: string
id:
type: string
metadata:
$ref: '#/components/schemas/meta.v1.ObjectMeta'
role_name:
type: string
subjects:
items:
type: string
type: array
required:
- id
- description
- subjects
- role_name
- metadata
authz.v1.RoleBindingsDeleteResponse:
properties:
request_id:
type: string
authz.v1.RoleBindingsGetResponse:
properties:
request_id:
type: string
result:
$ref: '#/components/schemas/authz.v1.RoleBindingConfig'
required:
- result
authz.v1.RoleBindingsListAllResponse:
properties:
request_id:
type: string
result:
additionalProperties:
$ref: '#/components/schemas/authz.v1.RoleBindingsListAllResponse.result'
type: object
required:
- result
authz.v1.RoleBindingsListAllResponse.result:
additionalProperties:
items:
$ref: '#/components/schemas/authz.v1.RoleBindingConfig'
type: array
type: object
authz.v1.RoleBindingsListResponse:
properties:
request_id:
type: string
result:
items:
$ref: '#/components/schemas/authz.v1.RoleBindingConfig'
type: array
required:
- result
authz.v1.RoleBindingsPutRequest:
properties:
description:
type: string
id:
type: string
role_name:
type: string
subjects:
items:
type: string
type: array
required:
- id
- description
- subjects
- role_name
authz.v1.RoleBindingsPutResponse:
properties:
request_id:
type: string
authz.v1.RoleConfig:
properties:
name:
type: string
required:
- name
authz.v1.RolesListResponse:
properties:
request_id:
type: string
result:
items:
$ref: '#/components/schemas/authz.v1.RoleConfig'
type: array
required:
- result
authz.v2.ClaimConfig:
properties:
identity_provider:
description: identity provider ID
type: string
key:
description: OIDC claim key
type: string
value:
description: OIDC claim value. Use '*' to specify any value.
type: string
required:
- key
- value
authz.v2.InheritRoles:
properties:
action:
description: action upon resource e.g., create
type: string
resource_kind:
description: resource type e.g., system
type: string
role:
description: role ID e.g., SystemOwner
type: string
required:
- action
- resource_kind
- role
authz.v2.ResourceFilter:
properties:
id:
description: resource ID e.g., system123
type: string
kind:
description: resource type e.g., system
type: string
required:
- kind
- id
authz.v2.RoleBindingConfig:
properties:
id:
description: rolebinding ID
type: string
metadata:
$ref: '#/components/schemas/meta.v1.ObjectMeta'
resource_filter:
$ref: '#/components/schemas/authz.v2.ResourceFilter'
role_id:
description: role ID e.g., SystemOwner
type: string
subjects:
description: list of subjects
items:
$ref: '#/components/schemas/authz.v2.Subject'
type: array
required:
- resource_filter
- role_id
- subjects
- id
- metadata
authz.v2.RoleBindingsDeleteResponse:
properties:
request_id:
type: string
authz.v2.RoleBindingsDeleteSubjectsRequest:
properties:
subjects:
items:
$ref: '#/components/schemas/authz.v2.Subject'
type: array
required:
- subjects
authz.v2.RoleBindingsDeleteSubjectsResponse:
properties:
request_id:
type: string
rolebinding:
$ref: '#/components/schemas/authz.v2.RoleBindingConfig'
required:
- rolebinding
authz.v2.RoleBindingsGetResponse:
properties:
request_id:
type: string
rolebinding:
$ref: '#/components/schemas/authz.v2.RoleBindingConfig'
required:
- rolebinding
authz.v2.RoleBindingsListResponse:
properties:
request_id:
type: string
rolebindings:
items:
$ref: '#/components/schemas/authz.v2.RoleBindingConfig'
type: array
required:
- rolebindings
authz.v2.RoleBindingsPostRequest:
properties:
id:
description: if present, implies updating existing rolebinding in its entirety, otherwise create new
type: string
resource_filter:
$ref: '#/components/schemas/authz.v2.ResourceFilter'
role_id:
description: role ID e.g., SystemOwner
type: string
subjects:
description: list of subjects
items:
$ref: '#/components/schemas/authz.v2.Subject'
type: array
required:
- resource_filter
- role_id
- subjects
authz.v2.RoleBindingsPostResponse:
properties:
request_id:
type: string
rolebinding:
$ref: '#/components/schemas/authz.v2.RoleBindingConfig'
required:
- rolebinding
authz.v2.RoleBindingsPostSubjectsRequest:
properties:
subjects:
items:
$ref: '#/components/schemas/authz.v2.Subject'
type: array
required:
- subjects
authz.v2.RoleBindingsPostSubjectsResponse:
properties:
request_id:
type: string
rolebinding:
$ref: '#/components/schemas/authz.v2.RoleBindingConfig'
required:
- rolebinding
authz.v2.RoleBindingsPutSubjectsRequest:
properties:
subjects:
items:
$ref: '#/components/schemas/authz.v2.Subject'
type: array
required:
- subjects
authz.v2.RoleBindingsPutSubjectsResponse:
properties:
request_id:
type: string
rolebinding:
$ref: '#/components/schemas/authz.v2.RoleBindingConfig'
required:
- rolebinding
authz.v2.RoleConfig:
properties:
description:
description: description for the role
type: string
id:
description: role ID e.g., SystemOwner
type: string
inherit_roles:
description: roles to be assigned as a result of the described action
items:
$ref: '#/components/schemas/authz.v2.InheritRoles'
type: array
metadata:
$ref: '#/components/schemas/meta.v1.ObjectMeta'
resource_kind:
description: resource type e.g., system
type: string
required:
- id
- resource_kind
- inherit_roles
- metadata
authz.v2.RolesListResponse:
properties:
request_id:
type: string
roles:
items:
$ref: '#/components/schemas/authz.v2.RoleConfig'
type: array
required:
- roles
authz.v2.Subject:
properties:
claim_config:
$ref: '#/components/schemas/authz.v2.ClaimConfig'
id:
description: subject ID (not needed for claim subjects)
type: string
kind:
description: subject type e.g., user
type: string
required:
- kind
blueprints.v1.BlueprintConfig:
properties:
blueprint:
type: string
resources:
items:
$ref: '#/components/schemas/blueprints.v1.Resource'
type: array
required:
- blueprint
- resources
blueprints.v1.BlueprintListResponse:
properties:
request_id:
type: string
result:
items:
type: string
type: array
required:
- result
blueprints.v1.BlueprintPostRequest: {}
blueprints.v1.BlueprintPostResponse:
properties:
request_id:
type: string
result:
$ref: '#/components/schemas/blueprints.v1.BlueprintConfig'
required:
- result
blueprints.v1.Resource:
properties:
id:
type: string
type:
type: string
required:
- id
- type
bundles.v1.RepoRoots:
properties:
commit:
type: string
id:
type: string
path:
type: string
ref:
type: string
repo:
type: string
roots:
items:
type: string
type: array
timestamp:
format: date-time
type: string
required:
- path
- timestamp
- id
- repo
- ref
- commit
- roots
bundles.v1.SBOM:
properties:
origins:
items:
$ref: '#/components/schemas/bundles.v1.RepoRoots'
type: array
crypto.FilterTree:
properties:
digest:
type: string
nodes:
additionalProperties:
$ref: '#/components/schemas/crypto.FilterTree'
type: object
crypto.Signature:
properties:
excluded:
$ref: '#/components/schemas/crypto.FilterTree'
signatures:
items:
$ref: '#/components/schemas/crypto.Signature.signatures'
type: array
crypto.Signature.signatures:
additionalProperties:
type: string
type: object
data.v1.BuiltinMocks:
properties:
dynamodb.get:
$ref: '#/components/schemas/data.v1.MocksDynamoDBGet'
dynamodb.query:
$ref: '#/components/schemas/data.v1.MocksDynamoDBQuery'
http.send:
$ref: '#/components/schemas/data.v1.MocksHttpSend'
mongodb.find:
$ref: '#/components/schemas/data.v1.MocksMongoDBFind'
mongodb.find_one:
$ref: '#/components/schemas/data.v1.MocksMongoDBFindOne'
neo4j.query:
$ref: '#/components/schemas/data.v1.MocksNeo4jQuery'
opa.runtime:
$ref: '#/components/schemas/data.v1.MocksOPARuntime'
redis.query:
$ref: '#/components/schemas/data.v1.MocksRedisQuery'
sql.send:
$ref: '#/components/schemas/data.v1.MocksSqlSend'
vault.send:
$ref: '#/components/schemas/data.v1.MocksVaultSend'
data.v1.BuiltinMocksResponse:
properties:
dynamodb.get:
$ref: '#/components/schemas/data.v1.MocksDynamoDBGetResponse'
dynamodb.query:
$ref: '#/components/schemas/data.v1.MocksDynamoDBQueryResponse'
http.send:
$ref: '#/components/schemas/data.v1.MocksHttpSendResponse'
mongodb.find:
$ref: '#/components/schemas/data.v1.MocksMongoDBFindResponse'
mongodb.find_one:
$ref: '#/components/schemas/data.v1.MocksMongoDBFindOneResponse'
neo4j.query:
$ref: '#/components/schemas/data.v1.MocksNeo4jQueryResponse'
redis.query:
$ref: '#/components/schemas/data.v1.MocksRedisQueryResponse'
sql.send:
$ref: '#/components/schemas/data.v1.MocksSqlSendResponse'
vault.send:
$ref: '#/components/schemas/data.v1.MocksVaultSendResponse'
data.v1.DataPatchResponse:
properties:
request_id:
type: string
result:
$ref: '#/components/schemas/data.v1.DataPatchResponse.result'
required:
- result
data.v1.DataPatchResponse.result: {}
data.v1.DataPutResponse:
properties:
request_id:
type: string
data.v1.DataRequest:
properties:
data:
description: Initial data object
type: object
input:
type: object
jsonpath:
description: Json Path expression to extract portions of documents
type: string
mocks:
$ref: '#/components/schemas/data.v1.BuiltinMocks'
nd_builtin_cache:
additionalProperties:
$ref: '#/components/schemas/data.v1.DataRequest.nd_builtin_cache'
description: Cache containing results of non-deterministic built-in functions
type: object
query_package:
description: The package name to be used with query in case of multiple rego modules
type: string
rego:
description: Rego query to be executed for the documents
type: string
rego_modules:
additionalProperties:
type: string
description: List of rego modules to be loaded and executed for the documents
type: object
replay:
description: Inject STYRA_DAS_REPLAY environment variable into opa.runtime().env
type: boolean
sandbox:
description: Only used explicitly provided policies and data. Do not load anything from DAS
type: boolean
strict:
description: Enable strict Rego compilation mode
type: boolean
data.v1.DataRequest.nd_builtin_cache:
type: object
data.v1.DataResponse:
properties:
mocks:
$ref: '#/components/schemas/data.v1.BuiltinMocksResponse'
request_id:
type: string
result:
$ref: '#/components/schemas/data.v1.DataResponse.result'
required:
- result
data.v1.DataResponse.result: {}
data.v1.MocksDynamoDBGet:
properties:
data:
description: mock dynamodb.get data, the noop function is used if the list is empty
items:
$ref: '#/components/schemas/data.v1.MocksDynamoDBGetData'
type: array
required:
- data
data.v1.MocksDynamoDBGetData:
properties:
key:
description: the key to fetch from the table
type: object
region:
description: the AWS region to query
type: string
result:
description: mock json result
type: object
table:
description: the Dynamo DB table to fetch from
type: string
required:
- table
- key
- region
- result
data.v1.MocksDynamoDBGetResponse:
properties:
mocked:
description: mock dynamodb.get response
items:
$ref: '#/components/schemas/data.v1.MocksDynamoDBResponseForGet'
type: array
unmocked:
description: mock dynamodb.get response
items:
$ref: '#/components/schemas/data.v1.MocksDynamoDBResponseForGet'
type: array
data.v1.MocksDynamoDBQuery:
properties:
data:
description: mock dynamodb.query data, the noop function is used if the list is empty
items:
$ref: '#/components/schemas/data.v1.MocksDynamoDBQueryData'
type: array
required:
- data
data.v1.MocksDynamoDBQueryData:
properties:
key_condition_expression:
description: the key matching expression for the query
type: string
region:
description: the AWS region to query
type: string
result:
description: mock json result
type: object
table:
description: the Dynamo DB table to fetch from
type: string
required:
- table
- key_condition_expression
- region
- result
data.v1.MocksDynamoDBQueryResponse:
properties:
mocked:
description: mock dynamodb.query response
items:
$ref: '#/components/schemas/data.v1.MocksDynamoDBResponseForQuery'
type: array
unmocked:
description: mock dynamodb.query response
items:
$ref: '#/components/schemas/data.v1.MocksDynamoDBResponseForQuery'
type: array
data.v1.MocksDynamoDBResponseForGet:
properties:
key:
description: the key to fetch from the table
type: object
region:
description: the AWS region to query
type: string
table:
description: the Dynamo DB table to fetch from
type: string
required:
- table
- key
- region
data.v1.MocksDynamoDBResponseForQuery:
properties:
key_condition_expression:
description: the key matching expression for the query
type: string
region:
description: the AWS region to query
type: string
table:
description: the Dynamo DB table to fetch from
type: string
required:
- table