-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using PortableDid
to import did to sign VC, removing kid as default value
#130
Changes from 12 commits
3b5448d
10c1bdc
ed1d092
19cdeed
bb5cb4f
78b4f28
d7c5b35
8e92792
55acc22
78663ce
4787b82
3688a5d
a67a044
06dc6c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,7 @@ | |
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
"alg": "EdDSA" | ||
} | ||
}, | ||
"output": { | ||
|
@@ -23,8 +22,7 @@ | |
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
"alg": "EdDSA" | ||
} | ||
} | ||
], | ||
|
@@ -49,8 +47,7 @@ | |
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
"alg": "EdDSA" | ||
}, | ||
"services": [ | ||
{ | ||
|
@@ -69,8 +66,7 @@ | |
"crv": "secp256k1", | ||
"x": "1_o0IKHGNamet8-3VYNUTiKlhVK-LilcKrhJSPHSNP0", | ||
"y": "qzU8qqh0wKB6JC_9HCu8pHE-ZPkDpw4AdJ-MsV2InVY", | ||
"alg": "ES256K", | ||
"kid": "0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw" | ||
"alg": "ES256K" | ||
}, | ||
"purposes": [ | ||
"assertionMethod", | ||
|
@@ -104,8 +100,7 @@ | |
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
"alg": "EdDSA" | ||
} | ||
}, | ||
{ | ||
|
@@ -117,8 +112,7 @@ | |
"crv": "secp256k1", | ||
"x": "1_o0IKHGNamet8-3VYNUTiKlhVK-LilcKrhJSPHSNP0", | ||
"y": "qzU8qqh0wKB6JC_9HCu8pHE-ZPkDpw4AdJ-MsV2InVY", | ||
"alg": "ES256K", | ||
"kid": "0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so what was the rationale for removing these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the same for alg - alg also isn't populated by default, since crv (a required field) is more accurate anyway. |
||
"alg": "ES256K" | ||
} | ||
} | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
{ | ||
"description": "PortableDid resolution", | ||
"vectors": [ | ||
{ | ||
"description": "Can be successfully parsed in as PortableDid", | ||
"input": { | ||
"uri": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
KendallWeihe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"privateKeys": [ | ||
{ | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"d": "txnECNDxFc0gnD303qLJ6VfWJS8DkgpbxVbOkzzp_M4", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
], | ||
"document": { | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY#z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"type": "JsonWebKey2020", | ||
"controller": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"publicKeyJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
} | ||
] | ||
}, | ||
"metadata": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"errors": false | ||
}, | ||
{ | ||
"description": "Bad PortabieDid - missing uri", | ||
"input": { | ||
"privateKeys": [ | ||
{ | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"d": "txnECNDxFc0gnD303qLJ6VfWJS8DkgpbxVbOkzzp_M4", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
], | ||
"document": { | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY#z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"type": "JsonWebKey2020", | ||
"controller": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"publicKeyJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
} | ||
] | ||
}, | ||
"metadata": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "Bad PortableDid - missing privateKeys", | ||
"input": { | ||
"uri": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"document": { | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY#z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"type": "JsonWebKey2020", | ||
"controller": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"publicKeyJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
} | ||
] | ||
}, | ||
"metadata": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "Bad PortableDid - missing document", | ||
"input": { | ||
"uri": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"privateKeys": [ | ||
{ | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"d": "txnECNDxFc0gnD303qLJ6VfWJS8DkgpbxVbOkzzp_M4", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
], | ||
"metadata": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "Bad PortableDid - missing metadata", | ||
"input": { | ||
"uri": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"privateKeys": [ | ||
{ | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"d": "txnECNDxFc0gnD303qLJ6VfWJS8DkgpbxVbOkzzp_M4", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
], | ||
"document": { | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY#z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"type": "JsonWebKey2020", | ||
"controller": "did:key:z6MkfUhjsZUJkzioGDULpcqxXFSNs6McMJo31txYnEaqn9dY", | ||
"publicKeyJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"use": "sig", | ||
"alg": "EdDSA", | ||
"kid": "c4IOrQdnehPwQZ6SyNLp9J942VCXrxgWw4zUxAHQXQE", | ||
"x": "DzpSEyU0w1Myn3lA_piHAI6OrFAnZuEsTwMUPCTwMc8" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"errors": true | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it too much to ask to use a
did:jwk
instead? since we deprecateddid:key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test vector specifically tests for creating a VC as a jwt with a
did:key
so i'd like to keep it here :)