Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,10 @@ <h4>TemplateRenderMethod</h4>
</table>

<section>
<h3>The `json-card` Render Suite</h3>
<h3>The `card` Render Suite</h3>
<p>
The `json-card` render suite uses JSON templates to transform a
[=verifiable credential=] into a standardized JSON card format. This format
The `card` render suite uses JSON templates to transform a
[=verifiable credential=] into a standardized data display format. This format
enables wallets to display credentials in a responsive card layout with key
data highlighted and configurable additional fields. Wallets that implement
this method can render the standardized JSON output in their own card UI
Expand All @@ -437,20 +437,20 @@ <h3>The `json-card` Render Suite</h3>
</p>

<p>
The template is a JSON object that matches the `json-card` output structure.
The template is a JSON object that matches the `card` output structure.
String values in the template can be JSON pointer strings (as specified in
[[[RFC6901]]]) that reference fields in the [=verifiable credential=]. When
processing the template, JSON pointer strings are evaluated against the
credential data and replaced with the resolved values. The template MUST
conform to the JSON template schema defined below, and the resulting output
MUST conform to the `json-card` output schema. Compound data across multiple
MUST conform to the `card` output schema. Compound data across multiple
fields is not supported; each field references a single JSON pointer.
</p>

<section>
<h4>JSON Template Schema</h4>
<p>
The template for a `json-card` render suite MUST be a JSON object that
The template for a `card` render suite MUST be a JSON object that
conforms to the following structure. The template structure matches the
output structure, but string values can be either literal strings or JSON
pointer strings (starting with `/`) that reference fields in the
Expand Down Expand Up @@ -540,7 +540,7 @@ <h4>JSON Template Schema</h4>
</p>

<pre class="example nohighlight"
title="JSON Schema for json-card template">
title="JSON Schema for card template">
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
Expand Down Expand Up @@ -610,12 +610,12 @@ <h4>JSON Template Schema</h4>
</pre>

<p>
The following example shows a valid `json-card` template with JSON pointer
The following example shows a valid `card` template with JSON pointer
strings:
</p>

