aboutsummaryrefslogtreecommitdiffstats
path: root/docs/sections/offeredapis.rst
blob: 8d84b63845a21cc6433e88ae7b36fbf275c07ea4 (plain)
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
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2020 NOKIA

Offered APIs
============

AAF Cert Service Api
--------------------

.. code-block:: yaml

    openapi: 3.0.1
    info:
      title: CertService Documentation
      description: Certification service API documentation
      version: 1.0.0
    servers:
      - url: http://localhost:8080
        description: Generated server url
    tags:
      - name: Actuator
        description: Monitor and interact
        externalDocs:
          description: Spring Boot Actuator Web API Documentation
          url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
    paths:
      /v1/certificate/{caName}:
        get:
          tags:
            - CertificationService
          summary: sign certificate
          description: Web endpoint for requesting certificate signing. Used by system
            components to gain certificate signed by CA.
          operationId: signCertificate
          parameters:
            - name: caName
              in: path
              description: Name of certification authority that will sign CSR.
              required: true
              schema:
                type: string
            - name: CSR
              in: header
              description: Certificate signing request in form of PEM object encoded in
                Base64 (with header and footer).
              required: true
              schema:
                type: string
            - name: PK
              in: header
              description: Private key in form of PEM object encoded in Base64 (with header
                and footer).
              required: true
              schema:
                type: string
          responses:
            "200":
              description: certificate successfully signed
              content:
                application/json; charset=utf-8:
                  schema:
                    $ref: '#/components/schemas/CertificationModel'
            "500":
              description: something went wrong during connecting to cmp client
              content:
                application/json; charset=utf-8:
                  schema:
                    $ref: '#/components/schemas/ErrorResponseModel'
            "404":
              description: CA not found for given name
              content:
                application/json; charset=utf-8:
                  schema:
                    $ref: '#/components/schemas/ErrorResponseModel'
            "400":
              description: given CSR or/and PK is incorrect
              content:
                application/json; charset=utf-8:
                  schema:
                    $ref: '#/components/schemas/ErrorResponseModel'
      /ready:
        get:
          tags:
            - CertificationService
          summary: check is container is ready
          description: Web endpoint for checking if service is ready to be used.
          operationId: checkReady
          responses:
            "200":
              description: configuration is loaded and service is ready to use
              content:
                application/json; charset=utf-8:
                  schema:
                    type: string
            "503":
              description: configuration loading failed and service is unavailable
              content:
                application/json; charset=utf-8:
                  schema:
                    type: string
      /reload:
        get:
          tags:
            - CertificationService
          summary: reload service configuration from file
          description: Web endpoint for performing configuration reload. Used to reload
            configuration file from file.
          operationId: reloadConfiguration
          responses:
            "200":
              description: configuration has been successfully reloaded
              content:
                application/json; charset=utf-8:
                  schema:
                    type: string
            "500":
              description: something went wrong during configuration loading
              content:
                application/json; charset=utf-8:
                  schema:
                    $ref: '#/components/schemas/ErrorResponseModel'
      /actuator/health:
        get:
          tags:
            - Actuator
          summary: Actuator web endpoint 'health'
          operationId: handle_0
          responses:
            "200":
              description: default response
              content: {}
      /actuator/health/**:
        get:
          tags:
            - Actuator
          summary: Actuator web endpoint 'health-path'
          operationId: handle_1
          responses:
            "200":
              description: default response
              content: {}
      /actuator:
        get:
          tags:
            - Actuator
          summary: Actuator root web endpoint
          operationId: links_2
          responses:
            "200":
              description: default response
              content: {}
    components:
      schemas:
        ErrorResponseModel:
          type: object
          properties:
            errorMessage:
              type: string
        CertificationModel:
          type: object
          properties:
            certificateChain:
              type: array
              items:
                type: string
            trustedCertificates:
              type: array
              items:
                type: string