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