forked from hesusruiz/did-method-elsi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
onboarding.html
1429 lines (1179 loc) · 125 KB
/
onboarding.html
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
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Onboarding example with LEARCredential using did:elsi</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Opengraph Facebook Meta Tags -->
<meta property="og:title" content="Onboarding example with LEARCredential using did:elsi">
<meta property="og:type" content="website">
<meta property="og:description" content="Onboarding example with LEARCredential using did:elsi">
<meta property="og:site_name" content="LEARCredential and DID:ELSI Method">
<meta property="og:url" content="https://alastria.github.io/did-method-elsi/onboarding.html">
<script src="https://www.w3.org/Tools/respec/respec-w3c" async="" class="remove"></script>
<script class="remove">
var respecConfig = {
latestVersion: "https://alastria.github.io/did-method-elsi/onboarding.html",
edDraftURI: "https://alastria.github.io/did-method-elsi/onboarding.html",
github: "https://github.com/alastria/did-method-elsi/blob/main/onboarding.rite",
editors: [
{
company: "JesusRuiz",
companyURL: "https://hesusruiz.github.io/hesusruiz",
email: "hesusruiz@gmail.com",
name: "Jesus Ruiz",
},
],
authors: [
{
company: "JesusRuiz",
companyURL: "https://hesusruiz.github.io/hesusruiz",
email: "hesusruiz@gmail.com",
name: "Jesus Ruiz",
},
{
company: "nicos AG",
companyURL: "https://www.nicos-ag.com/",
email: "jlangkau@nicos-ag.com",
name: "Jörg Langkau ",
},
],
localBiblio: {
"DEP-DSS": {
date: "2019-10",
href: "https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/Qualified+electronic+signature+-+QES+validation+algorithm",
publisher: "European Commission",
title: "Algorithm for Validation of qualified and advanced signatures and seals",
},
"DID-Core": {
date: "19 July 2022",
href: "https://www.w3.org/TR/did-core/",
title: "Decentralized Identifiers (DIDs) v1.0",
},
"DID-DNS": {
href: "https://tools.ietf.org/html/draft-mayrhofer-did-dns-01",
publisher: "IETF",
status: "Internet Draft",
title: "The Decentralized Identifier (DID) in the DNS",
},
"DID-ELSI": {
date: "04 June 2023",
href: "https://alastria.github.io/did-method-elsi/",
title: "DID ETSI Legal person Semantic Identifier Method Specification (did:elsi)",
},
"DID-PRIMER": {
href: "https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-fall2017/blob/master/topics-and-advance-readings/did-primer.md",
publisher: "Rebooting the Web of Trust 2017",
title: "DID Primer",
},
"DIF.PresentationExchange": {
href: "https://identity.foundation/presentation-exchange/spec/v2.0.0/",
title: "Presentation Exchange 2.0.0",
},
"ETSI-CERTOVERVIEW": {
date: "2020-07",
href: "https://www.etsi.org/deliver/etsi_en/319400_319499/31941201/01.04.02_20/en_31941201v010402a.pdf",
publisher: "ETSI",
title: "ETSI EN 319 412-1 V1.4.2 (2020-07) - Electronic Signatures and Infrastructures (ESI); Certificate Profiles; Part 1: Overview and common data structures",
},
"ETSI-JADES": {
date: "2021-03",
href: "https://www.etsi.org/deliver/etsi_ts/119100_119199/11918201/01.01.01_60/ts_11918201v010101p.pdf",
publisher: "ETSI",
title: "ETSI TS 119 182-1 V1.1.1 (2021-03) - Electronic Signatures and Infrastructures (ESI); JAdES digital signatures; Part 1: Building blocks and JAdES baseline signatures",
},
"ETSI-LEGALPERSON": {
date: "2020-07",
href: "https://www.etsi.org/deliver/etsi_en/319400_319499/31941203/01.02.01_60/en_31941203v010201p.pdf",
publisher: "ETSI",
title: "ETSI EN 319 412-3 V1.2.1 (2020-07) - Electronic Signatures and Infrastructures (ESI); Certificate Profiles; Part 3: Certificate profile for certificates issued to legal persons",
},
"OWASP-TRANSPORT": {
href: "https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet",
title: "Transport Layer Protection Cheatsheet",
},
"OpenID.Core": {
date: "8 November 2014",
href: "http://openid.net/specs/openid-connect-core-1_0.html",
title: "OpenID Connect Core 1.0 incorporating errata set 1",
},
"OpenID.SIOP2": {
date: "28 January 2022",
href: "https://openid.bitbucket.io/connect/openid-connect-self-issued-v2-1_0.html",
title: "Self-Issued OpenID Provider v2",
},
"OpenID.VCI": {
date: "3 February 2023",
href: "https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html",
title: "OpenID for Verifiable Credential Issuance",
},
"OpenID.VP": {
date: "21 April 2023",
href: "https://openid.net/specs/openid-4-verifiable-presentations-1_0.html",
title: "OpenID for Verifiable Presentations",
},
"RFC6749": {
href: "https://www.rfc-editor.org/rfc/rfc6749.html",
title: "The OAuth 2.0 Authorization Framework",
},
"RFC7515": {
href: "https://www.rfc-editor.org/rfc/rfc7515",
title: "JSON Web Signature (JWS)",
},
"RFC7519": {
href: "https://www.rfc-editor.org/rfc/rfc7519",
title: "JSON Web Token (JWT)",
},
"RFC8414": {
href: "https://www.rfc-editor.org/rfc/rfc8414",
title: "OAuth 2.0 Authorization Server Metadata",
},
"RFC8725": {
href: "https://www.rfc-editor.org/rfc/rfc8725",
title: "JSON Web Token Best Current Practices",
},
},
};
</script>
<style>
code {
color: red;
}
pre.nohighlight {
padding: 0.5em
}
ul.plain {
list-style: none;
}
ul.plain li {
text-indent: -1em;
}
ul.plain li>div {
text-indent:0;
}
</style>
</head>
<body>
<p class="copyright">
Copyright © 2023 the document editors/authors. Text is available under the <a rel="license" href="https://creativecommons.org/licenses/by/4.0/legalcode"> Creative Commons Attribution 4.0 International Public License</a>
</p>
<section id='abstract'>
<p>A common problem in ecosystems like Data Spaces is how organisations can onboard the ecosystem in a trusted and automated way, avoiding manual paperwork.
</p>
<p>This document describes how the process of onboarding can be performed by an employee of an organisation, who has been appointed to do so by a legal representative of the organisation using eIDAS certificates and Verifiable Credentials.
</p>
<p>The appointed employee will perform the process by using a special type of Verifiable Credential called <code>LEARCredential</code> (from <b>L</b>egal <b>E</b>ntity <b>A</b>ppointed <b>R</b>epresentative).
</p>
<p>Any Verifier that trusts the eIDAS Trust Framework will be able to verify that:
</p>
<ul>
<li id='list_122.1'><b>The person presenting the LEARCredential is the same as the one identified in the credential</b> </li>
<li id='list_122.2'><b>A legal representative of the organisation has attested that the person has the powers described in the credential</b> </li>
</ul>
<p>This enables the person presenting the LEARCredential to start the onboarding process and also to provide any additional required documentation, preferably as additional Verifiable Credentials to enable automatic verification of compliance with the onboarding requirements (including Gaia-X credentials issued by the Compliance Service of Gaia-X).
</p>
</section>
<section id="conformance">
</section>
<section><h2>Introduction</h2>
<p>A common problem in ecosystems like Data Spaces is how organisations can onboard the ecosystem in a trusted and automated way, avoiding manual paperwork.
</p>
<p>This document describes how the process of onboarding can be performed by an employee of an organisation, who has been appointed to do so by a legal representative of the organisation using eIDAS certificates and Verifiable Credentials.
</p>
<p>The appointed employee will perform the process by using a special type of Verifiable Credential called <code>LEARCredential</code> (from <b>L</b>egal <b>E</b>ntity <b>A</b>ppointed <b>R</b>epresentative).
</p>
<p>To achieve a high level of legal certainty under eIDAS, the LEARCredential is:
</p>
<ul>
<li id='list_140.1'>signed or sealed with an eIDAS certificate which is either: <div>
<ul>
<li id='list_143.1'>a <b>certificate for electronic seals</b> issued to a legal person by a Qualified Trust Service Provider, or </li>
<li id='list_143.2'>a <b>certificate for electronic signatures</b>, issued to a <b>legal representative of the legal person</b> by a Qualified Trust Service Provider. </li>
</ul>
</div>
</li>
<li id='list_140.2'>signed using the <b>JSON Advanced Electronic Signature</b> format described in [[[ETSI-JADES]]] </li>
</ul>
<p>The LEARCredential includes claims identifying the employee and a description of the concrete powers that have been delegated by the legal representative of the organisation.
</p>
<p>By signing/sealing the credential with an eIDAS certificate, the legal representative attests that the powers described in the credential have been delegated to the employee (maybe under some conditions, also described in the credential).
</p>
<p>In this way, the LEARCredential has the same legal status as any other document in other formats (e.g., PDF) signed in an eIDAS-compliant way, but with all the advantages provided by the Verifiable Credential format.
</p>
<p>In addition, the LEARCredential includes cryptographic material that allows the appointed employee to <b>use the credential as an online authentication mechanism</b> in an onboarding portal, by proving that the holder of the credential is the same person identified in the credential.
</p>
<p>Any Verifier that trusts the eIDAS Trust Framework will be able to verify that:
</p>
<ul>
<li id='list_158.1'><b>The person presenting the LEARCredential is the same as the one identified in the credential</b> </li>
<li id='list_158.2'><b>A legal representative of the organisation has attested that the person has the powers described in the credential</b> </li>
</ul>
<p>This enables the person presenting the LEARCredential to start the onboarding process and also to provide any additional required documentation, preferably as additional Verifiable Credentials to enable automatic verification of compliance with the onboarding requirements (including Gaia-X credentials issued by the Compliance Service of Gaia-X).
</p>
<p>Both types of eIDAS certificates mentioned above are an electronic attestation <b>that links electronic seal/signature validation data to a legal person and confirms the name of that person</b>. This way, the certificate, usually linked to the sealed/signed document, can be used to verify the identity of the creator of the seal/signature and whether the document has been sealed/signed using the corresponding private key.
</p>
<p>Before issuing a certificate like the above, the Qualified Trust Service Provider (QTSP) performs validations against `Authentic Sources` to authenticate the identity of the organisation:
</p>
<ul>
<li id='list_168.1'>The data concerning the business name or corporate name of the organisation. </li>
<li id='list_168.2'>The data relating to the constitution and legal status of the subscriber. </li>
<li id='list_168.3'>The data concerning the extent and validity of the powers of representation of the applicant. </li>
<li id='list_168.4'>The data concerning the tax identification code of the organisation or equivalent code used in the country to whose legislation the subscriber is subject. </li>
</ul>
<p>The person controlling the above certificates will appoint a legal entity representative (LEAR) by generating and signing a Verifiable Credential which:
</p>
<ul>
<li id='list_176.1'>Includes identification data of an employee of the organisation </li>
<li id='list_176.2'>Includes claims stating the delegation of specific powers to perform onboarding on behalf of the organisation </li>
<li id='list_176.3'>Includes a public key where the corresponding private key is controlled by the employee, enabling him to prove that he is the holder of the credential when it is being used in an authentication process like the onboarding process described in this document. </li>
</ul>
<p>The LEARCredential uses the `did:elsi` method for the identifiers of legal persons involved in the process, to facilitate the DID resolution and linkage with the eIDAS certificates. The `did:elsi` method is specified in [[[DID-ELSI]]].
</p>
<p>The high-level view of the process is described in the following diagram, when a COO (Chief Operating Officer) appoints an employee to perform the onboarding process:
</p>
<figure><img src='builtassets/plantuml_dac3464b348d39a8abedf130c45a8203.png' alt=''>
<figcaption>High level view of issuance of LEARCredential</figcaption></figure>
</section>
<section><h2>Participants</h2>
<p>Here we introduce the actors of the reference use case we are going to have. The main actors are marked in yellow in the following diagram.
</p>
<p>RealTruth is a Trust Service Provider operating under the eIDAS Trust Framework, which issues a certificate for seals to the company GoodAir. GoodAir is a business that provides some services using an Air Quality application operated by GoodAir.
</p>
<p>RealTruth also provides a certificate for signatures to the COO of the GoodAir company, so the COO can use the certificate to sign documents on behalf of GoodAir (like contracts, invoices, financial reports, ...) in a way that is compliant with eIDAS.
</p>
<p>The COO of GoodAir will issue a verifiable credential of type LEARCredential to an employee of GoodAir, signing the credential with his certificate for signatures.
</p>
<figure><img src='builtassets/diagram_a1bfb9aef5ca983a165a6a2c8c1839fb.svg' alt=''>
<figcaption></figcaption></figure>
<section id='participant'><h2>GoodAir: the company that wants to perform the onboarding process</h2>
<p>The new participant is a business providing an Air Quality Monitoring application as a service. The business is called GoodAir and it operates the application, which receives data from a set of sensors that may or may not be the property of GoodAir. The sensors must have received a certification to be able to operate and send data to the GoodAir application.
</p>
<p>The company is registered in the tax agency and business registry of Spain with VAT number <b>VATES-12345678</b>.
</p>
</section>
<section><h2>COO (Chief Operating Officer) of GoodAir</h2>
<p>The GoodAir company is small and the only person that can sign contracts on behalf of the company is the COO (Chief Operating Officer). The COO is a legal representative of the company and she is registered as so in the business registry of Spain.
</p>
<p>The COO has a certificate for electronic signatures issued by one of the TSPs in Spain enabling the COO to perform electronic qualified signatures as legal representative of GoodAir, instead of doing them manually.
</p>
<p>The X.509 certificate of the COO has the following contents in the <code>Subject</code> field (the example below is derived from a real certificate but with the identifiers modified to be an example):
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#50fa7b">cn</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">56565656V Jesus Ruiz</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">serialNumber</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">56565656V</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">givenName</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">Jesus</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">sn</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">Ruiz</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">2.5.4.97</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">VATES-12345678</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">o</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">GoodAir</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">c</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">ES</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">2.5.4.13</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">Notary:Juan Lopez/Protocol Num:7172/Date:07-06-2021</span>
</span></span></code></pre>
<p>The above set of fields bind the legal identity of the COO with the identity of the business:
</p>
<ul>
<li id='list_331.1'><code>serialNumber</code> is the unique number recognized by the Spanish Government for spanish citizens (called NIF). </li>
<li id='list_331.2'><code>2.5.4.97</code> is the <a href="https://oidref.com/2.5.4.97">official OID for <code>organizationIdentifier</code></a>. The contents of this field in the example certificate is the unique identifier for the legal person GoodAir. </li>
</ul>
<p>Before issuing a certificate like the above, the TSP has to perform some validations to ensure that in the official source of truth (the business registry of Spain in this case) there is already registered information that states that the COO has indeed powers to act on behalf of GoodAir as a legal representative.
</p>
</section>
<section><h2>RealTruth: a Trust Service Provider</h2>
<p>RealTruth is an EU TSP, which appears in the TL (Trusted List) maintained by the <a href="https://tl.bundesnetzagentur.de/TL-DE.XML">German Government</a>.
</p>
<p>RealTruth is a TSP based in Germany but operates in most of the countries of the EU and so being able to provide Trust Services across many countries, including Spain.
</p>
<p>As all TSPs in the TLs of the Member States, its entry in the TL includes one or more "Services" entries which describe the Trust Services provided by the TSP.
</p>
<p>A TSP can have one Service issuing certificates for signatures, another service issuing certificates for seals, another service for timestamping, etc.
</p>
<p>The regulator approves or suspends each service from a TSP individually, and the services are the root anchor for a given trust environment.
</p>
<p>In our case, the entry for RealTruth in the TL includes a `<TSPService>` entry, and inside it the `<ServiceDigitalIdentity>` entry includes a DER-encoded certificate specifying the digital identity of the root anchor for that trust domain. The certificate for the Service has in the Subject field:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#50fa7b">2.5.4.97</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">VATDE-170173453</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">CN</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">DRV QC 11 MA CA 2017ca</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">OU</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">QC 11 Mitarbeiter CA</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">O</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">Deutsche Rentenversicherung Westfalen</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">C</span> <span style="color:#ff79c6">=</span> <span style="color:#f1fa8c">DE</span>
</span></span></code></pre>
<p>Which in the <code>organizationIdentifier</code> field (OID 2.5.4.97) specifies the unique organisation identifier assigned by the German regulatory authority to the TSP: VATDE-170173453.
</p>
<p>RealTruth provides `Legal Person Representative Certificates` which are qualified in accordance with Regulation (EU) No. 910/2014 of the European Parliament and of the Council of 23 July 2014 on electronic identification and trust services for electronic transactions in the internal market.
</p>
<p>The certification policies of RealTruth includes the following sentences:
</p>
<blockquote>
<p>The Registration Authority must verify the following information in order to authenticate the identity of the organisation:
</p>
<ul>
<li id='list_367.1'>The data concerning the business name or corporate name of the organisation. </li>
<li id='list_367.2'>The data relating to the constitution and legal status of the subscriber. </li>
<li id='list_367.3'><b>The data concerning the extent and validity of the powers of representation of the applicant.</b> </li>
<li id='list_367.4'>The data concerning the tax identification code of the organisation or equivalent code used in the country to whose legislation the subscriber is subject. </li>
</ul>
</blockquote>
<p>The TSP (RealTruth in this case) performs the verifications against `Authentic Sources`.
</p>
<blockquote>
<p>Authentic Sources are the public or private repositories or systems recognised or required by law containing attributes about a natural or legal persons.
</p>
<p>The Authentic Sources in scope of Annex VI of the [eIDAS2] legislative proposal are sources for attributes on address, age, gender, civil status, family composition, nationality, education and training qualifications titles and licences, professional qualifications titles and licences, public permits and licences, financial and company data.
</p>
<p>Authentic Sources in scope of Annex VI are required to provide interfaces to Qualified Electronic Attestation of Attributes (QEAA) Providers to verify the authenticity of the above attributes, either directly or via designated intermediaries recognised at national level.
</p>
<p>Authentic Sources may also issue (Q)EAA-s themselves if they meet the requirements of the eIDAS Regulation. It is up to the Member States to define terms and conditions for the provisioning of these services, but according to the minimum technical specifications, standards, and procedures applicable to the verification procedures for qualified electronic attestations of attributes.
</p>
</blockquote>
<p>In accordance to the policies, RealTruth made those validations when issuing the certificate to the COO, in such a way that the Relying Parties verifying the certificate can have a high level of trust in the assertion that the natural person identified in the certificate (with Spanish ID of 56565656V) is a legal representative of he GoodAir company (organizationIdentifier VATES-12345678).
</p>
</section>
<section><h2>John Doe: an administrative employee of GoodAir</h2>
<p>This is an employee of the central administration department of GoodAir, who is going to be formally nominated to manage the onboarding process of GoodAir in the Data Space and some other operations in the Data Space once GoodAir is onboarded.. In particular, this employee is going to be nominated as a LEAR (Legal Entity Appointed Representative).
</p>
<p>As its name implies, the LEAR has to be nominated by a <b>legal representative</b> of the GoodAir organisation with the necessary legal authority to commit the organisation for this type of decision. In our case, the COO of GoodAir will nominate John Doe as the LEAR of GoodAir, delegating to him the capabilities to perform onboarding in the DOME and some other associated tasks. That means that John Doe will not be empowered to perform other actions like onboarding on other Data Spaces or signing contracts or invoices on behalf of GoodAir.
</p>
<p>To perform the nomination, the COO of GoodAir (a legal representative of GoodAir) will issue a special credential to John Doe and will sign the credential with his certificate for signatures as legal representative of GoodAir. The details are described later in this document.
</p>
</section>
<section><h2>DOME: an instance of a Data Space for Smart Cities</h2>
<p>DOME is a Data Space where local governments can procure data and services from other entities that act as service providers. At the same time, the local governments can also act as data and service providers for other entities in the Data Space.
</p>
<p>The DOME Data Space has an onboarding service that allows external entities to perform onboarding in an automated fashion by using Verifiable Credentials that have been issued by trusted entities. The complete Trust Framework used by DOME is composed from a series of Trust Frameworks, some managed internally using a governance model of DOME and some others managed externally but by trusted entities. At the root of the Trust Framework of DOME is the eIDAS Trust Framework and the pan-european recognized list of Trust Service Providers issuing the eIDAS compliant digital identities, in the form of certificates for signatures/seals.
</p>
<p>In order to participate in DOME, every legal person requires a certificate for seals or that one of its legal representatives has a certificate for signatures (or both). The DOME entity is registered in France with VAT number <b>VATFR-99999999</b>.
</p>
</section>
</section>
<section><h2>The LEARCredential</h2>
<p>In this example the LEARCredential will be generated using the certificate of the COO.
</p>
<p>The credential will be generated with an application that the COO will use as VC Issuer and that allows the employee to receive the credential using his credential wallet, using [[OpenID.VCI]] to achieve compliance with the EUDI Wallet ARF.
</p>
<p>The application enables the COO to specify the information required to create the LEARCredential, specifying the employee information and the specific type of LEARCredential. In general, there may be different instances of LEARCredentials for different purposes. One employee can have more than one LEARCredential, each having a different delegation of powers for different environments.
</p>
<section><h2>Claims identifying the employee</h2>
<p>These are claims identifying the subject of the credential, the person who will act as LEAR. Each Data Space can define their own depending on their specific requirements. For our example, we use the same that are used for accessing the EC portal. The claims in the credential are the digital equivalent of their analog counterparts, displayed here for illustration.
</p>
<figure id='lear-appointment-letter-1'>
<p><img src="images/lear-appointment-letter-1.png" alt="" />
</p>
<figcaption>LEAR subject identification data.
</figcaption>
</figure>
<p>From the above form we can derive the following claims:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"title"</span>: <span style="color:#f1fa8c">"Mr."</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"first_name"</span>: <span style="color:#f1fa8c">"John"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"last_name"</span>: <span style="color:#f1fa8c">"Doe"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"gender"</span>: <span style="color:#f1fa8c">"M"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"postal_address"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"email"</span>: <span style="color:#f1fa8c">"johndoe@goodair.com"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"telephone"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"fax"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"mobile_phone"</span>: <span style="color:#f1fa8c">"+34787426623"</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
</section>
<section><h2>DID of the employee</h2>
<p>In this example we use the `did:key` method for the DID of the employee, which provides a very high level of privacy and given the way the LEARCredential is generated it supports the verification of the chain of responsibility with a proper level of guarantee.
</p>
<p>If the highest levels of assurance and legal compliance is desired and the employee has an eIDAS certificate for signatures (in this case a personal one, not one like the COO), we could use the `elsi:did` for identification of the employee. However, the company (GoodAir) should make sure that the employee is aware of and agree to the possible privacy implications of doing so, given the personal details leaked from the eIDAS certificate.
</p>
<p>Those "exposed" personal details are exactly the same as if the employee signs any "normal" document with a digital certificate, but care should be taken by GoodAir because in this case the signature would be done "on behalf of" his employer and not as an individual personal action.
</p>
<p>Even though this is not unique to the `did:elsi` method, this also implies that the onboarding service has to handle those personal details in the same way as if it would be accepting any other document signed with a certificate for signatures, and ensure compliance with GDPR.
</p>
<p>In this example we assume the usage of the `did:key` method for the employee to protect his privacy as much as possible.
</p>
<p>This DID for the employee is an additional claim to the ones presented above, using the <code>id</code> field in the <code>credentialSubject</code> object. The DID corresponds to a keypair that was generated during the LEARCredential issuance process, where the private key was generated by the wallet of the employee and it was always under his control.
</p>
<p>This private key controlled by the employee can be used to sign challenges from Relying Parties that receive the credential to prove that the person sending the credential is the same person that is identified in the <code>credentialSubject</code> object of the LEARCredential.
</p>
<p>An example could be:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
<p>In this example, the signatures performed with the private key can not be JAdES-compliant ([[ETSI-JADES]]), but if the LEARCredential is attached to any other credential that is signed with this private key, then they can be traced up to the eIDAS certificate of the COO and so the chain of responsibility can be determined..
</p>
<p>With the DID for the employee, the set of claims identifying him would be then:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"title"</span>: <span style="color:#f1fa8c">"Mr."</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"first_name"</span>: <span style="color:#f1fa8c">"John"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"last_name"</span>: <span style="color:#f1fa8c">"Doe"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"gender"</span>: <span style="color:#f1fa8c">"M"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"postal_address"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"email"</span>: <span style="color:#f1fa8c">"johndoe@goodair.com"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"telephone"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"fax"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"mobile_phone"</span>: <span style="color:#f1fa8c">"+34787426623"</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
</section>
<section><h2><code>legalRepresentative</code></h2>
<p>This section identifies the natural person (the COO) who is a legal representative of the legal person (GoodAir) and that is nominating the employee identified in the credential.
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#f1fa8c">"legalRepresentative"</span>: {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"cn"</span>: <span style="color:#f1fa8c">"56565656V Jesus Ruiz"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"serialNumber"</span>: <span style="color:#f1fa8c">"56565656V"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"organizationIdentifier"</span>: <span style="color:#f1fa8c">"VATES-12345678"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"o"</span>: <span style="color:#f1fa8c">"GoodAir"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"c"</span>: <span style="color:#f1fa8c">"ES"</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
<aside class='note' title='Attributes for natural and legal persons'>
<p>The attributes for natural persons and legal persons are derived from the <a href="https://ec.europa.eu/digital-building-blocks/wikis/download/attachments/467109280/eidas_saml_attribute_profile_v1.0_2.pdf?version=1&modificationDate=1639417533738&api=v2">eIDAS SAML Attribute Profile (eIDAS Technical Sub-group, 22 June 2015)</a>.
</p>
<p>All attributes for the eIDAS minimum data sets can be derived from the <a href="https://ec.europa.eu/isa2/solutions/core-vocabularies_en/">ISA Core Vocabulary</a> and <a href="https://joinup.ec.europa.eu/collection/semic-support-centre/specifications">https://joinup.ec.europa.eu/collection/semic-support-centre/specifications</a>.
</p>
<p>In the case of natural persons refer to the <a href="https://joinup.ec.europa.eu/asset/core_person/asset_release/core-person-vocabulary">Core Person Vocabulary</a> and in the case of legal persons refer to definitions for <a href="https://joinup.ec.europa.eu/asset/core_business/asset_release/core-business-vocabulary">Core Business Vocabulary</a>.
</p>
</aside>
</section>
<section><h2><code>rolesAndDuties</code> of the LEAR</h2>
<p>The <code>rolesAndDuties</code> object points to an externally hosted object with the roles and duties of the LEAR. This external object can be either a machine-interpretable definition of the roles and duties in the credential, or just an external definition of the roles and duties in natural language. The ideal approach is the first option, expressing the semantics with a proper machine-readable language, because this will allow automatic access control at the granularity of the individual sentences of that expression language. The <code>rolesAndDuties</code> object can also have the definition embedded into it, instead of having a pointer to an external object.
</p>
<p>For illustration, the following figure shows an external object with some of the roles and duties in our LEAR example, in natural language.
</p>
<figure id='lear-appointment-letter-2'>
<p><img src="images/lear-appointment-letter-2.png" alt="" />
</p>
<figcaption>LEAR roles and duties.
</figcaption>
</figure>
<p>A simplistic implementation of the object inside the credential could be:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#f1fa8c">"rolesAndDuties"</span>: [
</span></span><span style="display:flex;"><span> {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"type"</span>: <span style="color:#f1fa8c">"LEARCredential"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"https://dome-marketplace.eu//lear/v1/6484994n4r9e990494"</span>
</span></span><span style="display:flex;"><span> }
</span></span><span style="display:flex;"><span>]
</span></span></code></pre>
<p>Where the last part of the url can correspond to the hash of the external linked document to ensure that any modification or tampering can be detected.
</p>
</section>
<section><h2>Assembling the pieces together</h2>
<p>With the above values for the example, the complete LEARCredential would become something like this:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"@context"</span>: [
</span></span><span style="display:flex;"><span> <span style="color:#f1fa8c">"https://www.w3.org/2018/credentials/v1"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#f1fa8c">"https://dome-marketplace.eu//2022/credentials/learcredential/v1"</span>
</span></span><span style="display:flex;"><span> ],
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"urn:did:elsi:25159389-8dd17b796ac0"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"type"</span>: [<span style="color:#f1fa8c">"VerifiableCredential"</span>, <span style="color:#f1fa8c">"LEARCredential"</span>],
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"issuer"</span>: {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"did:elsi:VATES-12345678"</span>
</span></span><span style="display:flex;"><span> },
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"issuanceDate"</span>: <span style="color:#f1fa8c">"2022-03-22T14:00:00Z"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"validFrom"</span>: <span style="color:#f1fa8c">"2022-03-22T14:00:00Z"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"expirationDate"</span>: <span style="color:#f1fa8c">"2023-03-22T14:00:00Z"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"credentialSubject"</span>: {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"title"</span>: <span style="color:#f1fa8c">"Mr."</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"first_name"</span>: <span style="color:#f1fa8c">"John"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"last_name"</span>: <span style="color:#f1fa8c">"Doe"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"gender"</span>: <span style="color:#f1fa8c">"M"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"postal_address"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"email"</span>: <span style="color:#f1fa8c">"johndoe@goodair.com"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"telephone"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"fax"</span>: <span style="color:#f1fa8c">""</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"mobile_phone"</span>: <span style="color:#f1fa8c">"+34787426623"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"legalRepresentative"</span>: {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"cn"</span>: <span style="color:#f1fa8c">"56565656V Jesus Ruiz"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"serialNumber"</span>: <span style="color:#f1fa8c">"56565656V"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"organizationIdentifier"</span>: <span style="color:#f1fa8c">"VATES-12345678"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"o"</span>: <span style="color:#f1fa8c">"GoodAir"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"c"</span>: <span style="color:#f1fa8c">"ES"</span>
</span></span><span style="display:flex;"><span> },
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"rolesAndDuties"</span>: [
</span></span><span style="display:flex;"><span> {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"type"</span>: <span style="color:#f1fa8c">"LEARCredential"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"id"</span>: <span style="color:#f1fa8c">"https://dome-marketplace.eu//lear/v1/6484994n4r9e990494"</span>
</span></span><span style="display:flex;"><span> }
</span></span><span style="display:flex;"><span> ]
</span></span><span style="display:flex;"><span> }
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
</section>
</section>
<section><h2>The LEARCredential as a VerifiableID</h2>
<p>DOME has an onboarding service that enables automatic self-onboarding of legal entities. In DOME when an entity (a
legal person or a natural person acting on behalf of a legal person) wants to perform an action on a protected
resource, we use Verifiable Credentials to perform authentication of the entity and then access control based on the
content of the Verifiable Credential(s) presented by that entity, and possibly additional authorisation information
that the Relying Party considers relevant for controlling access to the protected resource (for example, the
contractual status of the resource, time of the day or other context information).
</p>
<section><h2>The VerifiableID as a type of Verifiable Credential</h2>
<p>Not all types of Verifiable Credentials can be used for authentication, so for the purpose of this discussion we use the
same taxonomy as <a href="https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Data+Models+and+Schemas">defined in EBSI</a>:
</p>
<figure><img src='builtassets/diagram_fe645f4b87b2c817639a76a677e5bb6e.png' alt=''>
<figcaption>The LEARCredential is a Verifiable Authorisation and a VerifiableID</figcaption></figure>
<p>The full explanation is in the EBSI site, but for our purposes an example is enough.
</p>
<p>In the case of a Diploma as a Verifiable Credential (a Verifiable Diploma), it is a Verifiable Attestation which indicates that the subject has certain skills or has achieved certain learning outcomes through formal or non-formal learning context. However, as in the case with normal Diplomas in paper of PDF format, this credential can be presented by anyone that holds the credential. In other words, the credential binds the identity of the subject with the claims inside the credential, but does not bind the identity of the holder of the credential with the identity of the subject of the credential, which requires a special mechanism in the issuance process.
</p>
<p>Instead, <b>a <code>VerifiableID</code> is a special form of a Verifiable Credential that a natural or legal person can use in an electronic identification process as evidence of whom he/she/it is</b> (comparable with a passport, physical IDcard, driving licence, social security card, member-card…).
</p>
<p>In general, in an authentication and access control process, the entity willing to perform an action has to present (in a Verifiable Presentation) a VerifiableID and possibly one or more additional Verifiable Attestations. Of course, if the VerifiableID already contains all the information required by the Relying Party, then only one credential is required in the process.
</p>
<p>Most Verifiable Credentials will be issued as Verifiable Attestations, acting as efficient machine-processable and verifiable equivalent to their analog counterparts. Their purpose is to attest some attributes about the subject of the credential and not act as a mechanism for online authentication.
</p>
<p>VerifiableIDs can be of different types and be issued by different entities with different levels of assurance (in eIDAS terminology). They are issued with the purpose of serving as authentication mechanisms in online processes. In the near future, VerifiableIDs of the highest level of assurance (LoA High) will be issued to citizens and businesses by their governments under eIDAS2.
</p>
</section>
<section><h2>The LEARCredential for some identification processes</h2>
<p>But <b>any entity can issue VerifiableIDs</b>, though the acceptance by Relying Parties can not be ensured because it is the Relying Party the only one deciding if it trusts on the issuer and its process for generating the VerifiableID.
</p>
<p>DOME will make use of the future eIDAS2 VerifiableIDs when they are available and when they make sense in the context of DOME. But DOME defines some specific types of VerifiableIDs that are derived from eIDAS certificates for signatures/seals using the regulated standards for signatures, achieving a level of assurance that provides an acceptable level of legal certainty and reduced risk of repudiation.
</p>
<p>An example is the LEARCredential described in a section above, which has the same level of legal certainty as any document signed with the same certificates (like a contract or an invoice).
</p>
<p>Similarly, a Product provider (like GoodAir) who decides to use the DOME Trust and IAM framework or a compatible one for managing access to associated services by customers of their products will typically define specific types of VerifiableIDs if the standard ones in DOME or the existing and widely accepted ones are not suitable for the provider. In general, if a provider can use an existing and already used VerifiableID then it will facilitate potential customers access to its product because issuers of the VerifiableID do not have to modify or adapt their existing issuing processes.
</p>
</section>
</section>
<section><h2>Issuing the LEARCredential</h2>
<section><h2>Overview</h2>
<p>In this example we use what we call a <i>profile</i> of the [[OpenID.VCI]] protocol. The standard is very flexible, and we restrict the different options available in the standard and implement a set of the options with given values that are adequate for our use case, without impacting flexibility in practice.
</p>
<p>The following figure describes the main components that interact in the issuance of a credential in this profile.
</p>
<p>The description of the issuance process is general enough to be used for many types of credentials, but the text includes notes describing the concrete application of the process to the case of the LEARCredential.
</p>
<figure id='iss-overview'>
<p><img src="images/issuance/issuance_background.svg" alt="" />
</p>
<figcaption>Overview of participants.
</figcaption>
</figure>
<p><b>End user</b>
</p>
<p>This profile is valid for both natural and juridical persons, but because we are focusing on the issuance of the LEARCredential, in the detailed examples below we assume a natural person as the user.
</p>
<p><b>Wallet</b>
</p>
<p>The wallet is assumed to be a Web application with a wallet backend, maybe implemented as a PWA so it has some offline capabilities and can be installed in the device, providing a user experience similar to a native application. Private key management and most sensitive operations are performed in a backend server, operated by an entity trusted by the end user. Other profiles can support native and completely offline PWA mobile applications, for end users.
</p>
<p>This type of wallet supports natural persons, juridical persons and natural persons who are legal entity representatives of juridical persons. For juridical persons the wallet is usually called an `enterprise wallet` but we will use here just the term <code>wallet</code> unless the distinction is required.
</p>
<p>In this profile we assume that the wallet is not previously registered with the Issuer and that the wallet does not expose public endpoints that are called by the Issuer, even if the wallet has a backend server that could implement those endpoints. That makes the wallet implementations in this profile to be very similar in interactions to a full mobile implementation, making migration to a full mobile implementation easier.
</p>
<p>In other words, from the point of view of the Issuer, the wallet in this profile is almost indistinguishable from a full mobile wallet.
</p>
<p><b>User Laptop</b>
</p>
<p>For clarity of exposition, we assume in this profile that the End User starts the interactions with the Issuer with an internet browser (user agent) in her laptop. However, there is nothing in the interactions which limits those interactions to a laptop form factor and the End User can interact with any internet browser in any device (mobile, tablet, kiosk).
</p>
<p><b>Issuer</b>
</p>
<p>In this profile we assume that the Issuer is composed of two components:
</p>
<ul>
<li id='list_684.1'>Authorization server: the backend component implementing the existing authentication/authorization functionalities for the Issuer entity. </li>
<li id='list_684.2'>Issuer backend: the main server implementing the business logic as a web application and additional backend APIs required for issuance of credentials. </li>
</ul>
<p>The Issuer backend and the Authorization server could be implemented as a single component in a real use case, but we assume here that they are separated to make the profile more general, especially for big entities and also when using Trust Service Providers for cloud signature and credential issuance, for example.
</p>
<p><b>Authentication of End User and previous Issuer-End User relationship</b>
</p>
<p>We assume that the Issuer and End User have a previous relationship and that the Issuer has performed the KYC required by regulation and needed to be able to issue Verifiable Credentials attesting some attributes about the End User. We assume that there is an existing trusted authentication mechanism (not necessarily related to Verifiable Credentials) that the End User employs to access protected resources from the Issuer. For example, the user is an employee or a customer of the Issuer, or the Issuer is a Local Administration and the End User is a citizen living in that city.
</p>
</section>
<section><h2>Authentication</h2>
<figure id='iss-authentication'>
<p><img src="images/issuance/issuance_authentication.svg" alt="" />
</p>
<figcaption>Issuance authentication.
</figcaption>
</figure>
<p>Before requesting a new credential, the End User has to authenticate with the Issuer with whatever mechanism is already implemented by the Issuer. This profile does not require that it is based on OIDC, Verifiable Credentials or any other specific mechanism.
</p>
<p>The level of assurance (LoA) of this authentication mechanism is one of the factors that will determine the confidence that the Verifiers can have on the credentials received by them from a given Issuer.
</p>
<aside class='note' title='LEARCredential'>
<p>In the case of the LEARCredential, the End User (John Doe) is an employee of GoodAir and in order to receive the credential John first has to authenticate into the company systems using whatever mechanism GoodAir uses for employee authentication.
</p>
<p>Being a modern company, GoodAir uses Verifiable Credentials IAM but this is not a requirement for the issuance of the LEARCredential.
</p>
</aside>
</section>
<section><h2>Credential Offer</h2>
<figure id='iss-credentialoffer'>
<p><img src="images/issuance/issuance_credentialoffer.svg" alt="" />
</p>
<figcaption>Credential offer.
</figcaption>
</figure>
<p>In this profile the wallet does not have to implement the Credential Offer Endpoint described in section 4 of [[OpenID.VCI]].
</p>
<p>Instead, the Credential Issuer renders a QR code containing a reference to the Credential Offer that can be scanned by the End-User using a Wallet, as described in section 4.1 of [[OpenID.VCI]].
</p>
<p>According to the spec, the Credential Offer object is a JSON object containing the Credential Offer parameters and can be sent by value or by reference. To avoid problems with the size of the QR travelling in the URL, this profile requires that the QR contains the <code>credential_offer_uri</code>, which is a URL using the <code>https</code> scheme referencing a resource containing a JSON object with the Credential Offer parameters. The <code>credential_offer_uri</code> endpoint should be implemented by the Issuer backend.
</p>
<section><h2>Credential Offer Parameters</h2>
<p>This profile restricts the options available in section 4.1.1 of [[OpenID.VCI]]. The profile defines a Credential Offer object containing the following parameters:
</p>
<ul>
<li id='list_731.1'><code>credential_issuer</code>: REQUIRED. The URL of the Credential Issuer that will be used by the Wallet to obtain one or more Credentials. </li>
<li id='list_731.2'><code>credentials</code>: REQUIRED. A JSON array, where every entry is a JSON string. To achieve interoperability faster, this profile defines a global Trusted Credential Schemas List where well-known credential schemas are defined, in addition to the individual credentials that each Issuer can define themselves. The string value MUST be one of the id values in one of the objects in the <code>credentials_supported</code> metadata parameter of the Trusted Credential Schemas List (described later), or one of the id values in one of the objects in the <code>credentials_supported</code> Credential Issuer metadata parameter provided by the Credential Issuer. When processing, the Wallet MUST resolve this string value to the respective object. The credentials defined in the global Trusted Credential Schema List have precedence over the ones defined by the Credential Issuer. <div>
<aside class='note' title='LEARCredential'>
<p>The only credential being offered in our case is the LEARCredential, so this is the credential schema that should be specified here. The LEARCredential is a credential known globally to the DOME ecosystem, so its schema should be published and be available in the Trusted Credential Schemas List.
</p>
</aside>
</div>
</li>
<li id='list_731.3'><code>grants</code>: REQUIRED. A JSON object indicating to the Wallet the Grant Type <code>pre-authorized_code</code>. This grant is represented by a key and an object, where the key is `urn:ietf:params:oauth:grant-type:pre-authorized_code`. In this profile the credential issuance flow requires initial authentication of the End User by the Credential Issuer, so the Pre-Authorized Code Flow achieves a good level of security and we do not need the more general Authorization Code Flow. <div>
<p>In other scenarios like when the wallet is a native mobile application and the user interacts with the Issuer exclusively with the mobile (without the laptop), then the Authorization Code Flow has to be used. This can be described in detail in a different profile.
</p>
</div>
</li>
</ul>
<p>The grant object contains the following values:
</p>
<ul>
<li id='list_745.1'><code>pre-authorized_code</code>: REQUIRED. The code representing the Credential Issuer's authorization for the Wallet to obtain Credentials of a certain type. This code MUST be short lived and single-use. This parameter value MUST be included in the subsequent Token Request with the Pre-Authorized Code Flow. </li>
<li id='list_745.2'><code>user_pin_required</code>: REQUIRED. The [[OpenID.VCI]] standard says it is RECOMMENDED, but this profile specifies the user pin to achieve a greater level of security. This field is a boolean value specifying whether the Credential Issuer expects presentation of a user PIN along with the Token Request in a Pre-Authorized Code Flow. Default is false. This PIN is intended to bind the Pre-Authorized Code to a certain transaction in order to prevent replay of this code by an attacker that, for example, scanned the QR code while standing behind the legit user. It is RECOMMENDED to send a PIN via a separate channel. The PIN value MUST be sent in the <code>user_pin</code> parameter with the respective Token Request. </li>
</ul>
<p>The following non-normative example shows a Credential Offer object where the Credential Issuer offers the issuance of one Credential ("LEARCredential"):
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"credential_issuer"</span>: <span style="color:#f1fa8c">"https://www.goodair.com"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"credentials"</span>: [
</span></span><span style="display:flex;"><span> <span style="color:#f1fa8c">"LEARCredential"</span>
</span></span><span style="display:flex;"><span> ],
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"grants"</span>: {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"urn:ietf:params:oauth:grant-type:pre-authorized_code"</span>: {
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"pre-authorized_code"</span>: <span style="color:#f1fa8c">"asju68jgtyk9ikkew"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"user_pin_required"</span>: <span style="color:#ff79c6">true</span>
</span></span><span style="display:flex;"><span> }
</span></span><span style="display:flex;"><span> }
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
</section>
<section><h2>Contents of the QR code</h2>
<p>Below is a non-normative example of the Credential Offer displayed by the Credential Issuer as a QR code when the Credential Offer is passed by reference, as required in this profile:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#50fa7b">https://www.goodair.com/credential-offer?</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">credential_offer_uri</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">https%3A%2F%2Fserver%2Eexample%2Ecom%2Fcredential-offer%2F5j349k3e3n23j</span>
</span></span></code></pre>
<p>Which in plain text would be:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#50fa7b">https://www.goodair.com/credential-offer?</span>
</span></span><span style="display:flex;"><span><span style="color:#50fa7b">credential_offer_uri</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">https://www.goodair.com/credential-offer/5j349k3e3n23j</span>
</span></span></code></pre>
<p>To increase security, the Issuer MUST make sure that every Credential Offer URI is unique for all credential offers created. This is the purpose of the nonce (<code>5j349k3e3n23j</code>) at the end of the url in the example. Issuers can implement whatever mechanism they wish, as far as it is transparent to the wallet.
</p>
</section>
</section>
<section><h2>Credential Issuer Metadata</h2>
<p>The Wallet backend retrieves the Credential Issuer's configuration using the Credential Issuer Identifier that was received in the Credential Offer.
</p>
<p>A Credential Issuer is identified in this context by a case sensitive URL using the https scheme that contains scheme, host and, optionally, port number and path components, but no query or fragment components. No DID is used in this context.
</p>
<p>Credential Issuers MUST make a JSON document available at the path formed by concatenating the string `/.well-known/openid-credential-issuer` to the Credential Issuer Identifier. If the Credential Issuer value contains a path component, any terminating / MUST be removed before appending `/.well-known/openid-credential-issuer`.
</p>
<p><code>openid-credential-issuer</code> MUST point to a JSON document compliant with this specification and MUST be returned using the `application/json` content type.
</p>
<p>The retrieval of the Credential Issuer configuration is illustrated below.
</p>
<figure id='iss-issuermetadata'>
<p><img src="images/issuance/issuance_issuermetadata.svg" alt="" />
</p>
<figcaption>Issuer metadata.
</figcaption>
</figure>
<section><h2>Credential Issuer Metadata Parameters</h2>
<p>The object contained in <code>openid-credential-issuer</code> contains the following:
</p>
<ul>
<li id='list_805.1'><code>credential_issuer</code>: REQUIRED. The Credential Issuer's identifier. </li>
<li id='list_805.2'><code>credential_endpoint</code>: REQUIRED. URL of the Credential Issuer's Credential Endpoint. This URL MUST use the https scheme and MAY contain port, path and query parameter components. </li>
<li id='list_805.3'><code>credentials_supported</code>: REQUIRED. A JSON array containing a list of JSON objects, each of them representing metadata about a separate credential type that the Credential Issuer can issue. The JSON objects in the array MUST conform to the structure of the Section XXXX. </li>
</ul>
<p>TODO: define a global directory of credentials supported to eliminate requirement for each individual Issuer to publish its own list.
</p>
<p>This profile does not make use of the following parameters:
</p>
<ul>
<li id='list_816.1'><code>authorization_server</code> parameter, because it uses the <code>pre-authorized_code</code> Grant type. </li>
<li id='list_816.2'><code>batch_credential_endpoint</code> parameter. It indicates that the Credential Issuer does not support the Batch Credential Endpoint. </li>
<li id='list_816.3'><code>display</code> parameter. </li>
</ul>
</section>
</section>
<section><h2>OAuth 2.0 Authorization Server Metadata</h2>
<p>This specification also defines a new OAuth 2.0 Authorization Server metadata [[RFC8414]] parameter to publish whether the AS that the Credential Issuer relies on for authorization, supports anonymous Token Requests with the Pre-authorized Grant Type. It is defined as follows:
</p>
<ul>
<li id='list_828.1'><code>pre-authorized_grant_anonymous_access_supported</code>: OPTIONAL. A JSON Boolean indicating whether the issuer accepts a Token Request with a Pre-Authorized Code but without a client id. The default is false. </li>
</ul>
</section>
<section><h2>Access Token</h2>
<figure id='issuance_accesstoken'>
<p><img src="images/issuance/issuance_accesstoken.svg" alt="" />
</p>
<figcaption>Access Token.
</figcaption>
</figure>
<p>The Wallet invokes the Token Endpoint implemented by the Authorization Server, which issues an Access Token and, optionally, a Refresh Token in exchange for the Pre-authorized Code that the wallet obtained in the Credential Offer.
</p>
<section><h2>Token Request</h2>
<p>After the wallet receives the Credential Issuer Metadata, a Token Request is made as defined in Section 4.1.3 of [[RFC6749]].
</p>
<p>The following are the extension parameters to the Token Request used in a Pre-Authorized Code Flow as used in this profile:
</p>
<ul>
<li id='list_847.1'><code>pre-authorized_code</code>: REQUIRED. The code representing the authorization to obtain Credentials of a certain type. </li>
<li id='list_847.2'><code>user_pin</code>: OPTIONAL. String value containing a user PIN. This value MUST be present if user_pin_required was set to true in the Credential Offer. The string value MUST consist of maximum 8 numeric characters (the numbers 0 - 9). </li>
</ul>
<p>In this profile the Wallet does not have to authenticate when using the Token Endpoint, because we are using the Pre-Authorized Code Grant Type, given the level of trust between the Issuer and the End User and that authentication was already performed at the beginning of the flow.
</p>
<p>Below is a non-normative example of a Token Request:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#50fa7b">POST</span> /token <span style="color:#ff79c6">HTTP</span><span style="color:#ff79c6">/</span><span style="color:#bd93f9">1.1</span>
</span></span><span style="display:flex;"><span>Host<span style="color:#ff79c6">:</span> server.example.com
</span></span><span style="display:flex;"><span>Content-Type<span style="color:#ff79c6">:</span> application/x-www-form-urlencoded
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code
</span></span><span style="display:flex;"><span>&pre-authorized_code=SplxlOBeZQQYbYS6WxSbIA
</span></span><span style="display:flex;"><span>&user_pin=493536
</span></span></code></pre>
</section>
<section><h2>Successful Token Response</h2>
<p>Token Responses are made as defined in [[RFC6749]].
</p>
<p>In addition to the response parameters defined in [[RFC6749]], the Authorization Server returns the following parameters:
</p>
<ul>
<li id='list_872.1'><code>c_nonce</code>: REQUIRED. JSON string containing a nonce to be used to create a proof of possession of key material when requesting a Credential. The Wallet MUST use this nonce value for its subsequent credential requests until the Credential Issuer provides a fresh nonce. </li>
<li id='list_872.2'><code>c_nonce_expires_in</code>: REQUIRED. JSON integer denoting the lifetime in seconds of the c_nonce. </li>
</ul>
<p>Below is a non-normative example of a Token Response:
</p>
<pre class="nohighlight" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span><span style="color:#ff79c6">HTTP</span><span style="color:#ff79c6">/</span><span style="color:#bd93f9">1.1</span> <span style="color:#bd93f9">200</span> OK
</span></span><span style="display:flex;"><span>Content-Type<span style="color:#ff79c6">:</span> application/json
</span></span><span style="display:flex;"><span>Cache-Control<span style="color:#ff79c6">:</span> no-store
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"access_token"</span>: <span style="color:#f1fa8c">"eyJhbGciOiJSUzI1NiIsInR5cCI6Ikp..sHQ"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"token_type"</span>: <span style="color:#f1fa8c">"bearer"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"expires_in"</span>: <span style="color:#bd93f9">86400</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"c_nonce"</span>: <span style="color:#f1fa8c">"tZignsnFbp"</span>,
</span></span><span style="display:flex;"><span> <span style="color:#ff79c6">"c_nonce_expires_in"</span>: <span style="color:#bd93f9">86400</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre>
</section>
<section><h2>Token Error Response</h2>
<p>If the Token Request is invalid or unauthorized, the Authorization Server constructs the error response as defined in section 6.3 of [[OpenID.VCI]].
</p>
</section>
</section>
<section><h2>Request and receive Credential</h2>
<figure id='issuance_requestcredential'>
<p><img src="images/issuance/issuance_requestcredential.svg" alt="" />
</p>
<figcaption>Request and receive Credential.
</figcaption>
</figure>
<p>The Wallet backend invokes the Credential Endpoint, which issues a Credential as approved by the End-User upon presentation of a valid Access Token representing this approval.
</p>
<p>Communication with the Credential Endpoint MUST utilize TLS.
</p>
<p>The client can request issuance of a Credential of a certain type multiple times, e.g., to associate the Credential with different public keys/Decentralized Identifiers (DIDs) or to refresh a certain Credential.
</p>
<p>If the Access Token is valid for requesting issuance of multiple Credentials, it is at the client's discretion to decide the order in which to request issuance of multiple Credentials requested in the Authorization Request.
</p>
<section><h2>Binding the Issued Credential to the identifier of the End-User possessing that Credential</h2>
<p>The Issued Credential MUST be cryptographically bound to the identifier of the End-User who possesses the Credential. Cryptographic binding allows the Verifier to verify during the presentation of a Credential that the End-User presenting a Credential is the same End-User to whom that Credential was issued.
</p>
<p>The Wallet has to provide proof of control alongside key material using the mechanism described below.
</p>
</section>
<section><h2>Credential Request</h2>
<p>The Wallet backend makes a Credential Request to the Credential Endpoint by sending the following parameters in the entity-body of an HTTP POST request using the `application/json` media type.
</p>
<ul>
<li id='list_924.1'><code>format</code>: REQUIRED. This profile uses the Credential format identifier <code>jwt_vc_json</code>. </li>
<li id='list_924.2'><code>proof</code>: OPTIONAL. JSON object containing proof of possession of the key material the issued Credential shall be bound to. The specification envisions use of different types of proofs for different cryptographic schemes. The proof object MUST contain a <code>proof_type</code> claim of type JSON string denoting the concrete proof type. This type determines the further claims in the proof object and its respective processing rules. Proof types are defined in Section [[[#proof_type]]]. </li>
</ul>
<p>The proof element MUST incorporate a <code>c_nonce</code> value generated by the Credential Issuer and the Credential Issuer Identifier (audience) to allow the Credential Issuer to detect replay. The way that data is incorporated depends on the proof type. In a JWT, for example, the <code>c_nonce</code> is conveyed in the <code>nonce</code> claim whereas the audience is conveyed in the <code>aud</code> claim. In a Linked Data proof, for example, the <code>c_nonce</code> is included as the challenge element in the proof object and the Credential Issuer (the intended audience) is included as the domain element.
</p>
<section id='proof_type'><h2>Proof Type</h2>
<p>This specification defines only one value for <code>proof_type</code>:
</p>
<p><code>jwt</code>: objects of this type contain a single jwt element with a JWS [[RFC7515]] as proof of possession. The JWT MUST contain the following elements:
</p>
<ul>
<li id='list_937.1'>in the JOSE Header, <div>
<ul>
<li id='list_940.1'><code>typ</code>: REQUIRED. MUST be `openid4vci-proof+jwt`, which explicitly types the proof JWT as recommended in Section 3.11 of [[RFC8725]]. </li>
<li id='list_940.2'><code>alg</code>: REQUIRED. A digital signature algorithm identifier such as per IANA "JSON Web Signature and Encryption Algorithms" registry. MUST NOT be none or an identifier for a symmetric algorithm (MAC). </li>
<li id='list_940.3'><code>kid</code>: REQUIRED. JOSE Header containing the key ID. The Credential will be bound to a DID, so the kid refers to a DID URL which identifies a particular key in the DID Document that the Credential will be bound to. </li>
</ul>
</div>