-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathAccountManager.yaml
More file actions
554 lines (527 loc) · 20.6 KB
/
Copy pathAccountManager.yaml
File metadata and controls
554 lines (527 loc) · 20.6 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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
openapi: 3.0.3
info:
title: I_AccountManager_Service
description: The KIM Account Manager is managed via this interface.
# The “utf-8” character set must be supported for all operations.
version: 2.4.0
### 2.4.0
# - changed servers url, for compatibility
# - remove parameter appTags and newStAKowner
# - remove error code 424
### 2.3.3
# - new parameter newStAKowner (new owner Standard Anwendungskennzeichen)
# - new error code 424, when default Anwendungskennzeichen will be lost
### 2.3.2
# - changed servers -url for KIM 1.5.2 compatibility
# - changed path (/account) for KIM 1.5.2 compatibility
# - changed parameter iniPassword (maxlength and format)
# - changed parameter referenceId (maxlength) for KIM 1.5.2 compatibility
# - added enum for regStat in schemas /Account for KIM 1.5.2 compatibility
# - added in schemas /Account dataTimeToLive for KIM 1.5.2 compatibility
# - added in schemas /Account maxMailSize (changed minimum and added maximum value) for KIM 1.5.2 compatability
### 2.3.1
# KIM 1.5.3 changes
# - values for regStat defined (registered and deregistered)
# - parameter password in createCert is optional (description changed)
# - descriptions changed
# - read only parameter in setAccount removed
# - new parameter appTags in registerAccount and setAccount
# - added traceId to Error object
# - changed servers -url
# - added "noVzdMailEntry" flag for POST /account and PUT /account/{username}
# - changed type for password format to byte
# - new error code for VZD entry is locked
### 2.3.0
# - change server url to new api version
# - added /account/{username}/revokeDeregistration
# to allow customers to revoke the deregistration process
# - changed description for externalDoc to Github
# - added status Code 502 for operation createCert in case the account manager acts as a proxy
# - added status Code 403 for operation setTID in case the token is not valid
# - added format int64 for deregDate property
# - changed otp property to lowercase and added password as format
# - added response code 404 for getOTP in case e-mail account does not exist
# - added response code 404 for deregisterAccount in case e-mail account does not exist
### 2.2.0
# - updated url to https://account-manager.hrst1.kim.telematik/AccountMgmt/v2.2
# - changed /components/schemas/Account:
# added parameter dataTimeToLive & maxMailSize
# specified kimVersion with enum
# - changed operation createCert:
# added error codes 400 & 404
### 2.0.0
# - included new operations for outOfOffice
# - included new operations for porting an e-mail address to new telematikID
# - removed operations: register_State, cm_version and pw_change
# - added new operations setAccount and getAccount
# - renamed and updated operations for user account (e.g. registerAccount and
# deregisterAccount)
# - added operation createCert to generate PKCS#12 files
# - added HTTP error code 500
# - changed authentication to JWT
### 1.2.0
# - added parameter "cert" to all operations. It includes the auth certificate to sign the operation. This is necessary to check the sign from the Server.
# - adjusted some tags
# - more specified parameter "username" (email & maxlength)
# - changed response code of the operation "register" from 200 - OK to 201 - created
# - changed http method in operation "deregister" from PUT to DELETE
# - changed http method in operation "cm_version" from GET to PUT
# - changed response in operation "register_state" to JSON format
### 1.1.2
# - added parameter "referenceID" in operation "register"
### 1.1.1
# - extended URI to interface releases
### 1.1.0
# - added authentication with HBA/SMC-B
### 1.0.0
# - initial Version of I_AccountManager_Service
externalDocs:
description: GitHub documentation
url: https://github.com/gematik/api-kim
servers:
- url: /AccountMgmt/v2.4/
# The URL must be formed as described in requirement [A_19524-*], see https://gemspec.gematik.de/docs/gemSpec/gemSpec_FD_KOMLE/latest
tags:
- name: Email-Account
- name: Certificate
- name: Out of Office Notification
- name: Porting
security:
- KIMBearerAuth: []
# Authentication is carried out for all operations via a JWT
paths:
/account:
post:
tags:
- Email-Account
summary: Register a new email account.
# In all error cases, the account is not created.
operationId: registerAccount
parameters:
- in: header
name: iniPassword
description: Optional initial password for the email account. When provided, the value must be base64 encoded.
# To see if the service requires an initial password, check ServiceInformation.initialPasswordRequired.
required: false
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
requestBody:
description: Register a new account.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/Account'
required: true
responses:
204:
description: Account registered successfully.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
# Authentication via referenceID/iniPassword and signature of the operation failed.
# This error also occurs if the referenceID does not match the signature's AUT certificate (cert) or was not specified.
403:
description: Initial password must be changed before this operation is allowed; it was not changed as required (see A_21385-*).
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
409:
description: An account with the same email address already exists.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
422:
$ref: 'CommonSchemas.yaml#/components/responses/422'
423:
$ref: 'CommonSchemas.yaml#/components/responses/423'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}:
put:
tags:
- Email-Account
summary: Change account values.
Unspecified writable properties remain unchanged.
# referenceID & username (in the body) cannot be changed via this operation
operationId: setAccount
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
requestBody:
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/Account'
responses:
204:
description: Account change successful.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
422:
$ref: 'CommonSchemas.yaml#/components/responses/422'
423:
$ref: 'CommonSchemas.yaml#/components/responses/423'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
delete:
tags:
- Email-Account
summary: Deregisters a mail account.
operationId: deregisterAccount
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
responses:
204:
description: Account deregistered successfully.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
get:
tags:
- Email-Account
summary: Display the account details.
operationId: getAccount
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
responses:
200:
description: Display the account.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/Account'
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}/revokeDeregistration:
put:
tags:
- Email-Account
summary: Revoke account deregistration.
operationId: revokeDeregistration
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
responses:
204:
description: Deregistration revoked successfully.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
403:
description: The email account has not been deregistered yet.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
423:
$ref: 'CommonSchemas.yaml#/components/responses/423'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}/OTP:
get:
tags:
- Porting
summary: Generate a one-time password (OTP) for porting the email address to a new telematikID.
operationId: getOTP
description: This operation creates a One Time Password (OTP) for the KIM account/email address,
with which the email address can be ported to a telematikID (card).
Authentication takes place with the previous card.
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
responses:
200:
description: OTP generated successfully.
content:
application/json; charset=utf-8:
schema:
type: object
properties:
otp:
type: string
maxLength: 256
format: byte
# Value must be base64 encoded.
description: One-time password for porting the KIM email address to another telematikID.
The password must be transmitted as a base64-encoded value.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
/account/{username}/telematikID:
put:
tags:
- Porting
summary: Port the email address to a new telematikID.
operationId: setTID
description: This operation removes the email address from the previous VZD entry and writes it
to the new VZD entry that corresponds to the authentication data used for setTID.
Authentication is performed with the new card/identitity.
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
- in: header
name: otp
description: One-time password (OTP) returned by getOTP.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
responses:
204:
description: TelematikID changed successfully.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
403:
description: Invalid OTP
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
408:
description: Request Timeout
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
423:
$ref: 'CommonSchemas.yaml#/components/responses/423'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}/cert:
post:
tags:
- Certificate
summary: Create a TLS AUT certificate.
operationId: createCert
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
requestBody:
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/CertificateParameters'
responses:
200:
description: Returns the certificate.
content:
application/json; charset=utf-8:
schema:
type: object
properties:
file:
type: string
format: binary
description: Base64-encoded PKCS#12 container. If certPassword is provided in the request,
the container is protected with that password.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
# e.g. no CommonName or CertPassword specified
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
# CMP service cannot be reached or returns errors
/account/{username}/outofoffice:
get:
tags:
- Out of Office Notification
summary: Read the Out of Office Notification
operationId: getOutOfOffice
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
responses:
200:
description: Out-of-office message returned successfully.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/OutOfOfficeNotification'
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
put:
tags:
- Out of Office Notification
summary: Update the Out of Office Notification
operationId: updateOutOfOffice
parameters:
- $ref: '#/components/parameters/AccountUsername'
- $ref: '#/components/parameters/AccountPassword'
requestBody:
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/OutOfOfficeNotification'
responses:
204:
description: Out-of-office notification updated successfully.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
components:
parameters:
AccountUsername:
name: username
in: path
description: Username or email address of the account.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
AccountPassword:
in: header
name: password
description: Password for the email account. The value must be base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
schemas:
Account:
type: object
properties:
referenceID:
type: string
maxLength: 256
description: The KIM provider determines the referenceID and communicates it to the KIM participant.
For example, it can contain a contract number or a registration code.
The KIM provider must inform its KIM participants about the use of this parameter.
All administration modules (or client modules) must use this parameter - because of the
Interoperability support required by all KIM specialist services. This value cannot be changed
through the "setAccount" operation.
username:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
password:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
kimVersion:
type: string
maxLength: 4
example: 1.5+
description: The KIM participant can change his KIM version. The range of values supported
KIM versions should be specified by the client module.
regStat:
type: string
enum:
- registered
- deregistered
example: registered
description: The registration status of the account. Valid values are registered and deregistered.
deregDate:
type: integer
format: int64
example: 1616588543
description: Confirmed termination date (Unix timestamp).
Until deregDate POP3 is usable.
dataTimeToLive:
type: integer
minimum: 10
maximum: 365
default: 90
example: 90
description: Storage period for emails and attachments on the KAS service.
Specified in days.
maxMailSize:
type: integer
format: int64
minimum: 734003200
maximum: 734003200
example: 734003200
readOnly: true
description: The maximum size of a KIM email in bytes.
noVzdMailEntry:
type: boolean
description: If "noVzdMailEntry == true", the VZD does not populate the data in "mail" and
"komLeData" attributes. In the case of PUT, existing "mail" and "komLeData" attributes are deleted by the VZD.
This attribute should only be supported on the client side by the Basis Consumer.
CertificateParameters:
type: object
properties:
commonName:
type: string
writeOnly: true
description: Included in the certificate attribute cn as <commonName> + "#CM".
The certificate is used as a TLS client certificate when connecting to the KIM services.
certPassword:
# base64 encoded password for the PKCS#12 container in which the certificate is transported.
# If no certPassword is specified, then the PKCS#12 container will not be encrypted.
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
OutOfOfficeNotification:
type: object
properties:
startDate:
type: string
format: date-time
example: 2021-07-20T17:32:28Z
description: From this point on, the absence notice will be sent.
endDate:
type: string
format: date-time
example: 2021-07-28T17:32:28Z
description: After this point, the out-of-office notice will no longer be sent.
message:
type: string
maxLength: 2048
description: Contents of the out-of-office note.
active:
type: boolean
description: Enables or disables the out-of-office notification.
securitySchemes:
KIMBearerAuth:
$ref: 'CommonSchemas.yaml#/components/securitySchemes/KIMBearerAuth'