-
Notifications
You must be signed in to change notification settings - Fork 11
/
AccountManager.yaml
739 lines (712 loc) · 26.8 KB
/
AccountManager.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
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
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
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.3.3
### 2.3.3
# - new parameter newStAKowner (new owner Standard Anwendungskennzeichen)
# - new eror code 424, when default Anwendungskennzeichen will be lost
### 2.3.2
# - changed servers -url for KIM 1.5.2 compatability
# - changed path (/account) for KIM 1.5.2 compatability
# - changed parameter iniPassword (maxlength and format)
# - changed parameter referenceId (maxlength) for KIM 1.5.2 compatability
# - added enum for regStat in schemas /Account for KIM 1.5.2 compatability
# - added in schemas /Account dataTimeToLive for KIM 1.5.2 compatability
# - 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.3/
# Die URL muss wie folgt gebildet werden:
# https://<FQDN gemäß DNS-SD SRV RR>:<Port gemäß DNS-SD SRV RR><Base-path gemäß TXT RR><path gemäß yaml Datei>
# Die SRV und TXT RR sind unter dem Resource Record Bezeichner <accmgr_service_name> zu finden.
tags:
- name: Email-Account
- name: Certificate
- name: Out of Office Notification
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: Initial password for the email account. The password is base64 encoded.
required: true
schema:
type: string
maxLength: 256
format: byte
requestBody:
description: Register 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.
409:
description: Conflict with existing account with identical e-mail (e-mail address already taken).
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
420:
description: Username or password do not comply with the rules.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
422:
description: KimVersion not supported or unknown.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
423:
description: VZD entry is locked.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
424:
description: default Anwendungskennzeichen will be lost.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}:
put:
tags:
- Email-Account
summary: Change account values.
The values of unspecified writable parameters are not changed.
# referenceID & username (in the body) cannot be changed via this operation
operationId: setAccount
parameters:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
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'
420:
description: New password does not comply with the rules.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
422:
description: KimVersion not supported or unknown.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
423:
description: VZD entry is locked.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
424:
description: default Anwendungskennzeichen will be lost.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
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:
- name: username
in: path
description: Username/E-Mail des Accounts
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
requestBody:
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/Account'
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'
424:
$ref: 'CommonSchemas.yaml#/components/responses/424'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
get:
tags:
- Email-Account
summary: Display the account
operationId: getAccount
parameters:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
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'
423:
$ref: 'CommonSchemas.yaml#/components/responses/423'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}/revokeDeregistration:
put:
tags:
- Email-Account
summary: Cancel account unregister.
operationId: revokeDeregistration
parameters:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
responses:
204:
description: Deregistration successfully canceled.
400:
$ref: 'CommonSchemas.yaml#/components/responses/400'
401:
$ref: 'CommonSchemas.yaml#/components/responses/401'
403:
description: Email account has not yet been deregistered.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
404:
$ref: 'CommonSchemas.yaml#/components/responses/404'
423:
description: VZD entry is locked.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}/accounts:
get:
tags:
- Email-Account
summary: List of all accounts of a telematics ID.
operationId: listAccounts
parameters:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
- name: telematikId
in: header
description: Optional parameter, if specified, the accounts can be found with one VZD query; two VZD queries are necessary for the username.
required: false
schema:
type: string
maxLength: 256
responses:
200:
description: List of all accounts of a telematics ID.
content:
application/json; charset=utf-8:
schema:
type: array
items:
$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}/OTP:
get:
tags:
- Porting
summary: The operation is used to port the email address to a new telematikID.
A one-time password will be issued for this.
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:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
responses:
200:
description: OTP generated successfully.
content:
application/json; charset=utf-8:
schema:
type: object
properties:
otp:
type: string
maxLength: 256
format: byte
description: One time password for porting the KIM email address to another telematikID.
The password is transmitted base64 encoded.
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: Porting the e-mail address to a new telematikID.
operationId: setTID
description: This operation removes the e-mail address from the previous VZD entry and carries the e-mail address
into the new VZD entry (which corresponds to the authentication data of this operation setTID
corresponds). Authentication takes place with the new card.
parameters:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
- in: header
name: otp
description: One Time Password (OTP) (returned by getOTP)
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
responses:
204:
description: Change of TelematikID successful.
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:
description: new VZD entry is locked.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
424:
description: default Anwendungskennzeichen will be lost.
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
500:
$ref: 'CommonSchemas.yaml#/components/responses/500'
502:
$ref: 'CommonSchemas.yaml#/components/responses/502'
/account/{username}/cert:
post:
tags:
- Certificate
summary: Create TLS AUT certificate
operationId: createCert
parameters:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
requestBody:
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/CertificateParameters'
responses:
200:
description: Certificate is returned.
content:
application/json; charset=utf-8:
schema:
type: object
properties:
file:
type: string
format: binary
description: Base64 encoded PKCS#12 container. If a password was passed in certPassword in the request,
then the container is protected with the password.
400:
description: Error in the input data, description of the error is in the error text
# e.g. no CommonName or CertPassword specified
content:
application/json; charset=utf-8:
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Error'
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:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
responses:
200:
description: Read the out-of-office message 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:
- name: username
in: path
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Username'
- in: header
name: password
description: Password for the email account. The password is base64 encoded.
required: true
schema:
$ref: 'CommonSchemas.yaml#/components/schemas/Password'
requestBody:
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/OutOfOfficeNotification'
responses:
204:
description: Change of out-of-office notice successful.
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:
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 with all KIM specialist services - support. Through the “setAccount”
Operation, this value cannot be changed.
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
maxLength: 16
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
maxLength: 3
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.
appTags:
type: array
items:
type: string
description: The appTags parameter contains all application tags associated with the assigned email address.
Exactly one application identifier is specified per form part. For multiple application indicators
the form part is specified multiple times (exploded=true). If no application identifier is specified
then existing application identifiers will be deleted.
newStAKowner:
type: string
maxLength: 256
format: email
description: email of new the Standard Anwendungskennzeichen account.
noVzdMailEntry:
type: boolean
description: If "noVzdMailEntry == true" then the AccountManager will use the VZD "mail" and "komLeData"
Attributes not filled or, in the case of PUT, existing mail and komLeData attributes are deleted.
This new attribute should only be supported on the client side by the Basis Consumer.
CertificateParameters:
type: object
properties:
commonName:
type: string
writeOnly: true
description: Will be included in the certificate attribute cn as <commonName> + "#CM"
The certificate is used as TLS client certificate for 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: Aktiviert bzw. deaktiviert die Abwesenheitsnotiz.
securitySchemes:
KIMBearerAuth:
$ref: 'CommonSchemas.yaml#/components/securitySchemes/KIMBearerAuth'