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