Skip to content

Commit

Permalink
Completed another pass to mark all major sections as norm/inform and … (
Browse files Browse the repository at this point in the history
#135)

* Completed another pass to mark all major sections as norm/inform and to locate any dangling normative statements

* fixed numbered normative statements that were missing keywords

---------

Signed-off-by: 2byrds <2byrds@gmail.com>
  • Loading branch information
2byrds authored Feb 9, 2024
1 parent 6362d8f commit 23e0da0
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 148 deletions.
14 changes: 14 additions & 0 deletions normcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Define normative keywords
keywords="MUST|MUST NOT|REQUIRED|SHALL|SHALL NOT|SHOULD|SHOULD NOT|RECOMMENDED|NOT RECOMMENDED|MAY|OPTIONAL"

# Iterate over all files in the spec directory
for file in $(find spec -type f); do
# Read the file line by line
while IFS= read -r line; do
# Check if the line contains a normative keyword and does not start with '1. ' (allowing whitespace prefixes)
echo "$line" | awk -v file="$file" -v keywords="$keywords" '( $0 ~ keywords ) && !( $0 ~ /^[[:space:]]*1. / ) {print "Missing line number: File: " file ", Line: " FNR ", Text: " $0}'
echo "$line" | awk -v file="$file" -v keywords="$keywords" '( $0 ~ /^[[:space:]]*[0-9]+. / ) && !( $0 ~ keywords ) {print "Missing keyword: File: " file ", Line: " FNR ", Text: " $0}'
done < "$file"
done
4 changes: 2 additions & 2 deletions spec/appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

[[def: verifiable identifier (VID), VID, VIDs]]
~ An identifier over which the controller can provide cryptographic proof of control.
See also: decentralized identifier, [ref: self-certifying identifier (SCID)].
See also: decentralized identifier, [[ref: self-certifying identifier (SCID)]].


### Terminology
Expand All @@ -43,7 +43,7 @@ See also: decentralized identifier, [ref: self-certifying identifier (SCID)].
~ A globally unique persistent identifier, as defined by [DID Core](https://www.w3.org/TR/did-core/#dfn-decentralized-identifiers).

[[def: designated aliases, designated alias]]
~ An array of [[ref:AID controlled identifiers]] that have been designated by the AID controller to be used as aliases for `equivalentId` and `alsoKnownAs` DID document metadata and to foster verification of redirection to different did:webs identifiers. See [WebOfTrust glossary](https://github.com/WebOfTrust/WOT-terms/wiki/designated-aliases) for more detail.
~ An array of [[ref: AID controlled identifiers]] that have been designated by the AID controller to be used as aliases for `equivalentId` and `alsoKnownAs` DID document metadata and to foster verification of redirection to different did:webs identifiers. See [WebOfTrust glossary](https://github.com/WebOfTrust/WOT-terms/wiki/designated-aliases) for more detail.

[[def: DID document, DID documents]]
~ A set of data describing the subject of a [[ref: DID]], as defined by [DID Core](https://www.w3.org/TR/did-core/#dfn-did-documents). See also section [DID Documents](#did-documents).
Expand Down
95 changes: 48 additions & 47 deletions spec/core.md

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions spec/did_metadata.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## DID Metadata
This section is normative.

This section describes the support of the `did:webs` method for metadata, including [[ref: DID resolution metadata]] and [[ref: DID document metadata]]. This metadata is returned by a DID Resolver in addition to the DID document. Also see the [DID Resolution](https://w3c-ccg.github.io/did-resolution/) specification for further details.

### DID Resolution Metadata

At the moment, this specification does not define the use of any specific [[ref:DID resolution metadata]] properties in the `did:webs` method, but may in the future include various metadata, such as which KERI Watchers were used during the resolution process.
At the moment, this specification does not define the use of any specific [[ref: DID resolution metadata]] properties in the `did:webs` method, but may in the future include various metadata, such as which KERI Watchers were used during the resolution process.

### DID Document Metadata

Expand All @@ -14,8 +15,8 @@ This section of the specification defines how various DID document metadata prop

The `versionId` DID document metadata property indicates the current version of the DID document that has been resolved.

1. `did:webs` versionId is defined to be the sequence number (i.e. the `s` field) of the last event in the [[ref: KERI event stream]] that was used to construct the DID document according to the rules in section [DID Document from KERI Events](#did-document-from-keri-events).
1. If the DID parameter `versionId` (see section [Support for `versionId`](#support-for-versionid)) was used when resolving the `did:webs` DID, and if the DID Resolution process was successful, then this corresponding DID document metadata property is guaranteed to be equal to the value of the DID parameter.
1. The `did:webs` versionId MUST be the sequence number (i.e. the `s` field) of the last event in the [[ref: KERI event stream]] that was used to construct the DID document according to the rules in section [DID Document from KERI Events](#did-document-from-keri-events).
1. If the DID parameter `versionId` (see section [Support for `versionId`](#support-for-versionid)) was used when resolving the `did:webs` DID, and if the DID Resolution process was successful, then this corresponding DID document metadata property MUST be guaranteed to be equal to the value of the DID parameter.

Example:

Expand All @@ -37,8 +38,8 @@ Example:

The `nextVersionId` DID document metadata property indicates the next version of the DID document after the version that has been resolved.

1. `did:webs` `nextVersionId` is defined to be the sequence number (i.e. the `s` field) of the next event in the [[ref: KERI event stream]] after the last one that was used to construct the DID document according to the rules in section [DID Document from KERI Events](#did-document-from-keri-events).
1. This DID document metadata property is only present if the DID parameter `versionId`
1. The `did:webs` `nextVersionId` MUST be the sequence number (i.e. the `s` field) of the next event in the [[ref: KERI event stream]] after the last one that was used to construct the DID document according to the rules in section [DID Document from KERI Events](#did-document-from-keri-events).
1. This DID document metadata property MUST be present if the DID parameter `versionId`
(see section [Support for `versionId`](#support-for-versionid)) was used when resolving the `did:webs` DID, and if the value of that DID parameter was not the sequence number of the last event in the [[ref: KERI event stream]].

Example:
Expand All @@ -63,11 +64,11 @@ Example:
The `equivalentId` DID document metadata property indicates other DIDs that refer to the same subject and are logically equivalent to the DID that has been resolved. It is similar to the `alsoKnownAs` DID document property (see section [Also Known As](#also-known-as)), but it has even stronger semantics, insofar as the logical equivalence is guaranteed by the DID method itself.

1. The `did:webs` `equivalentId` metadata property SHOULD contain a list of the controller AID [[ref: designated aliases]] `did:webs` DIDs that differ
in the [[ref:host]] and/or port portion of the [[ref: method-specific identifier]]
but share the same AID. Also see section [[ref:AID controlled identifiers]].
in the [[ref: host]] and/or port portion of the [[ref: method-specific identifier]]
but share the same AID. Also see section [[ref: AID controlled identifiers]].
1. `equivalentId` depends on the controller AIDs array of [[ref: designated aliases]]. A `did:webs` identifier MUST not verify unless it is found in the `equivalentId` metadata that corresponds to the [[ref: designated aliases]].

> Note that [[ref:AID controlled identifiers]] like `did:web` and `did:keri` identifiers with the same AID are not listed in `equivalentId` because they do not have the same DID method. A `did:web` identifier with the same domain and AID does not have the same security characteristics as the `did:webs` identifier. Conversely, a `did:keri` identifier with the same AID has the same security characterisitcs but not the same dependence on the web. For these reasons, they are not listed in `equivalentId`.
> Note that [[ref: AID controlled identifiers]] like `did:web` and `did:keri` identifiers with the same AID are not listed in `equivalentId` because they do not have the same DID method. A `did:web` identifier with the same domain and AID does not have the same security characteristics as the `did:webs` identifier. Conversely, a `did:keri` identifier with the same AID has the same security characterisitcs but not the same dependence on the web. For these reasons, they are not listed in `equivalentId`.
Example:

Expand Down
Loading

0 comments on commit 23e0da0

Please sign in to comment.