diff --git a/fep/c390/context.jsonld b/fep/c390/context.jsonld deleted file mode 100644 index a9e60a2..0000000 --- a/fep/c390/context.jsonld +++ /dev/null @@ -1,5 +0,0 @@ -{ - "@context": { - "VerifiableIdentityStatement": "https://w3id.org/fep/c390/VerifiableIdentityStatement" - } -} diff --git a/fep/c390/fep-c390.feature b/fep/c390/fep-c390.feature new file mode 100644 index 0000000..4c06b67 --- /dev/null +++ b/fep/c390/fep-c390.feature @@ -0,0 +1,72 @@ +Feature: FEP-c390: Identity Proofs + + @fep-c390 + Scenario: Creating the identity proof + Given the decentralized identifier "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2" + And private Key "z3u2en7t5LR2WtQH5PfFqMqwVHBeXouLzo6haApm8XHqvjxq" + And actor ID "https://server.example/users/alice" + And current time "2023-02-24T23:36:38Z" + When creating the identity proof for the actor + Then the identity claim is + """ + { + "type": "VerifiableIdentityStatement", + "subject": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", + "alsoKnownAs": "https://server.example/users/alice" + } + """ + And the identity proof is + """ + { + "type": "VerifiableIdentityStatement", + "subject": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", + "alsoKnownAs": "https://server.example/users/alice", + "proof": { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-jcs-2022", + "created": "2023-02-24T23:36:38Z", + "verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", + "proofPurpose": "assertionMethod", + "proofValue": "z26W7TfJYD9DrGqnem245zNbeCbTwjb8avpduzi1JPhFrwML99CpP6gGXSKSXAcQdpGFBXF4kx7VwtXKhu7VDZJ54" + } + } + """ + + @fep-c390 + Scenario: Verifying the identity proof + Given the actor + """ + { + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://www.w3.org/ns/did/v1", + "https://w3id.org/security/data-integrity/v1", + { + "fep": "https://w3id.org/fep#", + "VerifiableIdentityStatement": "fep:VerifiableIdentityStatement", + "subject": "fep:subject" + } + ], + "type": "Person", + "id": "https://server.example/users/alice", + "inbox": "https://server.example/users/alice/inbox", + "outbox": "https://server.example/users/alice/outbox", + "attachment": [ + { + "type": "VerifiableIdentityStatement", + "subject": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", + "alsoKnownAs": "https://server.example/users/alice", + "proof": { + "type": "DataIntegrityProof", + "cryptosuite": "eddsa-jcs-2022", + "created": "2023-02-24T23:36:38Z", + "verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", + "proofPurpose": "assertionMethod", + "proofValue": "z26W7TfJYD9DrGqnem245zNbeCbTwjb8avpduzi1JPhFrwML99CpP6gGXSKSXAcQdpGFBXF4kx7VwtXKhu7VDZJ54" + } + } + ] + } + """ + When verifying the attached identity proof + Then the identity proof is valid diff --git a/fep/c390/fep-c390.md b/fep/c390/fep-c390.md index 014560d..7bb4e52 100644 --- a/fep/c390/fep-c390.md +++ b/fep/c390/fep-c390.md @@ -1,11 +1,12 @@ --- slug: "c390" -authors: silverpill +authors: silverpill <@silverpill@mitra.social> +type: implementation status: DRAFT dateReceived: 2022-11-23 relatedFeps: FEP-8b32 trackingIssue: https://codeberg.org/fediverse/fep/issues/34 -discussionsTo: https://codeberg.org/fediverse/fep/issues/34 +discussionsTo: https://socialhub.activitypub.rocks/t/fep-c390-identity-proofs/2726 --- # FEP-c390: Identity Proofs @@ -26,7 +27,7 @@ Identity proof is a JSON document that represents a verifiable bi-directional li It MUST contain the following properties: -- `type` (REQUIRED): the `type` property MUST contain the string `VerifiableIdentityStatement`. +- `type` (REQUIRED): the value of `type` property MUST be the string `VerifiableIdentityStatement`. - `subject` (REQUIRED): the decentralized identifier (DID) that represents a cryptographic key belonging to an actor. - `alsoKnownAs` (REQUIRED): the value of this property MUST match the actor ID. - `proof` (REQUIRED): the data integrity proof, as defined by [Data Integrity][DataIntegrity] specification. @@ -37,7 +38,7 @@ Identity proofs SHOULD be attached to an actor object, under the `attachment` pr ### Proof generation -The identity proof document MUST contain a data integrity proof, which includes a cryptographic proof and parameters required to verify it. It MUST be created according to the *Data Integrity* specification, section [4.3 Add Proof](https://w3c.github.io/vc-data-integrity/#add-proof). The value of `verificationMethod` property of the data integrity proof MUST match the value of `subject` property of the identity proof document. +The identity proof document MUST contain a data integrity proof, which includes a cryptographic proof and parameters required to verify it. It MUST be created according to the *Data Integrity* specification, section [4.2 Add Proof][DI-AddProof]. The value of `verificationMethod` property of the data integrity proof MUST match the value of `subject` property of the identity proof document. The resulting data integrity proof MUST be added to identity proof document under the `proof` key. @@ -79,7 +80,7 @@ Example of an actor object linked to a `did:key` identifier: The consuming implementations MUST check the authenticity of identity proof document by verifying its data integrity proof. If the proof can not be verified, or if the value of `verificationMethod` property of the data integrity proof doesn't match the value of `subject` property of the identity proof, or if the value of `alsoKnownAs` property of the identity proof doesn't match the actor ID, the identity proof MUST be discarded. -Verification process MUST follow the *Data Integrity* specification, section [4.5 Verify Proof](https://w3c.github.io/vc-data-integrity/#verify-proof). +Verification process MUST follow the *Data Integrity* specification, section [4.4 Verify Proof][DI-VerifyProof]. ### Linking identities @@ -93,7 +94,7 @@ Servers MUST present identity proofs to clients in their original form. Clients ## Test vectors -TBD +See [fep-c390.feature](./fep-c390.feature) ## Implementations @@ -103,11 +104,13 @@ TBD - Christine Lemmer Webber, Jessica Tallon, [ActivityPub][ActivityPub], 2018 - Manu Sporny, Dave Longley, Markus Sabadell, Drummond Reed, Orie Steele, Christopher Allen, [Decentralized Identifiers (DIDs) v1.0][DIDs], 2022 -- Dave Longley, Manu Sporny, [Verifiable Credential Data Integrity 1.0][DataIntegrity], 2022 +- Dave Longley, Manu Sporny, [Verifiable Credential Data Integrity 1.0][DataIntegrity], 2025 [ActivityPub]: https://www.w3.org/TR/activitypub/ [DIDs]: https://www.w3.org/TR/did-core/ -[DataIntegrity]: https://w3c.github.io/vc-data-integrity/ +[DataIntegrity]: https://www.w3.org/TR/vc-data-integrity/ +[DI-AddProof]: https://www.w3.org/TR/vc-data-integrity/#add-proof +[DI-VerifyProof]: https://www.w3.org/TR/vc-data-integrity/#verify-proof ## Copyright