forked from OpSecId/oca-render-method
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
367 lines (367 loc) · 13.5 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>OCA Render Method</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove" defer></script>
<script class="remove">
// All config options at https://respec.org/docs/
var respecConfig = {
specStatus: "ED",
shortName: "oca-render-method",
editors: [
{
name: "Patrick St-Louis",
url: "https://www.linkedin.com/in/patrick-stlouis/",
company: "Open Security and Identity",
companyURL: "https://opsecid.ca/"
},
{
name: "Akiff Manji",
url: "https://www.linkedin.com/in/akiffmanji/",
company: "Petri Dish Development",
companyURL: "https://petridish.dev/"
},
{
name: "Emiliano Suñé",
url: "https://www.linkedin.com/in/emilianosune/",
company: "Quartech",
companyURL: "http://www.quartech.com/"
},
{
name: "Jason Syrotuck",
url: "https://github.com/Jsyro",
company: "NTT DATA",
companyURL: "https://www.nttdata.com/global/en/"
}
],
authors: [
{
name: "Patrick St-Louis",
url: "https://www.linkedin.com/in/patrick-stlouis/",
company: "Open Security and Identity",
companyURL: "https://opsecid.ca/"
},
{
name: "Akiff Manji",
url: "https://www.linkedin.com/in/akiffmanji/",
company: "Petri Dish Development",
companyURL: "https://petridish.dev/"
},
{
name: "Emiliano Suñé",
url: "https://www.linkedin.com/in/emilianosune/",
company: "Quartech",
companyURL: "http://www.quartech.com/"
},
{
name: "Jason Syrotuck",
url: "https://github.com/Jsyro",
company: "NTT DATA",
companyURL: "https://www.nttdata.com/global/en/"
}
],
github: "https://github.com/opsecid/oca-render-method/",
maxTocLevel: 4,
lint: {"no-unused-dfns": false},
};
</script>
<style>
pre .highlight {
font-weight: bold;
color: green;
}
pre .comment {
font-weight: bold;
color: Gray;
}
.color-text {
font-weight: bold;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
ol.algorithm {
counter-reset: numsection;
list-style-type: none;
}
ol.algorithm li {
margin: 0.5em 0;
}
ol.algorithm li:before {
font-weight: bold;
counter-increment: numsection;
content: counters(numsection, ".") ") ";
}
</style>
</head>
<body>
<section id="abstract">
<p> This specification describes mechanisms to apply the Overlay Capture Architecture to Verifiable Credentials as a Render Method. </p>
</section>
<section id="sotd">
<p> This is an experimental specification and is undergoing regular revisions. It is not fit for production deployment. </p>
</section>
<section class="informative">
<h2>Introduction</h2>
<p></p>
<aside class="note" title="Full OCA Specification">
<p>Click <a href="https://oca.colossi.network/specification/">here</a> for the full OCA specification!</p>
</aside>
<section id="terminology">
<h3>Terminology</h3>
</section>
<section id="conformance">
<p> A <dfn>conforming render method</dfn> is any concrete expression of the data model that complies with the normative statements in this specification. Specifically, all relevant normative statements in Sections <a href="#data-model"></a> and <a href="#algorithms"></a> of this document MUST be enforced. </p>
<p> A <dfn class="lint-ignore">conforming processor</dfn> is any algorithm realized as software and/or hardware that generates or consumes a <a>conforming render method</a>. Conforming processors MUST produce errors when non-conforming documents are consumed. </p>
<p> This document also contains examples that contain JSON and JSON-LD content. Some of these examples contain characters that are invalid JSON, such as inline comments (`//`) and the use of ellipsis (`...`) to denote information that adds little value to the example. Implementers are cautioned to remove this content if they desire to use the information as valid JSON or JSON-LD. </p>
</section>
</section>
<section>
<h2>Data Model</h2>
<p> The following sections outline the data model that is used by this specification for rendering methods </p>
<section>
<h3>OverlayCaptureBundle Entry</h3>
<p> When an <a>issuer</a> desires to specify an OCA Bundle for a <a>verifiable credential</a>, they MAY add a `renderMethod` property that uses the data model described below. </p>
<table class="simple">
<thead>
<tr>
<th style="white-space: nowrap">Property</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td> A URL that dereferences to an JSON document [[JSON]] with a valid <a href="https://datatracker.ietf.org/doc/html/draft-ssmith-said">SAID</a> file name. </td>
</tr>
<tr>
<td>type</td>
<td> The <code>type</code> property MUST be <code>OverlayCaptureBundle</code>. </td>
</tr>
<tr>
<td>bundleVersion</td>
<td> The bundle version provided by the issuer used to define OCA Object types. </td>
</tr>
<tr>
<td>overlayNames</td>
<td> The overlay names provided by the issuer. These strings MUST map to an overlay's type after pairing it with the version like so "spec/overlay/{overlayName}/{version}". </td>
</tr>
<tr>
<td>supportedLanguages</td>
<td> The language support provided by the issuer. These values can be used to querry the desired OCA Objects. The following OCA Object names support language: information, label, meta and entry </td>
</tr>
</tbody>
</table>
<p> An entry of the data model shown above is expressed in a <a>renderMethod</a> section in the example below. </p>
<pre class="example json" title="OverlayCaptureBundle Entry">
{
"renderMethod": [
{
"id": "https://oca.opsec.id/bundles/EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis.json",
"type": "OverlayCaptureBundle",
"bundleVersion": "1.0",
"overlayNames": [ "information", "label", "cardinality", "mapping" ],
"supportedLanguages": [ "en", "fr" ]
}
]
}
</pre>
<p> In the example above, the <a>issuer</a> has provided an OCA Bundle for a bachelor's degree that will provide additional information to the <a>verifiable credential</a>.</p>
</section>
<section>
<h2>OverlayCaptureBundle Object</h2>
<p>An OCA bundle consists of a Capture Base and a series of cryptographically bound Overlays.</p>
<h3>Capture Base</h3>
<pre class="example json" title="Capture Base">
{
"type":"spec/capture_base/1.0",
"classification":"",
"attributes":{
"$.credentialSubject.degree.type": "Array[Text]",
"$.credentialSubject.degree.name": "Text"
},
"flagged_attributes":[]
}
</pre>
<h3>Bound Overlays</h3>
<pre class="example json" title="Semantic Information Overlay">
{
"capture_base":"EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis",
"type":"spec/overlays/information/1.0",
"language":"en",
"attribute_information":{
"$.credentialSubject.degree.name": "The name of the degree."
}
}
</pre>
<pre class="example json" title="Inputs Cardinality Overlay">
{
"capture_base":"Ev_RaB-gIOn8VAB3sg40mINxjiYRxdLVQrgce0aZbFcc",
"type":"spec/overlays/cardinality/1.0",
"attr_cardinality":{
"$.credentialSubject.degree.type":"1"
}
}
</pre>
<pre class="example json" title="Transformation Attribute Mapping Overlay">
{
"capture_base":"Ev_RaB-gIOn8VAB3sg40mINxjiYRxdLVQrgce0aZbFcc",
"type":"spec/overlays/mapping/1.0",
"attribute_mapping":{
"$.credentialSubject.degree.name":"degreeName"
}
}
</pre>
</section>
</section>
<section id="algorithms">
<h2>Algorythms</h2>
<p>These algorythms instruct how to apply an OCA bundle to a Verifiable Credential.</p>
<h3>Creating an OCA Bundle</h3>
<h4>Get JSON path array from VC</h4>
<h4>Define the Capture Base attributes</h4>
<h4>Create desired overlays</h4>
<h4>Publish OCA Bundle</h4>
<h4>Add entry to Verifiable Credential</h4>
<h3>Applying an OCA Bundle</h3>
<h4>Get JSON path array from VC</h4>
<p>An implementer MAY ignore the @context of the VC when genereting the array or remove the corresponding paths.</p>
<pre class="example json" title="Verifiable Credential">
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
"https://w3id.org/vc/render-method/v1"
],
"id": "http://example.edu/credentials/3732",
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
],
"issuer": "https://example.edu/issuers/14",
"validFrom": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"degree": {
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts"
}
},
"renderMethod": [
{
"id": "https://oca.opsec.id/bundles/EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis.json",
"type": "OverlayCaptureBundle",
"bundleVersion": "1.0",
"overlayNames": [ "information", "label", "cardinality", "mapping" ],
"supportedLanguages": [ "en", "fr" ]
}
]
}
</pre>
<pre class="example" title="JSON Paths">
$.id
$.type
$.type[0]
$.type[1]
$.issuer
$.validFrom
$.credentialSubject
$.credentialSubject.id
$.credentialSubject.degree
$.credentialSubject.degree.type
$.credentialSubject.degree.name
$.renderMethod
$.renderMethod[0]
$.renderMethod[0].id
$.renderMethod[0].type
$.renderMethod[0].overlayType
$.renderMethod[0].overlayType[0]
$.renderMethod[0].language
$.renderMethod[0].language[0]
$.renderMethod[0].language[1]
</pre>
<h4>Resolve Bundle Object</h4>
<p>Do a GET request on the id to fetch the OCA Bundle Object.</p>
<pre class="example json" title="OCA Bundle">
{
"type": "spec/capture_base/1.0",
"classification": "",
"attributes": {
"$.credentialSubject.degree.type": "Array[Text]",
"$.credentialSubject.degree.name": "Text"
},
"flagged_attributes": [],
"overlays": [
{
"capture_base": "EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis",
"type": "spec/overlays/information/1.0",
"language": "en",
"attribute_information": {
"$.credentialSubject.degree.name": "The name of the degree obtained by the subject."
}
},
{
"capture_base": "EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis",
"type": "spec/overlays/information/1.0",
"language": "fr",
"attribute_information": {
"$.credentialSubject.degree.name": "Le nom du Diplôme obtenu par le sujet."
}
},
{
"capture_base": "EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis",
"type": "spec/overlays/label/1.0",
"language": "en",
"attribute_labels": {
"$.credentialSubject.degree.name": "Degree Name"
}
},
{
"capture_base": "EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis",
"type": "spec/overlays/label/1.0",
"language": "fr",
"attribute_labels": {
"$.credentialSubject.degree.name": "Nom du diplôme"
}
},
{
"capture_base": "Ev_RaB-gIOn8VAB3sg40mINxjiYRxdLVQrgce0aZbFcc",
"type": "spec/overlays/cardinality/1.0",
"attr_cardinality": {
"$.credentialSubject.degree.type": "1"
}
},
{
"capture_base": "Ev_RaB-gIOn8VAB3sg40mINxjiYRxdLVQrgce0aZbFcc",
"type": "spec/overlays/mapping/1.0",
"attribute_mapping": {
"$.credentialSubject.degree.name": "degreeName"
}
}
]
}
</pre>
<h4>Validate Capture Base</h4>
<p>Verify the integrity with the SAID component of the URL.</p>
<h4>Query Overlays</h4>
<p>Query the available overlays with the desired language, overlay name and JSON path.</p>
</section>
<section>
<h2>Security Considerations</h2>
<h3>Self-Addressing IDentifier (SAID)</h3>
<p><a>SAID</a> are used as a cryptographic integrity mechanism for OCA Objects.</p>
<p></p>
</section>
<section>
<h2>Privacy Considerations</h2>
<h3>Flagged Attributes</h3>
<p>The Capture Base can flag sensitive attributes.</p>
</section>
<section>
<h2>Application Use Cases</h2>
<p> The complete list of applications can be found <a href="https://oca.colossi.network/guide/applications/">here</a>. Below is an overview. </p>
<h3>Data transformation</h3>
<h3>Object presentation</h3>
<h3>Internationalisation</h3>
</section>
</body>
</html>