Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Support for ion-test DID method #30

Open
dstrockis opened this issue May 10, 2019 · 4 comments
Open

Support for ion-test DID method #30

dstrockis opened this issue May 10, 2019 · 4 comments

Comments

@dstrockis
Copy link

The DID method ion-test does not include a DID prefix in the document.publicKey[i].id or document.publicKey[i].publicKeyJwk.kid fields:

{
	"document": {
		"@context": "https://w3id.org/did/v1",
		"publicKey": [
			{
				"id": "#key-1",
				"type": "Secp256k1VerificationKey2018",
				"publicKeyJwk": {
					"kty": "EC",
					"kid": "#key-1",
					"crv": "P-256K",
					"x": "o2YecYyi5YFZW4BeLAbnf6euan5vrebAzWrovwogcWc",
					"y": "TuEQGlpN8EzVK1q_ZTiI695JpxviQXy4p9AXz3LDgKE",
					"use": "verify",
					"defaultEncryptionAlgorithm": "none",
					"defaultSignAlgorithm": "ES256K"
				}
			}
		],
		"id": "did:ion-test:EiBrYcP56nGWvx_tli7nEyori5rCgu_eo0eNljMqNU__tQ"
	},
	"resolverMetadata": {
		"driverId": "did:ion-test",
		"driver": "HttpDriver",
		"retrieved": "2019-05-09T20:35:45.347Z",
		"duration": "32.8782ms"
	}
}

This causes did-auth-jose to fail when looking for matching keys in a DID document. So, we either need to modify did-auth-jose to accept key IDs without the prefix, or go modify the ion-test method. The DID specification is not clear on whether or not the prefix is required.

I did a bit of digging, and these are the places I could find that need modification:

@alundeen alundeen self-assigned this May 13, 2019
@OR13
Copy link

OR13 commented Oct 22, 2019

IMO the use of id fields such as #key-1 is a bad practice, we should be encouraging the use of compound identifiers, such as ${did}#key-${kid} where kid is generated according to https://tools.ietf.org/html/rfc7638

@OR13
Copy link

OR13 commented Oct 22, 2019

^ apparently commenting unassigned @alundeen, i'm not able to reassign.

@OR13
Copy link

OR13 commented Oct 22, 2019

Related spec conversation regarding supported public key formats:

w3c/did-core#67

My preference is for the following structure:

{
      "id": "did:btcr:xxcl-lzpq-q83a-0d5#key-JUvpllMEYUZ2joO59UNui_XYDqxVqiFLLAJ8klWuPBw",
      "type": "EcdsaSecp256k1VerificationKey2019",
      "publicKeyJwk": {
        "crv": "secp256k1",
        "kid": "JUvpllMEYUZ2joO59UNui_XYDqxVqiFLLAJ8klWuPBw",
        "kty": "EC",
        "x": "dWCvM4fTdeM0KmloF57zxtBPXTOythHPMm1HCLrdd3A",
        "y": "36uMVGM7hnw-N6GnjFcihWE3SkrhMLzzLCdPMXPEXlA"
      }
    },

@OR13
Copy link

OR13 commented Oct 22, 2019

Also related DIDComm thread on JWE format and kid interop: decentralized-identity/DIDComm-js#8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants