-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathuserManagerAPI.yaml
More file actions
287 lines (287 loc) · 8.02 KB
/
userManagerAPI.yaml
File metadata and controls
287 lines (287 loc) · 8.02 KB
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
openapi: 3.0.0
servers:
- url: 'https://geofs.uni-muenster.de:8443/'
info:
title: geofs User Manager 5000
description: API for managing LDAP Users
version: 1.0.0
paths:
/api/login:
summary: Authenticate User
post:
tags:
- Authentication
requestBody:
description: User to be authenticated. Password is expected to be hex-encoded sha512 hash.
required: true
content:
application/json:
example:
username: bilbo_baggins
password: XXXXXXXXXXXXXXXX
fs: hobbits
schema:
$ref: '#/components/schemas/UserObject'
responses:
'200':
description: A unique Session Token
content:
application/json:
schema:
type: string
example: >-
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
'403':
description: >-
Error authenticating the User against the LDAP Backend. Either
Request was malformed or user is not authorized to access this
application
'500':
description: Error authenticating the User agains the LDAP Backend.
/api/users/list:
summary: Gets a list of all registered users
get:
tags:
- UserManagement
responses:
'200':
description: Gets a list of all registered users
content:
application/json:
schema:
type: array
title: Userlist
items:
$ref: '#/components/schemas/UserListObject'
'500':
description: Error interacting with the LDAP Backend
/api/groups/list:
summary: Gets a list of all groups
get:
tags:
- GroupManagement
responses:
'200':
description: Gets a list of all groups
content:
application/json:
schema:
type: array
title: Grouplist
items:
$ref: '#/components/schemas/GroupListObject'
'500':
description: Error interacting with the LDAP Backend
/api/users/add:
summary: Add new user to LDAP Database
post:
tags:
- UserManagement
requestBody:
description: Adds the new User to the Database. Password is expected to be hex-encoded sha512 hash.
required: true
content:
application/json:
example:
username: bilbo_baggins
password: XXXXXXXXXXXXXXXX
fs: hobbits
schema:
$ref: '#/components/schemas/UserObject'
responses:
'200':
description: User was sucessfully added
'400':
description: UserObject was malformed
'409':
description: User already present in the System
'500':
description: Error adding user to the LDAP Backend
/api/users/remove:
summary: Removes user from LDAP Database
post:
tags:
- UserManagement
requestBody:
description: Removes a user from the Database
required: true
content:
application/json:
example:
username: bilbo_baggins
schema:
$ref: '#/components/schemas/UserObject'
responses:
'200':
description: User was sucessfully removed
'400':
description: UserObject was malformed
'500':
description: Error removing user from the LDAP Backend
/api/users/removeFromGroup:
summary: Removes user from specified Group
post:
tags:
- UserManagement
requestBody:
description: Removes user from specified Group
required: true
content:
application/json:
example:
username: bilbo_baggins
groupname: hobbits
schema:
$ref: '#/components/schemas/UserObject'
responses:
'200':
description: User was sucessfully removed
'400':
description: UserObject was malformed
'500':
description: Error interacting with the LDAP Backend
/api/users/addToGroup:
summary: Adds user to specified Group
post:
tags:
- UserManagement
requestBody:
description: Adds user to specified Group
required: true
content:
application/json:
example:
username: bilbo_baggins
groupname: hobbits
schema:
$ref: '#/components/schemas/UserObject'
responses:
'200':
description: User was sucessfully added
'400':
description: UserObject was malformed
'500':
description: Error interacting with the LDAP Backend
/api/users/changePassword:
summary: Changes the Password of the specified User
post:
tags:
- UserManagement
requestBody:
description: Changes the Password of the specified User. Password is expected to be hex-encoded sha512 hash.
required: true
content:
application/json:
example:
username: bilbo_baggins
password: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
schema:
$ref: '#/components/schemas/UserObject'
responses:
'200':
description: User was sucessfully added
'400':
description: UserObject was malformed
'500':
description: Error interacting with the LDAP Backend
/api/groups/add:
summary: Adds a new Group to the LDAP Backend
post:
tags:
- GroupManagement
requestBody:
description: Adds a new Group to the LDAP Backend
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GroupObject'
responses:
'200':
description: User was sucessfully added
'400':
description: GroupObject was malformed
'500':
description: Error interacting with the LDAP Backend
/api/groups/remove:
summary: Removes a new Group from the LDAP Backend
post:
tags:
- GroupManagement
requestBody:
description: Removes a new Group from the LDAP Backend
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GroupObject'
responses:
'200':
description: User was sucessfully added
'400':
description: GroupObject was malformed
'500':
description: Error interacting with the LDAP Backend
components:
schemas:
UserListObject:
type: object
title: UserListObject
additionalProperties: false
properties:
name:
type: string
groups:
type: string
required:
- name
- groups
example:
name: 'cn=gandalf_the_white,o=heroes'
groups: 'cn=wizards,cn=heroes'
GroupListObject:
type: object
title: GroupListObject
additionalProperties: false
properties:
name:
type: string
members:
type: string
required:
- name
- members
example:
name: cn=heroes
members: 'cn=gandalf_the_white,o=heroes,cn=bilbo_baggins,o=heroes'
UserObject:
type: object
title: UserObject
additionalProperties: false
properties:
username:
type: string
password:
type: string
fs:
type: string
group:
type: string
required:
- username
example:
username: bilbo_baggins
password: XXXXXXXXXXXXXXXX
fs: hobbits
group: heroes
GroupObject:
type: object
title: GroupObject
additionalProperties: false
properties:
groupname:
type: string
required:
- groupname
example:
groupname: wizards