-
Notifications
You must be signed in to change notification settings - Fork 1
/
ishare-credentials-management-api.yaml
127 lines (122 loc) · 3.57 KB
/
ishare-credentials-management-api.yaml
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
openapi: 3.0.3
info:
description: 'This spec provides the credentials management api for the iShare auth-provider.'
version: 0.0.1
title: iShare Credentials Management API
contact:
email: [email protected]
tags:
- name: CredentialsManagement
description: "Endpoints for managing the credentials."
servers:
- url: http://localhost:8080
description: "Local test server address."
paths:
'/credentials':
get:
tags:
- CredentialsManagement
description: "Get all clientIds that have credentials configured."
operationId: getCredentialsList
responses:
'200':
description: "List of clientIds."
content:
application/json:
schema:
type: array
items:
type: string
'/credentials/{clientId}':
post:
tags:
- CredentialsManagement
parameters:
- $ref: '#/components/parameters/clientId'
description: "Create a new endpoint configuration."
operationId: postCredentials
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/IShareCredentials'
responses:
'201':
description: "Created."
'400':
description: "Received an invalid credentials definition."
'409':
description: "Client already exists."
delete:
tags:
- CredentialsManagement
parameters:
- $ref: '#/components/parameters/clientId'
description: "Delete the client-credentials for the given id."
operationId: deleteCredentials
responses:
'204':
description: "The client was successfully removed."
'404':
description: "No such client exists."
'/credentials/{clientId}/certificateChain':
put:
tags:
- CredentialsManagement
parameters:
- $ref: '#/components/parameters/clientId'
description: "Update the certificate chain for a given client."
operationId: putCertificateChain
requestBody:
required: true
content:
text/plain:
schema:
type: string
responses:
'204':
description: "The certificate chain was successfully updated."
'404':
description: "No such client exists."
'/credentials/{clientId}/signingKey':
put:
tags:
- CredentialsManagement
parameters:
- $ref: '#/components/parameters/clientId'
description: "Update the certificate chain for a given client."
operationId: putSigningKey
requestBody:
required: true
content:
text/plain:
schema:
type: string
responses:
'204':
description: "The signing key was successfully updated."
'404':
description: "No such client exists."
components:
parameters:
clientId:
name: clientId
description: "Id of the client."
in: path
required: true
schema:
type: string
schemas:
IShareCredentials:
description: "Credentials to be used for the iShare client."
properties:
certificateChain:
description: "Certificate chain to be used in the x5c-header. Needs to be in pkcs12-cer format."
type: string
signingKey:
description: "Signing key to be used for the iShare JWT. Needs to be in pk8 format."
type: string
required:
- certificateChain
- signingKey