Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

did:peer - IDs in verification methods #2145

Closed
llorllale opened this issue Aug 31, 2020 · 4 comments · Fixed by trustbloc/adapter#377
Closed

did:peer - IDs in verification methods #2145

llorllale opened this issue Aug 31, 2020 · 4 comments · Fixed by trustbloc/adapter#377
Labels
bug Something isn't working

Comments

@llorllale
Copy link
Contributor

llorllale commented Aug 31, 2020

The did:peer VDR is producing docs with incorrect IDs for authentication:

Example
{ 
    "@context": [
        "https://w3id.org/did/v1"
    ],
    "authentication": [
        "#CkPGqALPjt8PFWbYd4WmcNX4Qq3iXdUVq67s3yeh9vxe"
    ],      
    "created": "2020-08-10T16:13:22.45194098-04:00",
    "id": "did:peer:1zQmRtJYm9vMdFd4sedav1nyLjaMQp2BozhvTWkiWNSjbFq3",
    "publicKey": [
        {
            "controller": "#id",
            "id": "#CkPGqALPjt8PFWbYd4WmcNX4Qq3iXdUVq67s3yeh9vxe",
            "publicKeyBase58": "CkPGqALPjt8PFWbYd4WmcNX4Qq3iXdUVq67s3yeh9vxe",
            "type": "Ed25519VerificationKey2018"
        }
    ],
    "service": [
        {
            "id": "#agent",
            "priority": 0,
            "recipientKeys": [
                "CkPGqALPjt8PFWbYd4WmcNX4Qq3iXdUVq67s3yeh9vxe"
            ],
            "routingKeys": null,
            "serviceEndpoint": "http://example.com/didcomm",
            "type": "did-communication"
        }
    ],
    "updated": "2020-08-10T16:13:22.45194098-04:00"
} 

The did-core spec says:

The value of the id property for a verification method MUST be a URI.

... where the structure of URIs is defined in RFC3986:

Each URI begins with a scheme name that refers to a specification for assigning identifiers within that scheme.
....
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )


Note:

@llorllale llorllale added the bug Something isn't working label Aug 31, 2020
@llorllale llorllale changed the title did:peer - incorrect structure + IDs in verification methods did:peer - IDs in verification methods Sep 1, 2020
@llorllale
Copy link
Contributor Author

The security vocabulary lists all known verification methods as "unstable" and do not have normative text around the structure of references to verification methods: https://w3c-ccg.github.io/security-vocab/#authentication

@llorllale
Copy link
Contributor Author

Turns out that normative text around relative DID URLs was recently added to did-core: https://w3c.github.io/did-core/#relative-did-urls

@llorllale
Copy link
Contributor Author

Because relative URLs are part of the did-core spec, our did:peer VDR is compliant.

But we cannot use relative URLs in a verificationMethod of an LD proof without adding @base to the JSON-LD document's @context.

@llorllale
Copy link
Contributor Author

The JSON-LD's @context can be inlined or referenced. Currently we only support referenced contexts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants