-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yaml
662 lines (661 loc) · 18.2 KB
/
swagger.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
swagger: '2.0'
info:
description: >-
This is audit-api serves evidences for a continuous audit. In the EU-Sec project such evidences are collected and evaluated to determine the compliance status based on controls from the [ccm](https://cloudsecurityalliance.org/group/cloud-controls-matrix).
version: 1.0.8
title: EU-SEC CA API
termsOfService: http://www.sec-cert.eu/
contact:
email: [email protected]
url: http://www.sec-cert.eu/
basePath: /euseccaapi
tags:
- name: ca_api_scope
description: audit api calls
- name: ca_api_objects
description: audit api calls
- name: ca_api_persistence
description: audit api calls
- name: ca_api_iam
description: audit api calls
- name: ca_api_meta
description: audit api calls
schemes:
- https
- http
paths:
'/scopes/':
get:
tags:
- ca_api_scope
summary: Returns all scopes of the cloud service
description: >-
Returns the available scopes for the cloud service. The scope corresponds often with the layers of the cloud service architecture like IaaS, PaaS, SaaS.
operationId: getScopes
produces:
- application/json
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/ScopeResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiScope
'/{scope}/objects/':
get:
tags:
- ca_api_objects
summary: Returns Object ids of all objects that are in the scope of the audit.
description: >-
Returns the auditable object ids that are subject to the audit. The results can be limited according to a time range.
operationId: getObjects
produces:
- application/json
parameters:
- name: from
in: query
description: in ISO-8601 formart. Timestamp refers to the last change of the object. e.g 2005-08-15T15:52:01+0000
type: string
- name: to
in: query
description: in ISO-8601 formart Timestamp refers to the last change of the object. e.g 2005-08-15T15:52:01+0000
type: string
- name: limit
in: query
description: Limits the number of retuned values
required: false
type: integer
- name: scope
in: path
description: Scope of service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/ObjectResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiObjects
'/{scope}/persistence/{objectId}/storage/':
get:
tags:
- ca_api_persistence
summary: Returns persistence information for a particular data object by its Id
description: >-
Depending on the kind of storage this call returns an identifier of the
particular storage entity. E.g database name, RDS id, Harddrive, SMB
location etc. If stored on multiple services all are returned. Based on
CCM-GRM-02. This requires each logical object to be traceable to its
physical persistence capabilities.
operationId: getStorage
produces:
- application/json
parameters:
- name: objectId
in: path
description: ID of data object to return
required: true
type: string
- name: scope
in: path
description: Scope of service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/LocationStorageResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiPersistence
'/{scope}/persistence/{objectId}/location/':
get:
tags:
- ca_api_persistence
summary: >-
Returns location the ISO 3166-1 alpha-2 country code of the location of
the data of the object
description: >-
Retrieves the data location of an object. Returns location the ISO
3166-1 alpha-2 country code of the location of the data of the object. Based on
CCM-STA-05.
operationId: getLocation
produces:
- application/json
parameters:
- name: objectId
in: path
description: ID of either objectId on SaaS level or storeageId on lower level
required: true
type: string
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/GeoLocation'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiPersistence
'/{scope}/persistence/{objectId}/encryption':
get:
tags:
- ca_api_persistence
summary: Retrieves the encryption info of an object.
description: >-
Based on CCM-EKM-04. Retrieves the encryption info of an object. Propper
interpretation has to be performed by the audit tool.
operationId: getEncryptionInfo
produces:
- application/json
parameters:
- name: objectId
in: path
description: ID of either objectId on SaaS level or storeageId on lower level
required: true
type: string
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/EncryptionStorageResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiPersistence
'/{scope}/identityfederation/admins/':
get:
tags:
- ca_api_iam
summary: Returns a list of administrators
description: >-
Based on CCM-IAM-12. Reads out all administrators of the application and
returns them.
operationId: getAdmins
produces:
- application/json
parameters:
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AdminResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiIam
'/{scope}/identityfederation/{userId}/groups':
get:
tags:
- ca_api_iam
summary: Returns the groups of a user
description: >-
Based on CCM-IAM-12. Depending on the implementation a group can be e.g
a unix group, organisation, role etc.
operationId: getUserOrganisation
produces:
- application/json
parameters:
- name: userId
in: path
description: ID of user
required: true
type: string
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/GroupsResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiIam
'/{scope}/identityfederation/{userId}/auth':
get:
tags:
- ca_api_iam
summary: 'Returns the authentication type of a user. E.g password, two-factor'
description: >-
Based on CCM-IAM-12. Reads out a particular users authentication
settings and returns them. Propper interpretation has to be performed by
the audit tool.
operationId: getUserAuthType
produces:
- application/json
parameters:
- name: userId
in: path
description: ID of user
required: true
type: string
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AdminAuth'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiIam
'/{scope}/identityfederation/{userId}/logins':
get:
tags:
- ca_api_iam
summary: Returns a list of the last logins of a user
description: >-
Based on CCM-IAM-12. Whenever a user logs in into the application this
kind access gets logged. This call returns the last accesses of a
particular user based on existing logs.
operationId: getUserAccesses
produces:
- application/json
parameters:
- name: userId
in: path
description: ID of user
required: true
type: string
- name: from
in: query
description: from date in ISO-8601 format e.g 2005-08-15T15:52:01+0000
required: false
type: string
- name: to
in: query
description: to date in ISO-8601 format e.g 2005-08-15T15:52:01+0000
required: false
type: string
- name: limit
in: query
description: Limits the number of retuned values
required: false
type: integer
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/LoginResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiIam
'/{scope}/identityfederation/data/access':
post:
tags:
- ca_api_iam
summary: Checks whether a user has a certain access to an object.
description: Checks whether a user has a certain access to an object.
operationId: getObjectAccess
produces:
- application/json
parameters:
- name: request
in: body
description: request object
required: true
schema:
$ref: '#/definitions/AccessRequest'
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AccessResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiIam
'/{scope}/identityfederation/{userId}/passwordRequirements':
get:
tags:
- ca_api_iam
summary: returns the password requirements for a specific user
description: >-
Based on CCM-IAM-12. Strong authentication might require a strong password. Password requirements are a indicator for strong password and therefore can be part of an audit.
operationId: getPasswordRequirements
produces:
- application/json
parameters:
- name: userId
in: path
description: ID of user
required: true
type: string
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/PasswordRequirementsResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiIam
'/{scope}/meta/submitted':
get:
tags:
- ca_api_meta
summary: Returns a list of administrators
description: >-
Based on CCM-IVS-01. Gives information on when certain documents have been pushed dedicated endpoints of the customer
operationId: getSubmitted
produces:
- application/json
parameters:
- name: scope
in: path
description: Scope of the service
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/SubmittedResponse'
'405':
description: Invalid input
security:
- api_key: []
- basic_auth: []
x-swagger-router-controller: CaApiMeta
securityDefinitions:
basic_auth:
type: basic
api_key:
type: apiKey
name: api_key
in: header
definitions:
ScopeResponse:
type: object
properties:
scopes:
type: array
items:
type: string
example:
- SaaS
- PasS
- IaaS
required:
- scopes
ObjectResponse:
type: object
properties:
objects:
type: array
items:
type: object
properties:
id:
type: string
type:
type: string
example:
- id: m121
type: message
- id: f6
type: file
- id: COO.200.200.2.244
type: file
incomplete_result:
type: boolean
default: false
LocationStorageResponse:
type: object
properties:
storages:
type: array
items:
type: object
properties:
storageUri:
type: string
type:
$ref: '#/definitions/StorageType'
description:
type: string
description: Description should have comments that specify information, that will be stored in the description field. E.g., based on 5.6. call, description should contain technical details like database type with its version.
required:
- storageUri
- type
example:
- uri: i-0434c5582f2853d0c
type: service
description: AWS EC2 insctance
- uri: vol-04b6088c76eb68a73
type: service
description: AWS EBS instance
- uri: jdbc:mysql://192.168.0.10/SuperDB
type: database
required:
- storages
EncryptionStorageResponse:
type: object
properties:
encryption:
type: object
description: Object contains information about the key origin depending on type
properties:
keyOriginUri:
type: string
algorithm:
type: string
type:
$ref: '#/definitions/KeyOriginType'
description:
type: string
description: Comments on technical details of the key origin.
required:
- keyOriginUri
- type
example:
encryption:
keyOriginUri: hsm://secret.datacenterX
type: hsm
description: Supersecure HSM
algorithm: RSA-OAEP 2048 SHA-256
required:
- keyOrigin
AdminAuth:
type: object
properties:
type:
$ref: '#/definitions/AuthType'
description:
type: string
required:
- type
AccessType:
type: string
enum:
- fullAccess
- changeAccess
- readAccess
StorageType:
type: string
enum:
- database
- filesystem
- service
- other
KeyOriginType:
type: string
enum:
- hsm
- localKeyFile
- other
AuthType:
type: string
enum:
- oneFactor
- twoFactor
- multiFactor
GeoLocation:
type: object
properties:
countryCode:
type: string
example: at
description: ISO 3166-1 alpha-2 country code
required:
- countryCode
AccessRequest:
type: object
properties:
userId:
type: string
objectId:
type: string
access:
$ref: '#/definitions/AccessType'
required:
- userId
- objectId
- access
GroupsResponse:
type: object
properties:
groups:
type: array
items:
type: string
example:
- root
- awsEc2Full
- users
required:
- groups
LoginResponse:
type: object
properties:
loginTimes:
type: array
description: 'List of iso date time. Y-m-d\TH:i:sO ISO-8601'
items:
type: string
example:
- '2005-08-15T15:52:01+0000'
required:
- loginTimes
AccessResponse:
type: object
properties:
allowed:
type: boolean
description: true if access is allowd and false if its not.
required:
- allowed
AdminResponse:
type: object
properties:
admins:
type: array
items:
type: string
example:
- adminXYZ
- root
- caixaAuth
required:
- admins
PasswordRequirementsResponse:
type: object
properties:
passwordRequirements:
type: object
properties:
minimalLength:
type: integer
example: 10
upperAndLowerCaseEnforcement:
type: boolean
numericCharacterEnforcement:
type: boolean
specialCharacterEnforcement:
type: boolean
SubmittedResponse:
type: object
properties:
items:
type: array
items:
type: object
properties:
uri:
type: string
example: nextcloud.log
endpoint:
type: string
example: https://endpoint:8080?push
timeSubmitted:
type: string
description: to date in ISO-8601 format
example: 2005-08-15T15:52:01+0000