1
0
mirror of https://codeberg.org/fediverse/fep.git synced 2026-08-05 11:46:04 +00:00

FEP-c390: Update proposal (#137)

- Added test vectors.
- Added "Implementations" section.
- Updated references to Data Integrity spec.

Co-authored-by: silverpill <silverpill@firemail.cc>
Reviewed-on: https://codeberg.org/fediverse/fep/pulls/137
Co-authored-by: silverpill <silverpill@noreply.codeberg.org>
Co-committed-by: silverpill <silverpill@noreply.codeberg.org>
This commit is contained in:
silverpill
2023-07-24 15:23:29 +00:00
committed by helge
parent 9cd16e0d02
commit 0a8f660a1f
2 changed files with 85 additions and 5 deletions
+72
View File
@@ -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": "jcs-eddsa-2022",
"created": "2023-02-24T23:36:38Z",
"verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
"proofPurpose": "assertionMethod",
"proofValue": "zYqr4eFzrnUWiBDaa7SmBhfaSBiv6BFRsDRGkmaCJpXArPBspFWNM6NXu77R7JakdzbUdjZihBa28LuWscZxSfRk"
}
}
"""
@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": "jcs-eddsa-2022",
"created": "2023-02-24T23:36:38Z",
"verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
"proofPurpose": "assertionMethod",
"proofValue": "zYqr4eFzrnUWiBDaa7SmBhfaSBiv6BFRsDRGkmaCJpXArPBspFWNM6NXu77R7JakdzbUdjZihBa28LuWscZxSfRk"
}
}
]
}
"""
When verifying the attached identity proof
Then the identity proof is valid
+13 -5
View File
@@ -36,7 +36,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.1 Generate Proof](https://w3c.github.io/vc-data-integrity/#generate-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.1 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 resulting data integrity proof MUST be added to identity proof document under the `proof` key.
@@ -61,15 +61,15 @@ Example:
"attachment": [
{
"type": "VerifiableIdentityStatement",
"subject": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
"subject": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
"alsoKnownAs": "https://server.example/users/alice",
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "jcs-eddsa-2022",
"created": "2022-11-12T00:00:00Z",
"verificationMethod": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
"created": "2023-02-24T23:36:38Z",
"verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
"proofPurpose": "assertionMethod",
"proofValue": "<proof-value>"
"proofValue": "zYqr4eFzrnUWiBDaa7SmBhfaSBiv6BFRsDRGkmaCJpXArPBspFWNM6NXu77R7JakdzbUdjZihBa28LuWscZxSfRk"
}
}
]
@@ -88,6 +88,14 @@ The consuming implementations SHOULD treat identities denoted by `subject` and `
If two actors have identity proofs with the same `subject` property, they SHOULD be treated as different identities of the same entity.
## Test vectors
See [fep-c390.feature](./fep-c390.feature)
## Implementations
- [Mitra](https://codeberg.org/silverpill/mitra/src/commit/eb18e475efb71e461cd33c800c86cfe94144f5a3/FEDERATION.md#identity-proofs)
## References
- [ActivityPub] Christine Lemmer Webber, Jessica Tallon, [ActivityPub](https://www.w3.org/TR/activitypub/), 2018