You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,33 +53,33 @@ description: "Document formats for Open Badges 3.0 credentials"
53
53
}
54
54
```
55
55
56
-
## File Format
56
+
###File Format
57
57
58
58
If the credential is signed using the [[[#jwt-proof]]] (VC-JWT) the contents of the file MUST be the [=Compact JWS=] string formed as a result of signing the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) with VC-JWT. The file extension SHOULD be ".jws" or ".jwt".
59
59
60
60
If an embedded proof method is used instead, the contents of the file MUST be the JSON representation of the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class). The file extension SHOULD be ".json".
61
61
62
-
## Web Resource
62
+
###Web Resource
63
63
64
64
If the credential is signed using the [[[#jwt-proof]]] (VC-JWT) the contents of the response MUST be the [=Compact JWS=] string formed as a result of signing the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) with VC-JWT. The `Content-Type` SHOULD be `text/plain`.
65
65
66
66
If an embedded proof method is used instead, the contents of the response MUST be the JSON representation of the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class). The `Content-Type` SHOULD be `application/vc+ld+json`, although generic representations such `application/ld+json` or `application/json` are also allowed.
67
67
68
-
## Baked Badge
68
+
###Baked Badge
69
69
70
70
OpenBadgeCredentials may be exchanged as image files with the credential encoded (baked) within. This allows the credential to be portable wherever image files may be stored or displayed.
71
71
72
72
"Baking" is the process of taking an [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) and embedding it into the image, so that when a user displays the image on a page, software that is Open Badges aware can automatically extract that OpenBadgeCredential data and perform the checks necessary to see if a person legitimately earned the achievement within the image. The image MUST be in either PNG [[PNG]] or SVG [[SVG11]] format in order to support baking.
73
73
74
-
### PNG
74
+
####PNG
75
75
76
-
#### Baking {#png-baking}
76
+
#####Baking {#png-baking}
77
77
78
78
An [`iTXt`](http://www.w3.org/TR/PNG/#11iTXt) chunk should be inserted into the PNG with **keyword**`openbadgecredential`.
79
79
80
80
If the credential is signed using the [[[#jwt-proof]]] (VC-JWT) the text value of the chunk MUST be the [=Compact JWS=] string formed as a result of signing the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) with VC-JWT. Compression MUST NOT be used.
81
81
82
-
##### Example: An example of creating a chunk with VC-JWT proof (assuming an iTXt constructor)
82
+
######Example: An example of creating a chunk with VC-JWT proof (assuming an iTXt constructor)
83
83
84
84
```js
85
85
var chunk =newiTXt({
@@ -94,7 +94,7 @@ If the credential is signed using the [[[#jwt-proof]]] (VC-JWT) the text value o
94
94
95
95
If an embedded proof method is used instead, the text value of the chunk MUST be the JSON representation of the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class). Compression MUST NOT be used.
96
96
97
-
##### Example: An example of creating a chunk with embedded proof (assuming an iTXt constructor)
97
+
######Example: An example of creating a chunk with embedded proof (assuming an iTXt constructor)
98
98
99
99
```js
100
100
var chunk =newiTXt({
@@ -126,19 +126,19 @@ If an embedded proof method is used instead, the text value of the chunk MUST be
126
126
127
127
An iTXt chunk with the keyword `openbadgecredential` MUST NOT appear in a PNG more than once. When baking an image that already contains credential data, the implementer may choose whether to pass the user an error or overwrite the existing chunk.
128
128
129
-
#### Extracting {#png-extracting}
129
+
#####Extracting {#png-extracting}
130
130
131
131
Parse the PNG datastream until the first [`iTXt`](http://www.w3.org/TR/PNG/#11iTXt) chunk is found with the keyword `openbadgecredential`. The rest of the stream can be safely discarded. The text portion of the iTXt will either be the JSON representation of a [[[#achievement-credential]]] or the [=Compact JWS=] string that was the result of signing the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) with [[[#jwt-proof]]].
132
132
133
-
### SVG
133
+
####SVG
134
134
135
-
#### Baking {#svg-baking}
135
+
#####Baking {#svg-baking}
136
136
137
137
First, add an `xmlns:openbadges` attribute to the `<svg>` tag with the value "https://purl.imsglobal.org/ob/v3p0". Directly after the `<svg>` tag, add an `<openbadges:credential>` tag.
138
138
139
139
If the credential is signed using the [[[#jwt-proof]]] (VC-JWT) add a `verify` attribute to the `<openbadges:credential>` tag. The value of `verify` attribute MUST be the [=Compact JWS=] string formed as a result of signing the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) with VC-JWT.
140
140
141
-
##### Example: An example of a well baked SVG with VC-JWT proof
141
+
######Example: An example of a well baked SVG with VC-JWT proof
142
142
143
143
```xml
144
144
<?xml version="1.0" encoding="UTF-8"?>
@@ -153,7 +153,7 @@ If the credential is signed using the [[[#jwt-proof]]] (VC-JWT) add a `verify` a
153
153
154
154
If an embedded proof method is used instead, omit the `verify` attribute, and the JSON representation of the [OpenBadgeCredential](#org.1edtech.ob.v3p0.achievementcredential.class) MUST go into the body of the tag, wrapped in `<![CDATA[...]]>`.
155
155
156
-
##### Example: An example of a well baked SVG with embedded proof
156
+
######Example: An example of a well baked SVG with embedded proof
157
157
158
158
```xml
159
159
<?xml version="1.0" encoding="UTF-8"?>
@@ -189,6 +189,6 @@ If an embedded proof method is used instead, omit the `verify` attribute, and th
189
189
190
190
There MUST be only one `<openbadges:credential>` tag in an SVG. When baking an image that already contains OpenBadgeCredential data, the implementer may choose whether to pass the user an error or overwrite the existing tag.
191
191
192
-
#### Extracting
192
+
#####Extracting
193
193
194
194
Parse the SVG until you reach the first `<openbadges:credential>` tag. The rest of the SVG data can safely be discarded.
Copy file name to clipboardExpand all lines: ob_v3p0/microsites/v3p0/spec/equality-and-comparison.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,13 @@ A Host SHOULD treat a credential as the same as another when both the [issuer](#
15
15
16
16
If the two credentials are equal according to the above, then the credential with the newer `validFrom` is the more up-to-date representation and could be interpreted as a replacement of the prior issued credential.
17
17
18
-
## Examples
18
+
###Examples
19
19
20
-
### Equality
20
+
####Equality
21
21
22
22
Credentials [A](#example-sample-credential-a) and [B](#example-sample-credential-b) are equal since they have the same [`id`](#achievement-credential) and the same [`issuer.id`](#org.1edtech.ob.v3p0.profile.class).
@@ -95,11 +95,11 @@ Credentials [A](#example-sample-credential-a) and [B](#example-sample-credential
95
95
96
96
Since they also have the same `validFrom` both are up-to-date.
97
97
98
-
### Comparison
98
+
####Comparison
99
99
100
100
Credentials [C](#example-sample-credential-c) and [D](#example-sample-credential-d) are equal since they have the same [`id`](#achievement-credential) and the same [`issuer.id`](#org.1edtech.ob.v3p0.profile.class).
Copy file name to clipboardExpand all lines: ob_v3p0/microsites/v3p0/spec/integrity.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ description: "Data integrity proofs and signatures for Open Badges 3.0"
11
11
12
12
This section describes mechanisms for ensuring the authenticity and integrity of OpenBadgeCredentials. At least one proof mechanism, and the details necessary to evaluate that proof, MUST be expressed for a [=credential=] to be a [=verifiable credential=]; that is, to be [=verifiable=]. In order to pass 1EdTech conformance tests, issuers MUST use a proof mechanism supported by the 1EdTech conformance test suite. See more about [Selecting proof methods and crypto algorithms](impl#selecting-proof-methods-and-crypto-algorithms) in the Implementation Guide.
13
13
14
-
## Proof Formats
14
+
###Proof Formats
15
15
16
16
The proof formats included in this specification fall into two categories:
17
17
@@ -22,14 +22,14 @@ The proof formats included in this specification fall into two categories:
22
22
23
23
A third category of proof format called Non-Signature Proof is not covered by this specification. This category includes proofs such as proof of work.
24
24
25
-
## JSON Web Token Proof Format {#jwt-proof}
25
+
###JSON Web Token Proof Format {#jwt-proof}
26
26
27
27
This proof format relies on the well established JWT (JSON Web Token) [[RFC7519]] and JWS (JSON Web Signature) [[RFC7515]] specifications. A JSON Web Token Proof is a JWT signed and encoded as a [=Compact JWS=] string. The proof format is described in detail in [[VC-JOSE-COSE]], referred from Section 5.13 "Securing Mechanism Specifications" of [[VC-DATA-MODEL-2.0]]. That description allows several options which may inhibit interoperability. This specification limits the options while maintaining compatibility with [[VC-DATA-MODEL-2.0]] to help ensure interoperability.
28
28
29
29
> **Note**: At the time of the completion of this specification, the JSON Web Token Proof Format of [[VC-DATA-MODEL-2.0]] was undergoing a revision process. [[VC-JOSE-COSE]] will collect and display
30
30
> the result of this revision. The modifications resulting from the incompatibility of the revision with what is contained in this document will be added in future revisions.
31
31
32
-
### Terminology {#jwt-terminology}
32
+
####Terminology {#jwt-terminology}
33
33
34
34
Some of the terms used in this section include:
35
35
@@ -45,7 +45,7 @@ JWK
45
45
Compact JWS
46
46
: "A compact representation of a JWS." [[RFC7515]]
47
47
48
-
### Overview {#jwt-overview}
48
+
####Overview {#jwt-overview}
49
49
50
50
A [=JWS=] is a signed [=JWT=] with three parts separated by period (".") characters. Each part contains a base64url-encoded value.
51
51
@@ -69,7 +69,7 @@ The resulting [=JWS=] proves that the [=issuer=] signed the [=JWT Payload=] turn
69
69
70
70
When using the JSON Web Token Proof Format, the `proof` property MAY be omitted from the [OpenBadgeCredential](#achievement-credential). If a Linked Data Proof is also provided, it MUST be created before the JSON Web Token Proof Format is created.
71
71
72
-
### Create the JOSE Header {#joseheader}
72
+
####Create the JOSE Header {#joseheader}
73
73
74
74
The [=JOSE Header=] is a JSON object with the following properties (also called JOSE Headers). Additional JOSE Headers are NOT allowed.
75
75
@@ -80,7 +80,7 @@ The [=JOSE Header=] is a JSON object with the following properties (also called
80
80
|`jwk`|[JWK](#jwk)| A JWK representing the public key used to verify the signature. If you do not include a `jwk` property in the header, you MUST include the `kid` property. <divclass="advisement">Be careful not to accidentally expose the JWK representation of a private key. See [RFC7517](https://tools.ietf.org/html/rfc7517#appendix-A.2) for examples of private key representations. The `JWK` MUST never contain `"d"`.</div> | Optional |
81
81
|`typ`|[String](#string)| If present, MUST be set to "JWT". | Optional |
82
82
83
-
#### Example: Sample JOSE Header with reference to a public key in a JWKS
83
+
#####Example: Sample JOSE Header with reference to a public key in a JWKS
84
84
85
85
```json
86
86
{
@@ -90,11 +90,11 @@ The [=JOSE Header=] is a JSON object with the following properties (also called
90
90
}
91
91
```
92
92
93
-
### Create the JWT Payload
93
+
####Create the JWT Payload
94
94
95
95
If you are going to use both external and embedded proof formats, add the embedded proofs prior to creating the JWT Payload.
96
96
97
-
#### JWT Payload Format
97
+
#####JWT Payload Format
98
98
99
99
The JWT Payload is the JSON object of the [OpenBadgeCredential](#achievement-credential) with the following properties (JWT Claims). Additional standard JWT Claims Names are allowed, but their relationship to the credential is not defined.
100
100
@@ -106,7 +106,7 @@ The JWT Payload is the JSON object of the [OpenBadgeCredential](#achievement-cre
106
106
|`nbf`|[NumericDate](#numericdate)| The `validFrom` property of the OpenBadgeCredential. | Required |
107
107
|`sub`|[URI](#uri)| The `credentialSubject.id` property of the OpenBadgeCredential. | Required |
108
108
109
-
### Create the Proof {#jwt-signing}
109
+
####Create the Proof {#jwt-signing}
110
110
111
111
> **Note**: 1EdTech strongly recommends using an existing, stable library for this step.
112
112
@@ -131,7 +131,7 @@ The steps to sign and encode the credential as a Compact JWS are shown below:
131
131
132
132
The resulting string is the Compact JWS representation of the credential. The Compact JWS includes the credential AND acts as the proof for the credential.
133
133
134
-
### Verify a Credential {#jwt-verify}
134
+
####Verify a Credential {#jwt-verify}
135
135
136
136
Verifiers that receive a OpenBadgeCredential in Compact JWS format MUST perform the following steps to verify the embedded credential.
137
137
@@ -149,7 +149,7 @@ Verifiers that receive a OpenBadgeCredential in Compact JWS format MUST perform
149
149
> contents of the `vc` claim must be converted to an <ahref="#achievement-credential">OpenBadgeCredential</a>
150
150
> and continue with [[[#jwt-verify-credential]]].
151
151
152
-
#### Verify a Credential VC-JWT Signature {#jwt-verify-credential}
152
+
#####Verify a Credential VC-JWT Signature {#jwt-verify-credential}
153
153
154
154
- The JSON object MUST have the `iss` claim, and the value MUST match the `issuer.id` of the [OpenBadgeCredential](#achievement-credential) object. If they do not match, the credential is not valid.
155
155
- The JSON object MUST have the `sub` claim, and the value MUST match the `credentialSubject.id` of the [OpenBadgeCredential](#achievement-credential) object. If they do not match, the credential is not valid.
@@ -159,28 +159,28 @@ Verifiers that receive a OpenBadgeCredential in Compact JWS format MUST perform
159
159
160
160
> **Note**: Credentials created following [[VC-DATA-MODEL-1.1]] have different names for attributes used in this process. Concretely, they have `issuanceDate` and `expirationDate` instead of `validFrom` and `validUntil`, respectively
161
161
162
-
## Linked Data Proof Format {#lds-proof}
162
+
###Linked Data Proof Format {#lds-proof}
163
163
164
164
This standard supports the Linked Data Proof format. In order to pass conformance tests for this format issuers MUST use an option supported by the 1EdTech conformance test suite, which is currently limited to the [[VC-DI-EDDSA]] suite.
165
165
166
166
> **Note**: Whenever possible, you should use a library or service to create and verify a Linked Data Proof.
167
167
168
-
### Create the Proof
168
+
####Create the Proof
169
169
170
170
Attach a Linked Data Proof to the credential, for example by following these steps to use a proof with the [[VC-DI-EDDSA]] suite:
171
171
172
172
1. Create an instance of [Multikey](#multikey) as shown in [Section 2.1.1 DataIntegrityProof](https://www.w3.org/TR/vc-di-eddsa/#multikey) of [[VC-DI-EDDSA]].
173
173
1. Using the key material, sign the credential object as shown in [Section 7.1 Proof Algorithm](https://w3c-ccg.github.io/data-integrity-spec/#proof-algorithm) of [[DATA-INTEGRITY-SPEC]] to produce a [Proof](#proof) as shown in [Section 2.2.1 DataIntegrityProof](https://www.w3.org/TR/vc-di-eddsa/#dataintegrityproof) of [[VC-DI-EDDSA]] with a `proofPurpose` of "assertionMethod".
174
174
1. Add the resulting proof object to the credential `proof` property.
175
175
176
-
### Verify an OpenBadgeCredential Linked Data Signature {#lds-verify}
176
+
####Verify an OpenBadgeCredential Linked Data Signature {#lds-verify}
177
177
178
178
Verify the Linked Data Proof signature as shown in [Section 7.2 Proof Verification Algorithm](https://w3c-ccg.github.io/data-integrity-spec/#proof-verification-algorithm) of [[DATA-INTEGRITY-SPEC]].
179
179
180
-
## Key Management
180
+
###Key Management
181
181
182
182
[=Issuers=] will need to manage asymmetric keys. The mechanisms by which keys are minted and distributed is outside the scope of this specification. See Section 6. Key Management of the [[SEC-11]].
183
183
184
-
## Dereferencing the Public Key {#dereference}
184
+
###Dereferencing the Public Key {#dereference}
185
185
186
186
All the proof formats in this specification, and all Digital Integrity proofs in general, require the [=verifier=] to "dereference" the public key from a URI. Dereferencing means using the URI to get the public key in [JWK](#jwk) format. This specification allows the use of an HTTP URL (e.g. `https://1edtech.org/keys/1`) or a DID URL (e.g. `did:key:123`), but only requires HTTP URL support.
0 commit comments