<pre class="example nohighlight"
title="Example json-card template">
title="Example card template">
{
"name": "/credentialSubject/degree/name",
"description": "University Degree Credential",
Expand Down Expand Up @@ -646,9 +646,9 @@ <h4>JSON Template Schema</h4>
</section>

<section>
<h4>JSON Card Output Schema</h4>
<h4>Card Output Schema</h4>
<p>
The output of a `json-card` template MUST be a JSON object that conforms to
The output of a `card` template MUST be a JSON object that conforms to
the following structure:
</p>

Expand Down Expand Up @@ -723,11 +723,11 @@ <h4>JSON Card Output Schema</h4>
</table>

<p>
The following example shows a valid `json-card` output:
The following example shows a valid `card` output:
</p>

<pre class="example nohighlight"
title="Example json-card output">
title="Example card output">
{
"name": "Bachelor of Science and Arts",
"description": "University Degree Credential",
Expand Down Expand Up @@ -760,7 +760,7 @@ <h4>JSON Card Output Schema</h4>
<section>
<h4>Template Processing</h4>
<p>
When processing a `json-card` template, the following steps MUST be
When processing a `card` template, the following steps MUST be
performed:
</p>

Expand Down Expand Up @@ -795,7 +795,7 @@ <h4>Template Processing</h4>
</ol>
</li>
<li>
Validate the resulting JSON object against the `json-card` output schema. If
Validate the resulting JSON object against the `card` output schema. If
validation fails, processing MUST stop and an error MUST be returned.
</li>
</ol>
Expand All @@ -814,12 +814,12 @@ <h4>Template Processing</h4>
</p>

<pre class="example nohighlight"
title="Basic usage of the json-card render suite">
title="Basic usage of the card render suite">
{
<span class="comment">...</span>
"renderMethod": {
"type": "TemplateRenderMethod",
"renderSuite": "json-card",
"renderSuite": "card",
<span class="comment">// the JSON template is embedded in the VC</span>
"template": "data:application/json;base64,eyJuYW1lIjogIi9jcmVkZW50aWFsU3ViamVjdC9kZWdyZWUvbmFtZSIsICJkZXNjcmlwdGlvbiI6ICJVbml2ZXJzaXR5IERlZ3JlZSBDcmVkZW50aWFsIiwgImZpZWxkcyI6IFt7ImxhYmVsIjogIkluc3RpdHV0aW9uIiwgInZhbHVlIjogIi9pc3N1ZXIifV19"
}
Expand All @@ -832,12 +832,12 @@ <h4>Template Processing</h4>
</p>

<pre class="example nohighlight"
title="A remotely hosted JSON template for a json-card render template">
title="A remotely hosted JSON template for a card render template">
{
<span class="comment">...</span>
"renderMethod": {
"type": "TemplateRenderMethod",
"renderSuite": "json-card",
"renderSuite": "card",
"template": {
<span class="comment">// this JSON template is fetched from the Web</span>
"id": "https://degree.example/credential-templates/bachelors.json",
Expand All @@ -853,15 +853,15 @@ <h4>Template Processing</h4>
</p>

<pre class="example nohighlight"
title="A remotely hosted json-card render method">
title="A remotely hosted card render method">
{
<span class="comment">...</span>
"renderMethod": {
<span class="comment">// this render method is fetched from the Web</span>
"id": "https://degrees.example/bachelors-json-card.jsonld",
"id": "https://degrees.example/bachelors-card.jsonld",
"mediaType": "application/ld+json",
"type": "TemplateRenderMethod",
"renderSuite": "json-card",
"renderSuite": "card",
"digestMultibase": "zQmG270iEu5h6JqWAPdhyxz2dRerWC85Wg6wFl9znFCwYxAp"
}
</pre>
Expand Down
110 changes: 110 additions & 0 deletions threat-model/diagrams/dfd.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
%% Data Flow Diagram — W3C Verifiable Credentials Render Method Threat Model
%% Reused vc-data-model components are grayed with identifiers removed;
%% Render Method components are colored and carry active identifiers.
%% E = External Entity (blue rectangle) P = Process (green rounded rect)
%% F = Data Flow (labelled arrow) S = Data Store (pink cylinder)
%% O = Data Object (mauve trapezoid) C = Contained System (dashed box)
flowchart LR

%% ---------- Issuer System (C1) ----------
subgraph C1["C1: Issuer System"]
direction TB
E1["E1: Issuer"]

%% -- reused context (grayed, unnumbered) --
GP1("Establish Confidence")
GP2("Assemble Verifiable Credential")
GP3("Issue Verifiable Credential")
GP4("Publish Status List")
GP5("Update Status List")
GS1[("Status List Storage")]

%% -- new render-method components --
P1("P1: Publish Render Template")
P2("P2: Update Render Template")
O1[/"O1: Render Template"/]
S1[("S1: Render Template Storage")]

GP1 --> GP2
GP2 --> GP3
GP4 --> GS1
GP5 --> GS1
P1 --> O1
P2 --> O1
O1 --> S1
end

%% ---------- Holder System (C2) ----------
subgraph C2["C2: Holder System"]
direction TB
E2["E2: Holder"]

%% -- reused context (grayed, unnumbered) --
GP6("Store Verifiable Credential")
GP7("Engage in Workflow (Holder)")
GP8("Generate Presentation")
GS2[("Holder Storage")]

%% -- new render-method components --
P3("P3: Render")

GP6 --> GS2
GS2 --> GP8
GP7 --> GP8
end

%% ---------- Verifier System (C3) ----------
subgraph C3["C3: Verifier System"]
direction TB
E3["E3: Verifier"]

%% -- reused context (grayed, unnumbered) --
GP9("Engage in Workflow (Verifier)")
GP10("Verify Presentation")
GP11("Verify Credential Status")
GP12("Validate Credential(s)")

%% -- new render-method components --
%% Same logical Render process (P3) as in the Holder System.
P3v("P3: Render")

GP9 --> GP10
GP10 --> GP11
GP11 --> GP12
end

%% ---------- Force C1 -> C2 -> C3 left-to-right ordering ----------
C1 ~~~ C2
C2 ~~~ C3

%% ---------- Reused cross-boundary flows (grayed, unnumbered) ----------
GP7 -. "Establish Confidence in Subject" .-> GP1
GP3 -. "Deliver Verifiable Credential" .-> GP6
GP8 -. "Exchange Presentation" .-> GP9
GP11 -. "Check Credential Status" .-> GS1

%% ---------- New render-method Data Flows (labelled arrows) ----------
%% F1 retrieves the Render Template (O1) from storage into the Render process.
P3 -- "F1: Retrieve Render Template (O1)" --> S1
P3v -- "F1: Retrieve Render Template (O1)" --> S1
P3 -- "F2: Observe Rendering" --> E2
P3v -- "F2: Observe Rendering" --> E3

%% ---------- Element styling ----------
classDef entity fill:#c9daf8,stroke:#000,color:#000;
classDef process fill:#d9ead3,stroke:#000,color:#000,rx:10,ry:10;
classDef store fill:#f4cccc,stroke:#000,color:#000;
classDef object fill:#c27ba0,stroke:#000,color:#000;
classDef ctxProcess fill:#eeeeee,stroke:#999,color:#999,rx:10,ry:10;
classDef ctxStore fill:#eeeeee,stroke:#999,color:#999;

class E1,E2,E3 entity;
class P1,P2,P3,P3v process;
class S1 store;
class O1 object;
class GP1,GP2,GP3,GP4,GP5,GP6,GP7,GP8,GP9,GP10,GP11,GP12 ctxProcess;
class GS1,GS2 ctxStore;

style C1 fill:#fff0e5,stroke:#333,stroke-dasharray:6 4;
style C2 fill:#fff0e5,stroke:#333,stroke-dasharray:6 4;
style C3 fill:#fff0e5,stroke:#333,stroke-dasharray:6 4;
1 change: 1 addition & 0 deletions threat-model/diagrams/dfd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading