-
Notifications
You must be signed in to change notification settings - Fork 1
/
dataAgreements.html
1302 lines (1228 loc) · 54.1 KB
/
dataAgreements.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>
<head>
<meta charset="utf-8">
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove" defer></script>
<script src="./common.js"></script>
<script class="remove">
// All config options at https://respec.org/docs/
var respecConfig = {
specStatus: "unofficial",
editors: [
{
name: "José San Juan",
mailto: "[email protected]"
},
],
github: "decentralized-identity/vui",
shortName: "vui-data-agreements",
xref: "web-platform",
group: "Verifier Universal Interfaces",
localBiblio: ccg.localBiblio,
logos: [
{
src: "https://cdn2.hubspot.net/hubfs/4728390/GATACA_ISOTYPE_GRADIENT.png",
url: "https://gataca.io",
alt: "GATACA",
width: 100,
height: 100,
id: "gataca-logo",
},
],
};
</script>
<style>
.oplist {
list-style-type: none;
margin: 0;
padding: 0;
}
.oplist:first-of-type {
counter-reset: item;
}
.start2 {
counter-set: item 1;
}
.start4 {
counter-set: item 3;
}
.oplist>li {
display: table;
counter-increment: item;
margin-bottom: 0.6em;
}
.oplist>li:before {
content: counters(item, ".") ". ";
display: table-cell;
padding-right: 0.6em;
}
li .oplist>li {
margin: 0;
}
li .oplist>li:before {
content: counters(item, ".") " ";
}
table {
border-collapse: collapse;
border-width: 1px;
}
table td,
table th {
border: 1px solid #ddd;
padding: 8px;
}
table tr:nth-child(even) {
background-color: #f2f2f2;
}
table tr:hover {
background-color: #ddd;
}
</style>
</head>
<body>
<h1 id="title">Data Agreements</h1>
<h2 id="subtitle">Definition of the standards managing the lifecycle of Data Agreements for usage of the verifiable
credentials under the <a>Verifier Universal Interface</a> protocol, as well as its relations with other
protocols in VUI.
</h2>
<section id="abstract">
<p>
Data usage and data sharing is a major concern in all digital services and for the last decade, regulation has increased
according to user needs.
</p>
<p>
On the Decentralized Identity model, there is no current support for the management of the data. Considering
the user experience perspective, user rights and service provider risk assessment and data
management processes, a specific protocol to agree on the usage of verifiable credentials could be
attractive for verifiers.
</p>
<dd>
This document proposes a specific Data Model to manage data agreements. It also defines a basic protocol and
the
mechanisms to embed it inside a <a>Presentation Exchange</a>, which could be supported by multiple exchange
standards.
</dd>
<p class="ednote">
Despite its format, this document doesn't aim to be published on the W3C as a standard normative, rather it aims to
offer a new protocol that is applicable to known SSI frameworks for the improvement of data management.
Other protocol extensions shall be discussed and included if considered appropriate.
</p>
</section>
<section id="sotd">
<p> </p>
</section>
<section data-dfn-for="Context">
<h1>Context</h1>
<p>
Regarding standarization efforts on enforcing a technical consent on the usage of Verifiable Credentials,
there seems to be a gap that hasn't been filled yet.
</p>
<p>
The <i>Consent & Information Sharing Work Group</i> at <a href="https://kantarainitiative.org/">Kantara</a>
has been working on a generic <a>Consent Receipts</a> specification that could apply to any digital service.
The ISO organization has also provided some guidelines and is working on the subject:
<ul>
<li>
ISO/IEC 29184: 2020: Information Technology - Online Privacy Notices and Consent (Published, available
at
https://www.iso.org/standard/70331.html)
</li>
<li>
ISO/IEC TS 27560 — Privacy technologies — Consent record information structure (Not published yet)
</li>
</ul>
</p>
<p>
In the context of SSI frameworks however, some organizations could have proprietary implementations of
consent mechanisms, such as <a>Verifiable
Consents</a>; but no standard has received major adherence.
</p>
<p>
In the context of the EssifLab, the <a>Automated Data Agreement</a> project has been created. It builds upon
Kantara <a>Consent Receipts</a> to allow a data privacy mechanisms to be enforced in the framework of
Hyperledger Aries.
</p>
<p>
The benefits of <a>Automated Data Agreement</a> in the management of <a>
DPIA
</a> are presented in [[ADA]]. This kind of protocol could also be integrated in automation tools to manage
a company's <a>DPIA</a>.
</p>
<p>
This document will try to offer an adaptation, built upon both <a>Automated Data Agreements</a> and Kantara
<a>Consent Receipts</a>, of those same data privacy mechanisms in the context of the Verifier Universal
Interface; that is, avoiding specific technical solutions and in comunion to other related interfaces
such as the <a>Presentation Exchange</a>.
</p>
<section id="conformance">
</section>
<section id="terminology">
<h2>Terminology</h2>
<dl>
<dt><dfn data-lt="DID|<a>DIDs</a>|decentralized identifiers">Decentralized Identifier</dfn>
(DID)</dt>
<dd>As defined in [[DID-CORE]].</dd>
<dt><dfn data-lt="">DID document</dfn></dt>
<dd>As defined in [[DID-CORE]].</dd>
<dt><dfn data-lt="">DID resolution</dt>
<dd>As defined in [[DID-RESOLUTION]].</dd>
<dt><dfn data-lt="DID resolver's">DID resolver</dt>
<dd>As defined in [[DID-RESOLUTION]].</dd>
<dt><dfn data-lt="VC|Verifiable Credential">Verifiable Credential</dfn> (VC)</dt>
<dd>As defined in [[VC-DATA-MODEL]].</dd>
<dt><dfn data-lt="VP|Verifiable Presentation">Verifiable Presentation</dfn> (VP)</dt>
<dd>As defined in [[VC-DATA-MODEL]].</dd>
<dt><dfn data-lt="LD PROOFS|Proofs|Linked Data Proofs|Data Proof">Linked Data Proofs</dfn></dt>
<dd>As defined in [[LD-PROOFS]].</dd>
<dt><dfn data-lt="DIF Presentation Exchange|Presentation Exchange">Presentation Exchange</dfn></dt>
<dd>As defined in [[VUI-PRESENTATION-EXCHANGE]]</a></dd>
<dt><dfn data-lt="Presentation Definition">Presentation Definition</dfn></dt>
<dd>As defined in [[VUI-PRESENTATION-EXCHANGE]]</dd>
<dt><dfn data-lt="Presentation Submission">Presentation Submission</dfn></dt>
<dd>As defined in [[VUI-PRESENTATION-EXCHANGE]]</dd>
<dt><dfn data-lt="DPIA|DPIAs">Data Protection Impact Assessments</dfn> (DPIA)</dt>
<dd>As defined in <a href="https://gdpr.eu/data-protection-impact-assessment-template/">GDPR - DPIA</a>
</dd>
<dt><dfn data-lt="Data Agreement|Automated Data Agreement|ADA">(Automated) Data Agreements (ADA)</dfn>
</dt>
<dd>As defined in [[ADA]]</dd>
<dt><dfn data-lt="Data Agreement Template">Data Agreement Template</dfn></dt>
<dd>See <a href="#data-agreement-template"> Data Model</a></dd>
<dt><dfn data-lt="Data Agreement Record">Data Agreement Record</dfn></dt>
<dd>See <a href="#data-agreement-record"> Data Model</a></dd>
<dt><dfn data-lt="Consent Receipts">Consent Receipts</dfn></dt>
<dd>As defined in [[KANTARA-CONSENTS]]</dd>
<dt><dfn data-lt="Verifiable Consents">Verifiable Consents</dfn>(VCON)</dt>
<dd>As defined in [[VERIFIABLE-CONSENTS]]</dd>
<dt><dfn data-lt="JSON-LD">JSON-LD</dfn></dt>
<dd>As defined in [[JSON-LD]]</dd>
<dt><dfn data-lt="VUI|Verifier Universal Interface">Verifier Universal Interface</dfn>(VUI)</dt>
<dd>As defined in [[VUI]]</dd>
</dl>
</section>
</section>
<section data-dfn-for="Data Model">
<h1>Data Model</h1>
<p>
The data model aims to port the specifications of
Kantara <a>Consent Receipts</a> and <a>Automated Data Agreements</a> to have a base Data Agreement structure
that could be used on any SSI framework.
</p>
<p>
The <a>Data Agreement</a> represents all the information shared between a Holder and a Verifier in order
to enjoy a given Digital Service.
</p>
<h2>
JSON-LD
</h2>
<p>
JSON-LD is a JSON-based format used to serialize Linked Data.
</p>
<p>
The JSON-LD representation defines the following representation-specific entries:
</p>
<dl>
<dt>
@context
</dt>
<dd>
The JSON-LD Context is either a string or a list containing any combination of strings and/or ordered
maps.
</dd>
</dl>
<section data-dfn-for="Data Agreement Template">
<h2>Data Agreement Template</h2>
<p>
The Data Agreement Template is the base model to generate a <a>Data Agreement</a>.
It MAY be offered by the Verifier to the Holder at the initiation of a <a>Presentation Exchange</a>.
</p>
<p>
Its contents MUST match the presentation definition to be processable
</p>
<h3>Properties</h3>
<dl>
<dt>
Template Id
</dt>
<dd>
The template id references univocally the <a>Data Agreement Template</a>. It SHOULD be linked to a
specific presentation definition.
</dd>
<dt>
Template Version
</dt>
<dd>
The template version allows to keep tracking of updates on the Data Agreement template.
<br>
Holders MUST use the version to determine if they need to perform changes on an existing Data
Agreement Record
</dd>
<dt>
Data Receiver
</dt>
<dd>
<p>
The data receiver MUST inform the user of all the information about the service provided and the
usage of the data.
</p>
<dl>
<dt>
Id
</dt>
<dd>
<a>DID</a> associated to the service provider
</dd>
<dt>
Name
</dt>
<dd>
Name of the Service Provider to inform the Holder
</dd>
<dt>
Service
</dt>
<dd>
OPTIONAL: Description of the service that will make use of the data
</dd>
<dt>
URL
</dt>
<dd>
Base URL of the digital service provided to interact along the lifecycle of the data
agreement
</dd>
<dt>
Consent Duration
</dt>
<dd>
Default duration of the data agreement if no further operations happen. After expiration,
the data MAY be kept for regulation reasons, but not used or exploited any more.
</dd>
<dt>
Form of consent
</dt>
<dd>
OPTIONAL: Describes the way the holder needs to provide his consent. Either
<ul>
<li>
'explicit'
</li>
<li>
'implicit'
</li>
</ul>
Default is <b>'explicit'</b>
</dd>
</dl>
</dd>
<dt>
Purposes
</dt>
<dd>
<dl>
<dt>
Id
</dt>
<dd>
Unique identifier of the purpose to use it as a reference
</dd>
<dt>
Purpose Description
</dt>
<dd>
Description of the purpose for which the data will be used
</dd>
<dt>
Purpose Category
</dt>
<dd>
Data privacy category under which falls this purpose of usage.
<p class="ednote">
Credential purposes SHALL provide support for GDPR and other privacy regulations.
Vocabulary
MUST be in line with <a href="https://dpvcg.github.io/dpv/">Data Privacy
Vocabulary</a>.
<a
href="https://www.w3.org/community/dpvcg/wiki/Purposes_for_handling_Personal_Data#High-level_categories_.28to-be-discussed.29">
The list of all accounted purposes</a> has been used as a base for this selection.
</p>
<p>
The category MUST be one of the following:
</p>
<ul>
<li>'Identify verification'</li>
<li>'Fraud detection and prevention'</li>
<li>'Access control'</li>
<li>'Service Provision'</li>
<li>'Service Optimization'</li>
<li>'Service Personalisation'</li>
<li>'Marketing'</li>
<li>'Commercial Interests'</li>
<li>'Research & Development'</li>
</ul>
</dd>
<dt>
Legal basis
</dt>
<dd>
Legal basis employed by the service provider for the usage of this data. One of:
<ul>
<li> 'consent'</li>
<li> 'legal_obligation'</li>
<li> 'contract'</li>
<li> 'vital_interest'</li>
<li> 'public_task'</li>
<li> 'legitimate_interest'</li>
</ul>
</dd>
<dt>
Method of use
</dt>
<dd>
OPTIONAL Indicate the Holder how the data will be processed by the Verifier
<ul>
<li>
"none"
</li>
<li>
"data-source"
</li>
<li>
"data-using-service"
</li>
</ul>
</dd>
<dt>
Data Policy
</dt>
<dd>
<dl>
<dt>
Data Retention Period
</dt>
<dd>
Time during which the data MAY be kept by the service provider, even after
extinction of the consent.
</dd>
<dt>
Industry Scope
</dt>
<dd>
OPTIONAL Economic sector representing the service provided.
</dd>
<dt>
Geographic Restriction
</dt>
<dd>
OPTIONAL Geographic region where the data will be managed.
</dd>
<dt>
Jurisdictions
</dt>
<dd>
OPTIONAL List of legal jurisdictions under which the data will be used.
</dd>
<dt>
Policy URL
</dt>
<dd>
URL pointing to the privacy policy of this service
</dd>
<dt>
Storage Location
</dt>
<dd>
OPTIONAL Physical location of storage where the Data will be stored
</dd>
</dl>
</dd>
</dl>
</dd>
<dt>
Personal Data
</dt>
<dd>
<dl>
<dt>
Attribute name
</dt>
<dd>
Name describing univocally the attribute.
<p>
It MUST refer to an input descriptor ID on the associated <a>Presentation Definition</a>
</p>
</dd>
<dt>
Attribute sensitive
</dt>
<dd>
<b>boolean</b>
Marks if this piece of information must be managed as sensitive information
</dd>
<dt>
Purposes
</dt>
<dd>
List of purposes, referenced by their Id, under which this credential CAN be used.
</dd>
</dl>
</dd>
<dt>
DPIA
</dt>
<dd>
OPTIONAL: Information about the <a>DPIAs</a> performed with the generic defined scopes if they have
been
performed
<dl>
<dt>
Timestamp
</dt>
<dd>
Time at which the <a>DPIA</a> was performed
</dd>
<dt>
URL
</dt>
<dd>
Url to retrieve the <a>DPIA</a> report
</dd>
</dl>
</dd>
<dt>
Event
</dt>
<dd>
<p>
The events will track all the lifecycle and interactions performed on the <a>Data Agreement</a>
by the
different parties.
</p>
<dl>
<dt>
Principle Did
</dt>
<dd>
<a>DID</a> of the actor performing the data agreement operation
</dd>
<dt>
State
</dt>
<dd>
Current state of the <a>Data Agreement</a>.
MUST be one of the following:
<ul>
<li>
'Definition'
</li>
<li>
'Preparation'
</li>
<li>
'Capture'
</li>
<li>
'Modification'
</li>
<li>
'Revocation'
</li>
</ul>
</dd>
<dt>
Version
</dt>
<dd>
Version of the <a>Data Agreement</a> at the time the Event is performed
</dd>
<dt>
Timestamp
</dt>
<dd>
Time of operation of the <a>Data Agreement</a>
</dd>
<dt>
Proof
</dt>
<dd>
<a>Data Proof</a> asserting the event and the current resulting state of the <a></a>Data
Agreement</a>, as described in <a
href="https://www.w3.org/TR/vc-data-model/#proofs-signatures">VC Data
Model</a>. One or
more cryptographic proofs that can be used to detect tampering and
verify the
authorship of a modification or acceptance event.
</dd>
</dl>
</dd>
</dl>
<pre class="example" title="Data Agreement Template">
<pre class="json">
{
"@context": "https://schema.igrant.io/data-agreements/v1",
"data_receiver": {
"id": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH",
"consent_duration": 365,
"form_of_consent": "explicit",
"name": "Bank Of America Fake",
"service": "Bank Of America Demo",
"url": "https://9ae1-88-6-127-11.ngrok.io"
},
"event": [{
"principle_did": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH",
"proof": [{
"created": "2022-01-13T07:48:40Z",
"creator": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH#keys-1",
"domain": "gataca.io",
"nonce": "kX04XcM-rpYN4kDopwjaCX-ocxRwzrRs9R_DtsySghs=",
"proofPurpose": "assertionMethod",
"signatureValue": "fRx1WYGM_77VS_7m6SA4hpmmQdT_keIlTABeDY-FA1rQXSe0_zgSDdmVAzcegUJ23jfbKrZY_6EEYrTaode5Dg",
"type": "JcsEd25519Signature2020",
"verificationMethod": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH#keys-1"
}],
"state": "Preparation",
"version": "0",
"timestamp": 1642060120223
}],
"personal_data": [{
"attribute_name": "email",
"attribute_sensitive": true,
"purposes": ["Client authentication"]
}, {
"attribute_name": "debtRecords",
"attribute_sensitive": true,
"purposes": ["Client authentication","Special clients promotion"]
}],
"purposes": [{
"data_policy": {
"data_retention_period": 300,
"geographic_restriction": "Europe",
"industry_scope": "Banking",
"jurisdictions": ["Spain", "EU"],
"policy_URL": "https://bank.demo.gataca.io/privacy-policy/",
"storage_location": "Europe"
},
"id": "Client authentication",
"legal_basis": "legal_obligation",
"method_of_use": "data-source",
"purpose_category": "Identify verification",
"purpose_description": "Authenticate the user to provide services"
}, {
"data_policy": {
"data_retention_period": 30,
"geographic_restriction": "Europe",
"industry_scope": "Banking",
"jurisdictions": ["Spain", "EU"],
"policy_URL": "https://bank.demo.gataca.io/privacy-policy/",
"storage_location": "Europe"
},
"id": "Special clients promotion",
"legal_basis": "legitimate_interest",
"method_of_use": "data-using-service",
"purpose_category": "Service Personalisation",
"purpose_description": "Collecting user data for offering specific promotions"
}],
"template_id": "x76ShERoQReZmWlLdJZWhWmWQx8bhGa",
"template_version": "v1.0",
}
</pre>
</pre>
</section>
<section data-dfn-for="Data Agreement Record">
<h2>Data Agreement Record</h2>
<p>
The <a>Data Agreement</a> Record is an extension of the <a>Data Agreement Template</a>.
</p>
<p>
The Holder fills the template offered by the verifier with his personal data and the attribute unique
ids that are being shared in that exchange.
</p>
<p class="note">
Even if the Holder has multiple pieces of information satisfying the Verifier requirements, the Id of
the one selected MUST be referenced in the <a>Data Agreement</a> without disclosing its contents.
<br>
This is necessary to enforce Data-minimization, and ensure that the Verifier only has rights to use the
specific information shared by the Holder, and not any other of that same type that could also come from
the same Subject.
</p>
<p>
The <a>Data Agreement</a> Record represents the current accepted state of a <a>Data Agreement</a> by
both parties.
<br>
It SHOULD be
used to maintain the lifecycle of the credential exchange performed between the Holder and the Verifier.
</p>
<p>
The <a>Data Agreement Record</a> MUST be kept at its last version by both the Holder and the Verifier.
Previous versions of the <a>
Data Agreement
</a> are RECOMMENDED to be stored at least by Verifiers.
</p>
<h3>Properties</h3>
<p>
The additional properties added to the template are:
</p>
<dl>
<dt>
Id
</dt>
<dd>
Unique ID to reference this Data Agreement
</dd>
<dt>
Version
</dt>
<dd>
Current version of the Data Agreement Record
</dd>
<dt>
Data Holder
</dt>
<dd>
DID uniquely referencing the Holder of the credentials, performing the exchange.
<br>
It MAY be the same as the Data Subject. If using Peer DIDs for exchanges, it MUST be the Peer DID.
</dd>
<dt>
Data Subject
</dt>
<dd>
DID uniquely referencing the real persona to which the credentials used on the credential exchange
have been issued.
<br>
It MAY be the same or different as the Data Holder.
</dd>
<dt>
Personal Data
</dt>
<dd>
Inside the personal data information, the following field MUST be included
<dl>
<dt>
Attribute Id
</dt>
<dd>
Unique reference to the Id of the <a>Verifiable Credential</a> shared satisfying this kind
of information.
<br>
The credential Id MUST match the Id of the Credential that satisfies the Input Descriptor
matching the <b>
Attribute name
</b> of this same piece of personal data
</dd>
</dl>
</dd>
<dt>
Termination timestamp
</dt>
<dd>
If present, it signalates that this <a>Data Agreement Record</a> is not in use anymore with the
timestamp at which it was revocated.
</dd>
</dl>
<pre class="example" title="Data Agreement Record">
<pre class="json">
{
"@context": "https://schema.igrant.io/data-agreements/v1",
"data_holder": "did:gatc:NjBjNWJiNmY1ZjQ2NDYyZjk0Zjg0YWI4",
"data_receiver": {
"id": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH",
"consent_duration": 365,
"form_of_consent": "explicit",
"name": "Bank Of America Fake",
"service": "Bank Of America Demo",
"url": "https://9ae1-88-6-127-11.ngrok.io"
},
"data_subject": "did:gatc:YzQxNjRjM2U4YTUzZGVkNjhmNjAxYzk5",
"event": [{
"principle_did": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH",
"proof": [{
"created": "2022-01-13T07:48:40Z",
"creator": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH#keys-1",
"domain": "gataca.io",
"nonce": "kX04XcM-rpYN4kDopwjaCX-ocxRwzrRs9R_DtsySghs=",
"proofPurpose": "assertionMethod",
"signatureValue": "fRx1WYGM_77VS_7m6SA4hpmmQdT_keIlTABeDY-FA1rQXSe0_zgSDdmVAzcegUJ23jfbKrZY_6EEYrTaode5Dg",
"type": "JcsEd25519Signature2020",
"verificationMethod": "did:gatc:24vXYrJLHzoEuooa7xV6AZG2wc6tZSfH#keys-1"
}],
"state": "Preparation",
"version": "0",
"timestamp": 1642060120223
}, {
"principle_did": "did:gatc:NjBjNWJiNmY1ZjQ2NDYyZjk0Zjg0YWI4",
"proof": [{
"created": "2022-01-13T07:50:12Z",
"creator": "did:gatc:NjBjNWJiNmY1ZjQ2NDYyZjk0Zjg0YWI4#keys-1",
"proofPurpose": "authentication",
"signatureValue": "uWl5t_KSV09qG5nv5Opk0A-r0WoNKkeY9otdxA43sPwQFK4ZACVCKKT0bockbUYAhXm-SGBhQ45xlBwgH-GXDw",
"type": "JcsEd25519Signature2020",
"verificationMethod": "did:gatc:NjBjNWJiNmY1ZjQ2NDYyZjk0Zjg0YWI4#keys-1"
}],
"state": "Capture",
"version": "1",
"timestamp": 1642060212916
}],
"id": "3Nkep8bQygtyWyrmcJDkmnnmH8W1huJpZ4E2i6WyY1da",
"personal_data": [{
"attribute_id": "cred:gatc:NjMxNjc0NTA0ZjVmZmYwY2U0Y2M3NTRk",
"attribute_name": "email",
"attribute_sensitive": true,
"purposes": ["Client authentication"]
}, {
"attribute_id": "urn:credential:hEoISQtpfXua6VWzbGUKdON1rqxF3liv",
"attribute_name": "debtRecords",
"attribute_sensitive": true,
"purposes": ["Client authentication","Special clients promotion"]
}],
"purposes": [{
"data_policy": {
"data_retention_period": 300,
"geographic_restriction": "Europe",
"industry_scope": "Banking",
"jurisdictions": ["Spain", "EU"],
"policy_URL": "https://bank.demo.gataca.io/privacy-policy/",
"storage_location": "Europe"
},
"id": "Client authentication",
"legal_basis": "legal_obligation",
"method_of_use": "data-source",
"purpose_category": "Identify verification",
"purpose_description": "Authenticate the user to provide services"
}, {
"data_policy": {
"data_retention_period": 30,
"geographic_restriction": "Europe",
"industry_scope": "Banking",
"jurisdictions": ["Spain", "EU"],
"policy_URL": "https://bank.demo.gataca.io/privacy-policy/",
"storage_location": "Europe"
},
"id": "Special clients promotion",
"legal_basis": "legitimate_interest",
"method_of_use": "data-using-service",
"purpose_category": "Service Personalisation",
"purpose_description": "Collecting user data for offering specific promotions"
}],
"template_id": "x76ShERoQReZmWlLdJZWhWmWQx8bhGa",
"template_version": "v1.0",
"version": "1"
}
</pre>
</pre>
</section>
<h2>Known deviations </h2>
<p>
There are some known deviations from <a>Automated Data Agreements</a> due to either technical implementation
issues or to the adaptation to the <a>Presentation exchange</a> protocol.
</p>
<p>
Those changes apply to the relation between different subproperties of the Data Agreement or the cardinality
between them:
</p>
<ul>
<li>
<b>Usage of multiple purposes:</b> <br>
The <a>Data Agreement</a> represents all the information shared between a Holder and a Verifier in order
to enjoy a given Digital Service.
<br>
The service MAY require data for different purposes.
<br>
The different pieces of data taking place in the exchange MAY be used for more than one single purposes.
</li>
<li>
<b>Including data subject and data holder:</b> <br>
The data user and the data holder are required to verify the DIDs performing the different
acceptance/update events on the <a>Data Agreement</a>.
<br>
The distinction between both roles has been included to allow the usage of Peer DIDs or Identity
Delegation processes.
</li>
<li>
<b>Additional information on the Data Receiver:</b> <br>
More information on the Data Receiver has been included to better adapt to <a>Consent Receipts</a>
</li>
<li>
<b>Usage of Proofs:</b> <br>
Proofs are included inside each of the events to maintain a cleaner view and verification of the state
of the record.
<br>
The version of the <a>Data Agreement</a> at the time of the event is also included to easy audit labors.
</li>
</ul>
</section>
<section data-dfn-for="Lifecycle management">
<h1>Lifecycle management</h1>
This MUST be the lifecycle of a <a>Data Agreement</a>:
<figure>
<img src="assets/da_lifecycle.png"></img>
<figcaption>Simplified lifecycle of the
data agreement record
</figcaption>
</figure>
<section data-dfn-for="Creation">
<h2>
Creation
</h2>
<p>
The generation <a>Data Agreement</a> MUST be performed along a new <a>Presentation
Exchange</a>.
With any presentation exchange, a <a>Data Agreement Template</a> with a given <b>Id</b> and
<b>Version</b> SHOULD be attached.
</p>
<p>
The Holder SHOULD check for existent <a>Data Agreement Records</a> belonging to the same <b>data
receiver id</b>.
<br>
<ul>
<li>
If these are non-existent, then a new <a>Data Agreement</a> MUST be created.
</li>
<li>
If there are is one or more existing record, but with a different <b>template_id</b>, then a new <a>Data
Agreement</a> MUST be created.
</li>
<li>
If there is one existing with the same <b>template_id</b>, the <b>template_version</b> MUST be
checked to
see if a modification is required or if the last existent <a>Data Agreement Record</a>can be used
</li>
</ul>
</p>
<p>
The process to generate a new <a>Data Agreement</a> would be:
<ol>
<li>
Assign a new random Id and set the version to 1
</li>
<li>
Fill the <a>Data Agreement Record</a> with the attribute ids of the selected credentials matching
the <a>Presentation Definition</a>
</li>
<li>
Add an event with status <b>Preparation</b> with the new version and sign it with the Holder DIDs
</li>
<li>
Only if the Holder <a>DID</a> is different than the Subject <a>DID</a>: <br>
Add an event with status <b>Preparation</b> with the new version and sign it with the Subject
<a>DID</a>
</li>
<li>
Send it to the Verifier
</li>
<li>
<ol>
<li>
Verify that all the requirements are filled.
</li>
<li>
Add an event with status <b>Capture</b> with the version <b>1</b> and sign it with the
Verifier
<a>DID</a>
</li>
<li>
Store the new version of the <a>Data Agreement Record</a>
</li>
<li>
Return the updated <a>Data Agreement Record</a> to the Holder
</li>
</ol>
</li>
<li>
Store in the wallet the updated and approved <a>Data Agreement Record</a> to use it on current or
next presentation exchanges.
</li>
</ol>
</p>
</section>
<section data-dfn-for="Modifications">
<h2>
Modifications
</h2>
<p>The <a>Data Agreement</a> MAY be modified along time with new needs from both the Holder or the Verifier.
</p>
<p> Any modifications of the <a>Data Agreement</a> MUST be performed along a new <a>Presentation
Exchange</a>.</p>
<p>
This table shows the different kind of modifications that can be performed on a <a>Data Agreement</a>:
</p>
<figure id="api-functional-alignment">
<pre class="json">
+-------------------------------------++-------------------------------------+
| Holder || Verifier |