blob: 8d84b63845a21cc6433e88ae7b36fbf275c07ea4 [file] [log] [blame]
Bogumil Zebek483ccbf2020-03-25 11:54:11 +01001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright 2020 NOKIA
4
5Offered APIs
6============
7
8AAF Cert Service Api
9--------------------
10
Bogumil Zebekbb60b592020-03-27 12:00:50 +010011.. code-block:: yaml
12
13 openapi: 3.0.1
14 info:
15 title: CertService Documentation
16 description: Certification service API documentation
17 version: 1.0.0
18 servers:
19 - url: http://localhost:8080
20 description: Generated server url
21 tags:
22 - name: Actuator
23 description: Monitor and interact
24 externalDocs:
25 description: Spring Boot Actuator Web API Documentation
26 url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
27 paths:
28 /v1/certificate/{caName}:
29 get:
30 tags:
31 - CertificationService
32 summary: sign certificate
33 description: Web endpoint for requesting certificate signing. Used by system
34 components to gain certificate signed by CA.
35 operationId: signCertificate
36 parameters:
37 - name: caName
38 in: path
39 description: Name of certification authority that will sign CSR.
40 required: true
41 schema:
42 type: string
43 - name: CSR
44 in: header
45 description: Certificate signing request in form of PEM object encoded in
46 Base64 (with header and footer).
47 required: true
48 schema:
49 type: string
50 - name: PK
51 in: header
52 description: Private key in form of PEM object encoded in Base64 (with header
53 and footer).
54 required: true
55 schema:
56 type: string
57 responses:
58 "200":
59 description: certificate successfully signed
60 content:
61 application/json; charset=utf-8:
62 schema:
63 $ref: '#/components/schemas/CertificationModel'
64 "500":
65 description: something went wrong during connecting to cmp client
66 content:
67 application/json; charset=utf-8:
68 schema:
69 $ref: '#/components/schemas/ErrorResponseModel'
70 "404":
71 description: CA not found for given name
72 content:
73 application/json; charset=utf-8:
74 schema:
75 $ref: '#/components/schemas/ErrorResponseModel'
76 "400":
77 description: given CSR or/and PK is incorrect
78 content:
79 application/json; charset=utf-8:
80 schema:
81 $ref: '#/components/schemas/ErrorResponseModel'
82 /ready:
83 get:
84 tags:
85 - CertificationService
86 summary: check is container is ready
87 description: Web endpoint for checking if service is ready to be used.
88 operationId: checkReady
89 responses:
90 "200":
91 description: configuration is loaded and service is ready to use
92 content:
93 application/json; charset=utf-8:
94 schema:
95 type: string
96 "503":
97 description: configuration loading failed and service is unavailable
98 content:
99 application/json; charset=utf-8:
100 schema:
101 type: string
102 /reload:
103 get:
104 tags:
105 - CertificationService
106 summary: reload service configuration from file
107 description: Web endpoint for performing configuration reload. Used to reload
108 configuration file from file.
109 operationId: reloadConfiguration
110 responses:
111 "200":
112 description: configuration has been successfully reloaded
113 content:
114 application/json; charset=utf-8:
115 schema:
116 type: string
117 "500":
118 description: something went wrong during configuration loading
119 content:
120 application/json; charset=utf-8:
121 schema:
122 $ref: '#/components/schemas/ErrorResponseModel'
123 /actuator/health:
124 get:
125 tags:
126 - Actuator
127 summary: Actuator web endpoint 'health'
128 operationId: handle_0
129 responses:
130 "200":
131 description: default response
132 content: {}
133 /actuator/health/**:
134 get:
135 tags:
136 - Actuator
137 summary: Actuator web endpoint 'health-path'
138 operationId: handle_1
139 responses:
140 "200":
141 description: default response
142 content: {}
143 /actuator:
144 get:
145 tags:
146 - Actuator
147 summary: Actuator root web endpoint
148 operationId: links_2
149 responses:
150 "200":
151 description: default response
152 content: {}
153 components:
154 schemas:
155 ErrorResponseModel:
156 type: object
157 properties:
158 errorMessage:
159 type: string
160 CertificationModel:
161 type: object
162 properties:
163 certificateChain:
164 type: array
165 items:
166 type: string
167 trustedCertificates:
168 type: array
169 items:
170 type: string
171