uport-project / kotlin-did-jwt

Create and verify uPort and DID compliant JWTs in Kotlin
https://developer.uport.me
Apache License 2.0
8 stars 6 forks source link

keys in ethr-did documents should list `controller` instead of `owner` #29

Open mirceanis opened 5 years ago

mirceanis commented 5 years ago

The DID spec mentions a controller property for DID public key entries. Our resolver uses owner to describe a similar concept.

There is a slight difference in semantics. When the owner of an identity is changed in the ERC1056 registry, this should be reflected in the DID document entry in the controller field of the root key.

More specifically, if keyA calls changeOwner, listing keyB as the new owner, the DID document entry now looks like this:

{
    id: 'did:ethr:0xkeyA#owner',
    type: 'Secp256k1VerificationKey2018',
    owner: 'did:ethr:0xkeyA',
    ethereumAddress: '0xkeyB'
}

A correction should be made to the did-resolver such that the public key entry should appear like so:

{
    id: 'did:ethr:0xkeyA#owner',
    type: 'Secp256k1VerificationKey2018',
    controller: 'did:ethr:0xkeyB',
    ethereumAddress: '0xkeyB'
}

This mirrors [ #168401735 ] in PT