Code Monkey home page Code Monkey logo

did-key-test-suite's People

Contributors

aljones15 avatar jsassassin avatar msporny avatar peacekeeper avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

did-key-test-suite's Issues

Align `enableExperimentalPublicKeyTypes` with `overrideVerificationMethodTypePolicy`

I really like the idea of the enableExperimentalPublicKeyTypes resolution option and invalidPublicKeyType error. We have also defined and implemented something very similar:

  • The option overrideVerificationMethodTypePolicy
  • The error notAllowedVerificationMethodType

See https://github.com/decentralized-identity/did-spec-extensions/blob/main/error-codes/not-allowed-verification-method-type.md.

This is one of several security-related policies that a resolver can enforce, see here for more: https://github.com/decentralized-identity/did-spec-extensions

I think the only difference is that in our case, individual verification method types (such as Ed25519VerificationKey2018) can be allowed/denied by a resolver, whereas in your case your option is about a group of types (such as "experimental"). It should be possible to harmonize both into a single option.

Update README

Replace the previous mention of implementations and instead link to implementations.

Some tests here are not specific to `did:key`

I see several tests of features that apply to DID Resolution in general, not just the did:key method. I think those should be moved into the DID Resolution test suite, and/or be re-used consistently across future DID method test suites as well.

Here's a list where this might be the case:

  1. The scheme MUST be the value did
  2. MUST raise invalidDid error if scheme is not did
  3. If "didDocument.id" is not a valid DID, an invalidDid error MUST be raised
  4. If verificationMethod.id is not a valid DID URL, an invalidDidUrl error MUST be raised.
  5. For Signature Verification Methods, if options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or Ed25519VerificationKey2020, an invalidPublicKeyType error MUST be raised.
  6. For Encryption Verification Methods, if options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or X25519KeyAgreementKey2020, an invalidPublicKeyType error MUST be raised.
  7. If verificationMethod.controller is not a valid DID, an invalidDid error MUST be raised.

For 5. and 6., don't test this yet until #23 is resolved.

`invalidDid` or `notFound` if method-specific ID doesn't start with `z`?

I see that one of the tests is:

MUST raise invalidDid if the multibaseValue does not begin with the letter z.

I have been assuming so far that the invalidDid error would be returned only if the DID doesn't conform to the generic DID Core syntax. So if you try to resolve did:key:12345, the error would actually be notFound, since the DID does conform to the generic DID Core syntax, but the method-specific ID "12345" doesn't exist within the did:key method.

But maybe my assumption was wrong. I also understand the rationale that invalidDid would cover not only the generic DID Core syntax, but also method-specific syntax requirements (starting with z, in this case). So, just opening this issue to talk about it. We could define this in more detail in the DID Resolution spec: https://w3c-ccg.github.io/did-resolution/#errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.