|
| 1 | +components: |
| 2 | +schemas: |
| 3 | +AccessRequestResponseBody: |
| 4 | +additionalProperties: false |
| 5 | +properties: |
| 6 | +$schema: |
| 7 | +description: A URL to the JSON Schema for this object. |
| 8 | +examples: |
| 9 | +- https://example.com/schemas/AccessRequestResponseBody.json |
| 10 | +format: uri |
| 11 | +readOnly: true |
| 12 | +type: string |
| 13 | +expiresAt: |
| 14 | +description: The timestamp the access will expire (RFC3339 format). |
| 15 | +examples: |
| 16 | +- "2024-02-14T18:25:50Z" |
| 17 | +format: date-time |
| 18 | +type: string |
| 19 | +message: |
| 20 | +description: A human readeable description with details about the access request. |
| 21 | +examples: |
| 22 | +- "Click the link to see more details: ..." |
| 23 | +type: string |
| 24 | +name: |
| 25 | +description: The access request name. |
| 26 | +examples: |
| 27 | +- some-accessrequest |
| 28 | +type: string |
| 29 | +namespace: |
| 30 | +description: The access request namespace. |
| 31 | +examples: |
| 32 | +- some-namespace |
| 33 | +type: string |
| 34 | +permission: |
| 35 | +description: The current permission description for the user. |
| 36 | +examples: |
| 37 | +- ReadOnly |
| 38 | +type: string |
| 39 | +requestedAt: |
| 40 | +description: The timestamp the access was requested (RFC3339 format). |
| 41 | +examples: |
| 42 | +- "2024-02-14T18:25:50Z" |
| 43 | +format: date-time |
| 44 | +type: string |
| 45 | +role: |
| 46 | +description: The current role the user is associated with. |
| 47 | +examples: |
| 48 | +- DevOps |
| 49 | +type: string |
| 50 | +status: |
| 51 | +description: The current access request status. |
| 52 | +enum: |
| 53 | +- REQUESTED |
| 54 | +- GRANTED |
| 55 | +- EXPIRED |
| 56 | +- DENIED |
| 57 | +examples: |
| 58 | +- GRANTED |
| 59 | +type: string |
| 60 | +username: |
| 61 | +description: The user associated with the access request. |
| 62 | +examples: |
| 63 | + |
| 64 | +type: string |
| 65 | +required: |
| 66 | +- name |
| 67 | +- namespace |
| 68 | +- username |
| 69 | +- permission |
| 70 | +type: object |
| 71 | +CreateAccessRequestBody: |
| 72 | +additionalProperties: false |
| 73 | +properties: |
| 74 | +$schema: |
| 75 | +description: A URL to the JSON Schema for this object. |
| 76 | +examples: |
| 77 | +- https://example.com/schemas/CreateAccessRequestBody.json |
| 78 | +format: uri |
| 79 | +readOnly: true |
| 80 | +type: string |
| 81 | +appName: |
| 82 | +description: The application to be associated with the access request (format <namespace>:<name>). |
| 83 | +examples: |
| 84 | +- some-namespace:app-name |
| 85 | +type: string |
| 86 | +username: |
| 87 | +description: The user to be associated with the access request. |
| 88 | +examples: |
| 89 | + |
| 90 | +type: string |
| 91 | +required: |
| 92 | +- username |
| 93 | +- appName |
| 94 | +type: object |
| 95 | +ErrorDetail: |
| 96 | +additionalProperties: false |
| 97 | +properties: |
| 98 | +location: |
| 99 | +description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id' |
| 100 | +type: string |
| 101 | +message: |
| 102 | +description: Error message text |
| 103 | +type: string |
| 104 | +value: |
| 105 | +description: The value at the given location |
| 106 | +type: object |
| 107 | +ErrorModel: |
| 108 | +additionalProperties: false |
| 109 | +properties: |
| 110 | +$schema: |
| 111 | +description: A URL to the JSON Schema for this object. |
| 112 | +examples: |
| 113 | +- https://example.com/schemas/ErrorModel.json |
| 114 | +format: uri |
| 115 | +readOnly: true |
| 116 | +type: string |
| 117 | +detail: |
| 118 | +description: A human-readable explanation specific to this occurrence of the problem. |
| 119 | +examples: |
| 120 | +- Property foo is required but is missing. |
| 121 | +type: string |
| 122 | +errors: |
| 123 | +description: Optional list of individual error details |
| 124 | +items: |
| 125 | +$ref: "#/components/schemas/ErrorDetail" |
| 126 | +type: |
| 127 | +- array |
| 128 | +- "null" |
| 129 | +instance: |
| 130 | +description: A URI reference that identifies the specific occurrence of the problem. |
| 131 | +examples: |
| 132 | +- https://example.com/error-log/abc123 |
| 133 | +format: uri |
| 134 | +type: string |
| 135 | +status: |
| 136 | +description: HTTP status code |
| 137 | +examples: |
| 138 | +- 400 |
| 139 | +format: int64 |
| 140 | +type: integer |
| 141 | +title: |
| 142 | +description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error. |
| 143 | +examples: |
| 144 | +- Bad Request |
| 145 | +type: string |
| 146 | +type: |
| 147 | +default: about:blank |
| 148 | +description: A URI reference to human-readable documentation for the error. |
| 149 | +examples: |
| 150 | +- https://example.com/errors/example |
| 151 | +format: uri |
| 152 | +type: string |
| 153 | +type: object |
| 154 | +ListAccessRequestResponseBody: |
| 155 | +additionalProperties: false |
| 156 | +properties: |
| 157 | +$schema: |
| 158 | +description: A URL to the JSON Schema for this object. |
| 159 | +examples: |
| 160 | +- https://example.com/schemas/ListAccessRequestResponseBody.json |
| 161 | +format: uri |
| 162 | +readOnly: true |
| 163 | +type: string |
| 164 | +items: |
| 165 | +items: |
| 166 | +$ref: "#/components/schemas/AccessRequestResponseBody" |
| 167 | +type: |
| 168 | +- array |
| 169 | +- "null" |
| 170 | +required: |
| 171 | +- items |
| 172 | +type: object |
| 173 | +info: |
| 174 | +title: Ephemeral Access API |
| 175 | +version: 0.0.1 |
| 176 | +openapi: 3.1.0 |
| 177 | +paths: |
| 178 | +/accessrequests: |
| 179 | +get: |
| 180 | +description: Will retrieve a list of accessrequests respecting the search criteria provided as query params. |
| 181 | +operationId: list-accessrequest |
| 182 | +parameters: |
| 183 | +- description: The trusted ArgoCD username header. This should be automatically sent by Argo CD API server. |
| 184 | + |
| 185 | +in: header |
| 186 | +name: Argocd-Username |
| 187 | +required: true |
| 188 | +schema: |
| 189 | +description: The trusted ArgoCD username header. This should be automatically sent by Argo CD API server. |
| 190 | +examples: |
| 191 | + |
| 192 | +type: string |
| 193 | +- description: The trusted ArgoCD user groups header. This should be automatically sent by Argo CD API server. |
| 194 | +example: group1,group2 |
| 195 | +in: header |
| 196 | +name: Argocd-User-Groups |
| 197 | +required: true |
| 198 | +schema: |
| 199 | +description: The trusted ArgoCD user groups header. This should be automatically sent by Argo CD API server. |
| 200 | +examples: |
| 201 | +- group1,group2 |
| 202 | +type: string |
| 203 | +- description: The trusted ArgoCD application header. This should be automatically sent by Argo CD API server. |
| 204 | +example: some-namespace:app-name |
| 205 | +in: header |
| 206 | +name: Argocd-Application-Name |
| 207 | +required: true |
| 208 | +schema: |
| 209 | +description: The trusted ArgoCD application header. This should be automatically sent by Argo CD API server. |
| 210 | +examples: |
| 211 | +- some-namespace:app-name |
| 212 | +type: string |
| 213 | +- description: The trusted ArgoCD project header. This should be automatically sent by Argo CD API server. |
| 214 | +example: some-project-name |
| 215 | +in: header |
| 216 | +name: Argocd-Project-Name |
| 217 | +required: true |
| 218 | +schema: |
| 219 | +description: The trusted ArgoCD project header. This should be automatically sent by Argo CD API server. |
| 220 | +examples: |
| 221 | +- some-project-name |
| 222 | +type: string |
| 223 | +- description: Will search for all access requests for the given username. |
| 224 | + |
| 225 | +explode: false |
| 226 | +in: query |
| 227 | +name: username |
| 228 | +schema: |
| 229 | +description: Will search for all access requests for the given username. |
| 230 | +examples: |
| 231 | + |
| 232 | +type: string |
| 233 | +- description: Will search for all access requests for the given application (format <namespace>:<name>). |
| 234 | +example: namespace:some-app-name |
| 235 | +explode: false |
| 236 | +in: query |
| 237 | +name: appName |
| 238 | +schema: |
| 239 | +description: Will search for all access requests for the given application (format <namespace>:<name>). |
| 240 | +examples: |
| 241 | +- namespace:some-app-name |
| 242 | +type: string |
| 243 | +responses: |
| 244 | +"200": |
| 245 | +content: |
| 246 | +application/json: |
| 247 | +schema: |
| 248 | +$ref: "#/components/schemas/ListAccessRequestResponseBody" |
| 249 | +description: OK |
| 250 | +default: |
| 251 | +content: |
| 252 | +application/problem+json: |
| 253 | +schema: |
| 254 | +$ref: "#/components/schemas/ErrorModel" |
| 255 | +description: Error |
| 256 | +summary: List AccessRequests |
| 257 | +post: |
| 258 | +description: Will create an access request for the given user and application. |
| 259 | +operationId: create-accessrequest |
| 260 | +parameters: |
| 261 | +- description: The trusted ArgoCD username header. This should be automatically sent by Argo CD API server. |
| 262 | + |
| 263 | +in: header |
| 264 | +name: Argocd-Username |
| 265 | +required: true |
| 266 | +schema: |
| 267 | +description: The trusted ArgoCD username header. This should be automatically sent by Argo CD API server. |
| 268 | +examples: |
| 269 | + |
| 270 | +type: string |
| 271 | +- description: The trusted ArgoCD user groups header. This should be automatically sent by Argo CD API server. |
| 272 | +example: group1,group2 |
| 273 | +in: header |
| 274 | +name: Argocd-User-Groups |
| 275 | +required: true |
| 276 | +schema: |
| 277 | +description: The trusted ArgoCD user groups header. This should be automatically sent by Argo CD API server. |
| 278 | +examples: |
| 279 | +- group1,group2 |
| 280 | +type: string |
| 281 | +- description: The trusted ArgoCD application header. This should be automatically sent by Argo CD API server. |
| 282 | +example: some-namespace:app-name |
| 283 | +in: header |
| 284 | +name: Argocd-Application-Name |
| 285 | +required: true |
| 286 | +schema: |
| 287 | +description: The trusted ArgoCD application header. This should be automatically sent by Argo CD API server. |
| 288 | +examples: |
| 289 | +- some-namespace:app-name |
| 290 | +type: string |
| 291 | +- description: The trusted ArgoCD project header. This should be automatically sent by Argo CD API server. |
| 292 | +example: some-project-name |
| 293 | +in: header |
| 294 | +name: Argocd-Project-Name |
| 295 | +required: true |
| 296 | +schema: |
| 297 | +description: The trusted ArgoCD project header. This should be automatically sent by Argo CD API server. |
| 298 | +examples: |
| 299 | +- some-project-name |
| 300 | +type: string |
| 301 | +requestBody: |
| 302 | +content: |
| 303 | +application/json: |
| 304 | +schema: |
| 305 | +$ref: "#/components/schemas/CreateAccessRequestBody" |
| 306 | +required: true |
| 307 | +responses: |
| 308 | +"200": |
| 309 | +content: |
| 310 | +application/json: |
| 311 | +schema: |
| 312 | +$ref: "#/components/schemas/AccessRequestResponseBody" |
| 313 | +description: OK |
| 314 | +default: |
| 315 | +content: |
| 316 | +application/problem+json: |
| 317 | +schema: |
| 318 | +$ref: "#/components/schemas/ErrorModel" |
| 319 | +description: Error |
| 320 | +summary: Create AccessRequest |
| 321 | +/accessrequests/{name}: |
| 322 | +get: |
| 323 | +description: Will retrieve the accessrequest by name |
| 324 | +operationId: get-accessrequest-by-name |
| 325 | +parameters: |
| 326 | +- description: The trusted ArgoCD username header. This should be automatically sent by Argo CD API server. |
| 327 | + |
| 328 | +in: header |
| 329 | +name: Argocd-Username |
| 330 | +required: true |
| 331 | +schema: |
| 332 | +description: The trusted ArgoCD username header. This should be automatically sent by Argo CD API server. |
| 333 | +examples: |
| 334 | + |
| 335 | +type: string |
| 336 | +- description: The trusted ArgoCD user groups header. This should be automatically sent by Argo CD API server. |
| 337 | +example: group1,group2 |
| 338 | +in: header |
| 339 | +name: Argocd-User-Groups |
| 340 | +required: true |
| 341 | +schema: |
| 342 | +description: The trusted ArgoCD user groups header. This should be automatically sent by Argo CD API server. |
| 343 | +examples: |
| 344 | +- group1,group2 |
| 345 | +type: string |
| 346 | +- description: The trusted ArgoCD application header. This should be automatically sent by Argo CD API server. |
| 347 | +example: some-namespace:app-name |
| 348 | +in: header |
| 349 | +name: Argocd-Application-Name |
| 350 | +required: true |
| 351 | +schema: |
| 352 | +description: The trusted ArgoCD application header. This should be automatically sent by Argo CD API server. |
| 353 | +examples: |
| 354 | +- some-namespace:app-name |
| 355 | +type: string |
| 356 | +- description: The trusted ArgoCD project header. This should be automatically sent by Argo CD API server. |
| 357 | +example: some-project-name |
| 358 | +in: header |
| 359 | +name: Argocd-Project-Name |
| 360 | +required: true |
| 361 | +schema: |
| 362 | +description: The trusted ArgoCD project header. This should be automatically sent by Argo CD API server. |
| 363 | +examples: |
| 364 | +- some-project-name |
| 365 | +type: string |
| 366 | +- description: The access request name. |
| 367 | +example: some-name |
| 368 | +in: path |
| 369 | +name: name |
| 370 | +required: true |
| 371 | +schema: |
| 372 | +description: The access request name. |
| 373 | +examples: |
| 374 | +- some-name |
| 375 | +type: string |
| 376 | +- description: The namespace to use while searching for the access request. |
| 377 | +example: some-namespace |
| 378 | +explode: false |
| 379 | +in: query |
| 380 | +name: namespace |
| 381 | +schema: |
| 382 | +description: The namespace to use while searching for the access request. |
| 383 | +examples: |
| 384 | +- some-namespace |
| 385 | +type: string |
| 386 | +responses: |
| 387 | +"200": |
| 388 | +content: |
| 389 | +application/json: |
| 390 | +schema: |
| 391 | +$ref: "#/components/schemas/AccessRequestResponseBody" |
| 392 | +description: OK |
| 393 | +default: |
| 394 | +content: |
| 395 | +application/problem+json: |
| 396 | +schema: |
| 397 | +$ref: "#/components/schemas/ErrorModel" |
| 398 | +description: Error |
| 399 | +summary: Get AccessRequest |
0 commit comments