Skip to content

Commit

Permalink
Review changes (mostly stylistic)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wes Biggs committed Sep 17, 2024
1 parent 1691ec2 commit f23be50
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 41 deletions.
16 changes: 12 additions & 4 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ or [DSNP on GitHub](https://github.com/LibertyDSNP/spec)
* General words that aren't specific to DSNP are lowercase (i.e., announcement, batch, content hash).
* Attribute is lowercase except when combined with an announcement or a specific DSNP set type. (i.e., Attribute Set Announcement)

## Activity Content
Uppercase A and C

## announcement
Generally all lowercase

Expand Down Expand Up @@ -188,11 +191,13 @@ Uppercase U, A, S and A
## verifier
Lowercase v

## Verifiable Credential Document
Uppercase V, C and D
## Verifiable Credential
Uppercase V and C. Singular for one document/credential; plural when referring to the specification.
If followed by "document", that should be lowercase.

## Verifier Credential Schema Document
Uppercase V, C, S and D
## Verifiable Credential Schema
Uppercase V, C, S.
If followed by "document", that should be lowercase.

## Update Announcement
Uppercase U and A
Expand All @@ -208,3 +213,6 @@ All lowercase

## We/Us/Our
Should not be used in context with Frequency

## YES and no
When describing required items, use an all caps "YES", otherwise a lowercase "no".
2 changes: 1 addition & 1 deletion pages/ActivityContent/Associated/Attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ The Verifiable Credential found at the indicated URL must include the user's [DS
### Verifiable Credential Link

Attestation attachments must contain a link to a Verifiable Credential document.
The link must contain a relationship identifier in the form of a DSNP Attribute Set Type (the `rel` field), to allow applications to determine the type of credential expected.
The link must contain a relationship identifier in the form of a DSNP Attribute Set Type (the `rel` field) to allow applications to determine the type of credential expected.

| Property | Base Spec | Required | Description | Restrictions |
| --- | --- | --- | --- | --- |
Expand Down
26 changes: 13 additions & 13 deletions pages/DSNP/AttributeSets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Attribute set data may appear in several modes: it can be published as a DSNP An

## Data Model

The conceptual model for Attribute Sets includes three types of data:
The conceptual model for attribute sets includes three types of data:

1. A schema encoding rules for validating attribute set data. This MUST be in the form of a [DSNP Verifiable Credential Schema](../VerifiableCredentials/Types/VerifiableCredentialSchema.md) (a Verifiable Credential that contains a JSON Schema document).
1. A schema that encodes rules for validating attribute set data. This MUST be in the form of a [DSNP Verifiable Credential Schema](../VerifiableCredentials/Types/VerifiableCredentialSchema.md) (a Verifiable Credential that contains a JSON Schema document).
2. The attribute set data itself. This MUST be serialized as a [DSNP Verifiable Credential](../VerifiableCredentials/Types/VerifiableCredential.md).
3. A reference to the attribute set data, which may take one of several different forms depending on the desired usage pattern.

## Attribute Set Type

An Attribute Set Type is an identifier that is used to group Attribute Sets that share the same data structure and semantic meaning.
An Attribute Set Type is an identifier that is used to group attribute sets that share the same data structure and semantic meaning.
Attribute Set Types have a well known canonical name and (in most cases) a well defined schema, expressed using a Verifiable Credential Schema document.

### Versioning
Expand All @@ -31,10 +31,10 @@ This is facilitated by the following naming scheme.
Attribute Set Type canonical names are constructed as follows:

* MUST be in the format _attributeSetTypeNamespace_ + "`$`" + _attributeSetTypeName_, where _attributeSetTypeNamespace_ MUST be either a multihash content hash (encoded as a multibase string), the DSNP DID of the schema author (beginning with "`did:dsnp:`"), or the empty string (for schemaless attribute set types).
* _attributeSetTypeName_ MUST match a declared type value in the Verifiable Credential document
* If _attributeSetTypeNamespace_ is a DID, it must match the issuer of the Verifiable Credential Schema document referenced from the credential document, and the schema document must include a proof that can be verified using the issuer's public key.
* _attributeSetTypeName_ MUST match a declared type value in the Verifiable Credential document.
* If _attributeSetTypeNamespace_ is a DID, it MUST match the issuer of the Verifiable Credential Schema document referenced from the credential document, and the schema document MUST include a proof that can be verified using the issuer's public key.
* If _attributeSetTypeNamespace_ is empty, the credential document MUST NOT reference a schema.
* If _attributeSetTypeNamespace_ is a multibase string, it must match the multihash content hash of the schema file referenced from the credential document.
* If _attributeSetTypeNamespace_ is a multibase string, it MUST match the multihash content hash of the schema file referenced from the credential document.

Examples:

Expand All @@ -46,13 +46,13 @@ Examples:

### Attribute Set Announcements

The Announcement model allows Attribute Sets to be consumed as events providing context or metadata to the social network.
The Announcement model allows attribute sets to be consumed as events providing context or metadata to the social network.
Attribute Set Announcements allow DSNP Users to associate data or make assertions about their own account, other DSNP Users, content on DSNP, or even content external to DSNP.
Credential documents are anchored to the announcement by the `url` and `hash` fields.

Applications consuming these Announcements can index and use the associated Attribute Sets to inform their user experience.
For example, a fact-checking organization can publish Attribute Set announcements to flag content it deems to be misinformation, and interested applications that trust the organization's determinations can provide warning labels on social media posts.
Similarly, an organization might attach metadata in the form of Attribute Sets to denote DSNP User Ids that are operated by government actors.
Applications consuming these announcements can index and use the associated attribute sets to inform their user experience.
For example, a fact-checking organization can publish Attribute Set Announcements to flag content it deems to be misinformation, and interested applications that trust the organization's determinations can provide warning labels on social media posts.
Similarly, an organization might attach metadata in the form of attribute sets to denote DSNP User Ids that are operated by government actors.

Attribute Set Announcements cannot be updated once published, but can be tombstoned.
Applications MUST treat tombstoned Attribute Set Announcements as nonexistent.
Expand All @@ -69,7 +69,7 @@ Attribute Set announcements are expressed using three announcement types, depend

### Attestation Attachments

Attribute Sets associated with and controlled by a DSNP User can be referenced as [Attestation Attachments](../ActivityContent/Associated/Attachments.md#attestation) to a user's [Profile](./Types/Profile.md) document, or to an Activity Content Note object that is referenced from a Broadcast or Reply announcement.
Attribute sets associated with and controlled by a DSNP User can be referenced as [Attestation Attachments](../ActivityContent/Associated/Attachments.md#attestation) to a user's [Profile](./Types/Profile.md) document, or to an Activity Content Note object that is referenced from a Broadcast or Reply announcement.

Profile-linked attestations are necessary in cases where an attestation is required in order for a consumer to verify chains of trust designated by schema controllers, such as an accreditation that gives the organization represented by the DSNP User Id the authority to issue credentials to others.

Expand All @@ -91,7 +91,7 @@ Both Verifiable Credential Schema documents and Verifiable Credential documents
DSNP Users may control one or more key pairs for use in signing these documents and make these discoverable using the `assertionMethod` User Data type.
A key announced in this fashion can be referenced within the proof using a [DSNP DID](../VerifiableCredentials/Types/DID.md) with a key identifier, as in `did:dsnp:123456#key1`.

A verifier must ensure that the DSNP User Id referenced this way (that is, the substring of the DID before the first `#` character) is the same as the issuer field.
A verifier MUST ensure that the DSNP User Id referenced this way (that is, the substring of the DID before the first `#` character) is the same as the issuer field.

Following the principle of least privilege, the key pair used to issue credentials SHOULD be different from any control keys used to authenticate transactions.

Expand All @@ -100,7 +100,7 @@ Following the principle of least privilege, the key pair used to issue credentia
Trust in an attribute set may be assigned based on a combination of its Attribute Set Type and issuer.
It is left to each application that acts as a DSNP consumer to determine which attribute sets it will trust.

Trust MUST be accompanied by verification of the documents linked to an Attribute Set reference.
Trust MUST be accompanied by verification of the documents linked to an attribute set reference.

### Summary of Verification Responsibilities

Expand Down
8 changes: 4 additions & 4 deletions pages/DSNP/Types/DSNPContentAttributeSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ A DSNP Content Attribute Set Announcement is a way to create an authenticated (a
| Field | Description | Data Type | Serialization | Parquet Type | Bloom Filter |
| ----- | ----------- | --------- | ------------- | ------------ | ------------ |
| announcementType | Announcement Type Enum (`9`) | enum | [decimal](../Serializations.md#decimal) | `INT32` | no |
| fromId | id of the user creating the Announcement | 64 bit unsigned integer | [decimal](../Serializations.md#decimal) | `UINT_64` | YES |
| fromId | Id of the user creating the announcement | 64 bit unsigned integer | [decimal](../Serializations.md#decimal) | `UINT_64` | YES |
| subject | DSNP Content URI of the attribute set subject | [DSNP Content URI](../Identifiers.md#dsnp-content-uri) | `UTF-8` | `UTF8` | YES |
| url | URL for the Verifiable Credential Document | `UTF-8` | `UTF-8` | `UTF8` | no |
| url | URL for the Verifiable Credential document | `UTF-8` | `UTF-8` | `UTF8` | no |
| contentHash | [DSNP Content Hash](../Identifiers.md#dsnp-content-hash) of content | UTF-8 | [base32 multibase](../Serializations.md#base32-multibase) | `UTF8` | YES |
| attributeSetType | Canonical name of attribute set type | `UTF-8` | `UTF-8` | `UTF8` | YES |
| attributeSetType | Canonical name of Attribute Set Type | `UTF-8` | `UTF-8` | `UTF8` | YES |
| issuer | URI of issuer | `UTF-8` | `UTF-8` | `UTF8` | YES |

## Field Requirements
Expand All @@ -23,7 +23,7 @@ A DSNP Content Attribute Set Announcement is a way to create an authenticated (a
### fromId

- MUST be a [DSNP User Id](../Identifiers.md#dsnp-user-id)
- MUST have authorized the creation of the Announcement, either directly or via a transparent chain of delegation
- MUST have authorized the creation of the announcement, either directly or via a transparent chain of delegation

### subject

Expand Down
6 changes: 3 additions & 3 deletions pages/DSNP/Types/ExternalContentAttributeSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ An External Content Attribute Set Announcement is a way to create an authenticat
| Field | Description | Data Type | Serialization | Parquet Type | Bloom Filter |
| ----- | ----------- | --------- | ------------- | ------------ | ------------ |
| announcementType | Announcement Type Enum (`10`) | enum | [decimal](../Serializations.md#decimal) | `INT32` | no |
| fromId | id of the user creating the Announcement | 64 bit unsigned integer | [decimal](../Serializations.md#decimal) | `UINT_64` | YES |
| fromId | Id of the user creating the announcement | 64 bit unsigned integer | [decimal](../Serializations.md#decimal) | `UINT_64` | YES |
| subject | URL of the external content | URL | `UTF-8` | `UTF8` | no |
| subjectContentHash | [DSNP Content Hash](../Identifiers.md#dsnp-content-hash) of content at `subject` | UTF-8 | [base32 multibase](../Serializations.md#base32-multibase) | `UTF8` | YES |
| url | URL for the Verifiable Credential document | `UTF-8` | `UTF-8` | `UTF8` | YES |
| contentHash | [DSNP Content Hash](../Identifiers.md#dsnp-content-hash) of content at `url` | UTF-8 | [base32 multibase](../Serializations.md#base32-multibase) | `UTF8` | YES |
| attributeSetType | Canonical name of attribute set type | `UTF-8` | `UTF-8` | `UTF8` | YES |
| attributeSetType | Canonical name of Attribute Set Type | `UTF-8` | `UTF-8` | `UTF8` | YES |
| issuer | URI of issuer | `UTF-8` | `UTF-8` | `UTF8` | YES |

## Field Requirements
Expand All @@ -24,7 +24,7 @@ An External Content Attribute Set Announcement is a way to create an authenticat
### fromId

- MUST be a [DSNP User Id](../Identifiers.md#dsnp-user-id)
- MUST have authorized the creation of the Announcement, either directly or via a transparent chain of delegation
- MUST have authorized the creation of the announcement, either directly or via a transparent chain of delegation

### subject

Expand Down
8 changes: 4 additions & 4 deletions pages/DSNP/Types/UserAttributeSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ A User Attribute Set Announcement is a way to create an authenticated (and, opti
| Field | Description | Data Type | Serialization | Parquet Type | Bloom Filter |
| ----- | ----------- | --------- | ------------- | ------------ | ------------ |
| announcementType | Announcement Type Enum (`8`) | enum | [decimal](../Serializations.md#decimal) | `INT32` | no |
| fromId | id of the user creating the Announcement | 64 bit unsigned integer | [decimal](../Serializations.md#decimal) | `UINT_64` | YES |
| fromId | Id of the user creating the announcement | 64 bit unsigned integer | [decimal](../Serializations.md#decimal) | `UINT_64` | YES |
| subject | DSNP User Id of the attribute set subject | 64 bit unsigned integer | decimal | `UINT_64` | YES |
| url | URL for the Verifiable Credential Document (optional) | `UTF-8` | `UTF-8` | `UTF8` | no |
| url | URL for the Verifiable Credential document | `UTF-8` | `UTF-8` | `UTF8` | no |
| contentHash | [DSNP Content Hash](../Identifiers.md#dsnp-content-hash) of content | UTF-8 | [base32 multibase](../Serializations.md#base32-multibase) | `UTF8` | YES |
| attributeSetType | Canonical name of attribute set type | `UTF-8` | `UTF-8` | `UTF8` | YES |
| attributeSetType | Canonical name of Attribute Set Type | `UTF-8` | `UTF-8` | `UTF8` | YES |
| issuer | URI of issuer | `UTF-8` | `UTF-8` | `UTF8` | YES |

## Field Requirements
Expand All @@ -23,7 +23,7 @@ A User Attribute Set Announcement is a way to create an authenticated (and, opti
### fromId

- MUST be a [DSNP User Id](../Identifiers.md#dsnp-user-id)
- MUST have authorized the creation of the Announcement, either directly or via a transparent chain of delegation
- MUST have authorized the creation of the announcement, either directly or via a transparent chain of delegation

### subject

Expand Down
14 changes: 7 additions & 7 deletions pages/VerifiableCredentials/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Therefore, compatibility with the following versions and specifications should b
Current usage with DSNP relies on the following specifications:

| Specification | Version/Status | Relevant JSON-LD `@context` Values |
| --- | --- | --- |
| Verifiable Credentials Data Model | [1.1 (W3C Recommendation)](https://www.w3.org/TR/vc-data-model-1.1)<br>[2.0 (W3C Candidate Recommendation Draft 23 August 2024)](https://www.w3.org/TR/2024/CRD-vc-data-model-2.0-20240823/) | `https://www.w3.org/2018/credentials/v1`<br>`https://www.w3.org/ns/credentials/v2` |
| Verifiable Credential Data Integrity | [1.0 (W3C Candidate Recommendation Draft 3 August 2024)](https://www.w3.org/TR/2024/CRD-vc-data-integrity-20240803/) | `https://w3id.org/security/data-integrity/v2` |
| Verifiable Credentials JSON Schema | [(W3C Candidate Recommendation Draft 18 December 2023)](https://www.w3.org/TR/2023/CRD-vc-json-schema-20231218/) | |
| --- | --- | --- |
| Verifiable Credentials Data Model | [1.1 (W3C Recommendation)](https://www.w3.org/TR/vc-data-model-1.1)<br>[2.0 (W3C Candidate Recommendation Draft 15 September 2024)](https://www.w3.org/TR/2024/CRD-vc-data-model-2.0-20240915/) | `https://www.w3.org/2018/credentials/v1`<br>`https://www.w3.org/ns/credentials/v2` |
| Verifiable Credential Data Integrity | [1.0 (W3C Candidate Recommendation Draft 16 September 2024)](https://www.w3.org/TR/2024/CRD-vc-data-integrity-20240916/) | `https://w3id.org/security/data-integrity/v2`<br>`https://w3id.org/security/multikey/v1` |
| Verifiable Credentials JSON Schema | [(W3C Candidate Recommendation Draft 12 September 2024)](https://www.w3.org/TR/2023/CRD-vc-json-schema-20240912/) | |
| Decentralized Identifiers (DIDs) | [1.0 (W3C Recommendation 19 July 2022)](https://www.w3.org/TR/2022/REC-did-core-20220719/) | `https://www.w3.org/ns/did/v1` |

### Cryptography
Expand All @@ -26,7 +26,7 @@ DSNP compliant applications MUST support the following cryptosuites, which corre

| Specification | Version/Status | Multikey codec |
| --- | --- | --- |
| Data Integrity EdDSA Cryptosuites | [1.0 (W3C Candidate Recommendation Draft 16 August 2024)](https://www.w3.org/TR/2024/CRD-vc-di-eddsa-20240816/) | `ed25519-pub` |
| Data Integrity EdDSA Cryptosuites | [1.0 (W3C Candidate Recommendation Draft 16 September 2024)](https://www.w3.org/TR/2024/CRD-vc-di-eddsa-20240924/) | `ed25519-pub` |


## DSNP Usage Details
Expand Down Expand Up @@ -61,12 +61,12 @@ See the individual pages for details of restrictions to and extensions on each t

## Non-Normative

## Additional Fields
### Additional Fields

DSNP application developers may choose to support more of the relevant JSON-LD vocabularies from the specifications above as long as doing so does not conflict with this specification, but should note that other conforming applications may not recognize those additions.
Implementers who extend their support for Verifiable Credentials objects beyond the subset defined here do so at their own risk.

## Verifiable Presentations
### Verifiable Presentations

[Verifiable Presentations](https://www.w3.org/TR/2024/CRD-vc-data-model-2.0-20240823/#verifiable-presentations) combine one or more Verifiable Credentials in a single document.
These might be existing Verifiable Credentials, whether or not previously published, or new Verifiable Credentials derived from non-public source credentials using methods like zero-knowledge proofs.
Expand Down
8 changes: 4 additions & 4 deletions pages/VerifiableCredentials/Types/DID.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ A DSNP DID document is a JSON-LD document representing key material associated w
| --- | --- | --- | --- | --- |
| `@context` | YES | Array of strings | JSON-LD @context | MUST include `"https://www.w3.org/ns/did/v1"` |
| `id` | YES | String | The DID described by this document | MUST be of the form `did:dsnp:{userId}` |
| `verificationMethod` | NO | Array of Verification Method objects | Set of public keys that may be referenced from `assertionMethod`, `authentication`, and `keyAgreement` arrays |
| `assertionMethod` | NO | Array | Set of public keys used to generate digital signatures | MUST include or reference all relevant keys present in DSNP User Data `assertionMethodPublicKeys` |
| `authentication` | NO | Array | Set of public keys used as DSNP control keys | MAY include or reference any keys used as control keys |
| `keyAgreement` | NO | Array | Set of public keys used to generate shared secrets | MUST include or reference all relevant keys present in DSNP User Data `keyAgreementPublicKeys` |
| `verificationMethod` | no | Array of Verification Method objects | Set of public keys that may be referenced from `assertionMethod`, `authentication`, and `keyAgreement` arrays |
| `assertionMethod` | no | Array | Set of public keys used to generate digital signatures | MUST include or reference all relevant keys present in DSNP User Data `assertionMethodPublicKeys` |
| `authentication` | no | Array | Set of public keys used as DSNP control keys | MAY include or reference any keys used as control keys |
| `keyAgreement` | no | Array | Set of public keys used to generate shared secrets | MUST include or reference all relevant keys present in DSNP User Data `keyAgreementPublicKeys` |

Additional properties defined in the DID specification MAY be present.

Expand Down
Loading

0 comments on commit f23be50

Please sign in to comment.