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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user