-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmobileid.yaml
executable file
·799 lines (746 loc) · 25.1 KB
/
mobileid.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
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
openapi: 3.0.3
info:
title: Mobile ID REST API
description: |
Mobile ID API for requesting mobile signatures.
version: 1.0.1
servers:
- url: https://mobileid.swisscom.com
tags:
- name: ETSI TS 102 204 REST API
description: ETSI TS 102 204 based REST API for requesting Mobile Signature Service
paths:
/rest/service/sign:
post:
tags:
- ETSI TS 102 204
summary: Send a Mobile Signature Service request
requestBody:
description: Mobile Signature Service request
content:
application/json:
schema:
title: SignatureReq
type: object
properties:
MSS_SignatureReq:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["1"]
example: '1'
MinorVersion:
type: string
enum: ["2"]
example: '2'
MobileUser:
$ref: '#/components/schemas/MobileUser'
MessagingMode:
type: string
enum: ['asynch', 'synch']
SignatureProfile:
$ref: '#/components/schemas/SignatureProfile'
TimeOut:
type: string
DataToBeSigned:
$ref: '#/components/schemas/DataToBeSigned'
AdditionalServices:
type: array
items:
$ref: '#/components/schemas/AdditionalService'
required:
- AP_Info
- MSSP_Info
- MobileUser
- MessagingMode
- MajorVersion
- MinorVersion
- DataToBeSigned
- AdditionalServices
- SignatureProfile
- TimeOut
required:
- MSS_SignatureReq
required: true
responses:
200:
description: A Mobile Signature response has been received. Check the StatusCode for details. In asynchorous mode this will never contain a signature, and contains an MSSP_TransId instead.
content:
application/json:
schema:
title: SignatureResp
type: object
properties:
MSS_SignatureResp:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["1"]
example: '1'
MinorVersion:
type: string
enum: ["1"]
example: '1'
MobileUser:
$ref: '#/components/schemas/MobileUser'
MSSP_TransID:
type: string
example: 'h44okl'
MSS_Signature:
$ref: '#/components/schemas/MSS_Signature'
Status:
$ref: '#/components/schemas/SignatureStatus'
SignatureProfile:
$ref: '#/components/schemas/SignatureProfile'
ServiceResponses:
type: array
items:
$ref: '#/components/schemas/ServiceResponse'
500:
description: Mobile Signature request failed. See fault error code for details.
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/rest/service/status:
post:
tags:
- ETSI TS 102 204
summary: Request the Mobile Signature Service status of an asynchronous signature request.
requestBody:
description: Status request
content:
application/json:
schema:
title: StatusReq
type: object
properties:
MSS_StatusReq:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["1"]
MinorVersion:
type: string
enum: ["1"]
MSSP_TransID:
type: string
example: 'h4iof'
required:
- AP_Info
- MSSP_Info
- MajorVersion
- MinorVersion
- MSSP_TransID
required:
- MSS_StatusReq
required: true
responses:
200:
description: Mobile Signature Service response has been received. Check the StatusCode for details.
content:
application/json:
schema:
title: StatusResp
type: object
properties:
MSS_StatusResp:
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["1"]
MinorVersion:
type: string
enum: ["1"]
MobileUser:
$ref: '#/components/schemas/MobileUser'
MSS_Signature:
$ref: '#/components/schemas/MSS_Signature'
Status:
$ref: '#/components/schemas/SignatureStatus'
ServiceResponses:
type: array
items:
$ref: '#/components/schemas/ServiceResponse'
500:
description: Mobile Signature Service status query failed. See fault error code for details
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/rest/service/receipt:
post:
tags:
- ETSI TS 102 204
summary: Send the Mobile Signature Receipt. You can send the Receipt after a successful Mobile Signature.
requestBody:
description: Mobile Signature Service Receipt request
content:
application/json:
schema:
title: ReceiptReq
type: object
properties:
MSS_ReceiptReq:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["1"]
MinorVersion:
type: string
enum: ["1"]
MSSP_TransID:
$ref: '#/components/schemas/MSSP_TransID'
Message:
$ref: '#/components/schemas/ReceiptMessage'
MobileUser:
$ref: '#/components/schemas/MobileUser'
Status:
$ref: '#/components/schemas/ReceiptReqStatus'
required:
- AP_Info
- MSSP_Info
- MajorVersion
- MinorVersion
- MSSP_TransID
- Status
- MobileUser
- Message
required:
- MSS_ReceiptReq
required: true
responses:
200:
description: Mobile Signature Service Receipt request has been send. Check the Status for details.
content:
application/json:
schema:
title: ReceiptResp
type: object
properties:
MSS_ReceiptResp:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["1"]
MinorVersion:
type: string
enum: ["1"]
Status:
$ref: '#/components/schemas/ReceiptRespStatus'
500:
description: Mobile Signature Service Receipt sending failed. See fault error code for details
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
/rest/service/profile:
post:
tags:
- ETSI TS 102 204
summary: Query Mobile Signature Service Profile of an user.
requestBody:
description: Send a Profile request
content:
application/json:
schema:
title: ProfileReq
type: object
properties:
MSS_ProfileReq:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["2"]
MinorVersion:
type: string
enum: ["0"]
Params:
type: string
example: 'sscds state certs pinstatus rcstatus aastatus'
MobileUser:
$ref: '#/components/schemas/MobileUser'
required:
- AP_Info
- MSSP_Info
- MajorVersion
- MinorVersion
- Params
- MobileUser
required:
- MSS_ProfileReq
required: true
responses:
200:
description: Profile Query succeeded and user is eligible for Mobile Signature Service. See the Status element for profile details of the user.
content:
application/json:
schema:
title: ProfileResp
type: object
properties:
MSS_ProfileResp:
type: object
properties:
AP_Info:
$ref: '#/components/schemas/AP_Info'
MSSP_Info:
$ref: '#/components/schemas/MSSP_Info'
MajorVersion:
type: string
enum: ["2"]
MinorVersion:
type: string
enum: ["0"]
SignatureProfile:
type: array
items:
$ref: '#/components/schemas/SignatureProfile'
Status:
$ref: '#/components/schemas/ProfileStatus'
500:
description: Profile Query failed. See fault error code for details
content:
application/json:
schema:
$ref: '#/components/schemas/Fault'
components:
schemas:
Fault:
type: object
properties:
Fault:
type: object
properties:
Code:
type: object
properties:
Value:
type: string
example: 'Receiver'
ValueNs:
type: string
example: 'http://www.w3.org/2003/05/soap-envelope'
SubCode:
type: object
properties:
Value:
type: string
example: '_401'
ValueNs:
type: string
example: 'http://uri.etsi.org/TS102204/v1.1.2#'
Detail:
type: string
example: 'User cancelled the request'
Reason:
type: string
example: 'USER_CANCEL'
MSSP_TransID:
type: string
example: 'h4iof'
ReceiptMessage:
type: object
properties:
MimeType:
type: string
description: MIME type of the data.
example: 'text/plain'
Encoding:
type: string
description: Data encoding
example: 'UTF-8'
Data:
type: string
example: 'Receipt message'
required:
- MimeType
- Encoding
- Data
MSS_Signature:
type: object
properties:
Base64Signature:
type: string
description: Signature in Base64 format
example: 'MIIIdwYJKoZIhvc...'
format: byte
DataToBeSigned:
type: object
description: Data that the user signs
properties:
MimeType:
type: string
description: MIME type of the data.
example: 'text/plain'
Encoding:
type: string
description: Data encoding
example: 'UTF-8'
Data:
type: string
example: 'Please sign this'
required:
- MimeType
- Encoding
- Data
MobileUser:
type: object
description: Mobile user.
properties:
MSISDN:
type: string
description: User MSISDN
example: '+2280112xxx'
required:
- MSISDN
MSSP_Info:
type: object
properties:
MSSP_ID:
$ref: '#/components/schemas/MSSP_ID'
Instant:
type: string
example: '2021-04-07T11:00:00.100Z'
description: MSSP timestamp. This is not required in request messages
format: date-time
required:
- MSSP_ID
- Instant
MSSP_ID:
type: object
properties:
URI:
type: string
example: 'http://mid.swisscom.ch/'
required:
- URI
AP_Info:
type: object
properties:
AP_ID:
type: string
example: 'yourAP_ID'
AP_PWD:
type: string
example: 'yourAP_PWD'
AP_TransID:
type: string
example: 'REF0101120000'
Instant:
type: string
example: '2021-04-01T11:00:00.000Z'
format: date-time
required:
- AP_ID
- AP_PWD
- AP_TransID
- Instant
AdditionalService:
type: object
description: Additional Service in the Mobile Signature request.
properties:
Description:
type: string
enum: ['http://mss.ficom.fi/TS102204/v1.0.0#userLang',
'http://mid.swisscom.ch/as#geofencing',
'http://mid.swisscom.ch/as#app2app',
'http://mid.swisscom.ch/as#subscriberInfo']
UserLang:
type: object
nullable: true
properties:
Value:
type: string
example: 'DE'
App2App:
type: object
nullable: true
properties:
RedirectUri:
type: string
example: 'myapp://example'
required:
- Description
example:
Description: http://mss.ficom.fi/TS102204/v1.0.0#userLang
UserLang:
Value: 'DE'
ServiceResponse:
type: object
description: Response to a requested Additional Service. One ServiceResponse element contains response of only one AdditionalService. Check the description to resolve which response type it contains.
properties:
Description:
type: string
enum: ['http://mid.swisscom.ch/as#geofencing',
'http://mid.swisscom.ch/as#app2app',
'http://mid.swisscom.ch/as#subscriberInfo']
Geofencing:
type: object
nullable: true
description: Response to geofencing AdditionalService. Can be an error, or succesful response. Is an error if ErrorCode is present.
properties:
Country:
type: string
example: 'CH'
Accuracy:
type: string
example: '16'
DeviceConfidence:
type: string
example: '1.0'
LocationConfidence:
type: string
example: '1.0'
Timestamp:
type: string
example: '2021-01-01T11:00:00.000+01:00'
format: date-time
ErrorCode:
type: string
example: '100'
ErrorMessage:
type: string
example: 'Geofencing feature disabled'
App2App:
description: Response to App2App AdditionalService.
type: object
nullable: true
properties:
AuthUri:
type: string
example: 'mobileid://auth?mobile_auth_redirect_uri=myapp%3A%2F%2Fapp.open%23access_token%3DABCD&session_token=32ffc297-0N5F0yEk2ArMZjFhBWPb4Uifwbk1f3p9ciAURd_QhUQ9e&user_id=32ffc297-ac33-4be2-b3f4-42588502ea0f'
SubscriberInfo:
description: Response to SubscriberInfo AdditionalService
type: object
nullable: true
properties:
Details:
type: array
items:
$ref: '#/components/schemas/Details'
example:
Description: 'http://mid.swisscom.ch/as#app2app'
App2App:
AuthUri: 'mobileid://auth?mobile_auth_redirect_uri=myapp%3A%2F%2Fapp.open%23access_token%3DABCD&session_token=32ffc297-0N5F0yEk2ArMZjFhBWPb4Uifwbk1f3p9ciAURd_QhUQ9e&user_id=32ffc297-ac33-4be2-b3f4-42588502ea0f'
SignatureStatus:
type: object
properties:
StatusMessage:
type: string
example: 'SIGNATURE'
StatusCode:
$ref: '#/components/schemas/StatusCode'
StatusCode:
type: object
properties:
Value:
type: string
example: '500'
ReceiptReqStatus:
type: object
properties:
StatusCode:
type: object
properties:
Value:
type: string
example: '100'
enum: ['100']
StatusDetail:
type: object
properties:
ReceiptRequestExtension:
type: object
properties:
ReceiptMessagingMode:
type: string
enum: ['synch']
ReceiptProfile:
type: object
properties:
Language:
type: string
example: 'DE'
ReceiptProfileURI:
type: string
example: 'http://mss.swisscom.ch/synch'
UserAck:
type: string
enum: ['true', 'false']
required:
- ReceiptMessagingMode
- ReceiptProfile
- UserAck
required:
- StatusCode
- StatusDetail
ReceiptRespStatus:
type: object
properties:
StatusCode:
type: object
properties:
Value:
type: string
example: '100'
StatusDetail:
type: object
properties:
ReceiptResponseExtension:
type: object
properties:
ReceiptMessagingMode:
type: string
enum: ['synch']
UserAck:
type: string
enum: ['true', 'false']
ClientAck:
type: string
enum: ['true', 'false']
NetworkAck:
type: string
enum: ['true', 'false']
UserResponse:
type: string
example: '{"status":"OK"}'
SignatureProfile:
type: string
example: 'http://mid.swisscom.ch/STK-LoA4'
enum: ['http://mid.swisscom.ch/Any-LoA4', 'http://mid.swisscom.ch/MID/v1/AuthProfile1', 'http://mid.swisscom.ch/STK-LoA4', 'http://mid.swisscom.ch/Device-LoA4']
Details:
description: SubscriberInfo AdditionalService Details. ID 1901 is MCCMNC.
type: object
properties:
id:
type: string
example: '1901'
value:
type: string
example: '26200'
ProfileStatus:
type: object
properties:
StatusCode:
type: object
properties:
Value:
type: string
example: '100'
StatusDetail:
type: object
properties:
ProfileQueryExtension:
$ref: '#/components/schemas/ProfileQueryExtension'
StatusMessage:
type: string
example: 'REQUEST_OK'
ProfileQueryExtension:
type: object
properties:
MobileUser:
type: object
properties:
AutoActivation:
type: boolean
RecoveryCodeCreated:
type: boolean
Sscds:
type: object
properties:
App:
type: array
items:
$ref: '#/components/schemas/Sscd'
Sim:
$ref: '#/components/schemas/Sscd'
Sscd:
type: object
properties:
MobileUserCertificate:
type: array
items:
$ref: '#/components/schemas/MobileUserCertificate'
PinStatus:
type: object
properties:
Blocked:
type: boolean
State:
type: string
example: 'ACTIVE'
enum: ['ACTIVE', 'INACTIVE', 'REGISTERED']
CardDetails:
description: Contains user SIM details (MCC, MNC, and network)
type: object
properties:
Mcc:
description: SIM MCC. If unknown, value is 000.
type: string
example: '228'
Mnc:
description: SIM MNC. If unknown, value is 00.
type: string
example: '01'
Network:
description: SIM network name. If unknonw, value is 'Unknown network'.
type: string
example: 'Swisscom'
MobileUserCertificate:
type: object
properties:
Algorithm:
type: string
example: 'RSA'
State:
type: string
example: 'ACTIVE'
enum: ['ACTIVE', 'INACTIVE']
description: State of the certificate.
X509Certificate:
type: array
items:
type: string
example: 'X509_BASE64_CERT_USER'
format: byte
X509SubjectName:
type: array
items:
type: string
example: 'X509_BASE64_SUBJECT_USER'
format: byte