question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interactions between documentLoader and security context

See original GitHub issue

When a signature suite is not registered here: https://w3id.org/security/v2

match proof must be modified like so:

  async matchProof({
    proof,
  }: // document,
  // purpose,
  // documentLoader,
  // expansionMap,
  any) {
    // console.log(proof, this.type);
    return proof.type === this.type || proof.type === '/' + this.type;
  }

This modification needs to happen in classes which are normally internal, and thus, this behavior prevents the use of vc-js with custom signature suites, unless the implementer does not extend DB classes (forces implementer to not use inheritance)… this seems undesirable for digital bazaar, but I’m not really sure…

There are various other approaches possible, like experimenting with adding contexts, overriding contexts, compactProof, or changing SECURITY_CONTEXT_URL

however, all of them are more intrusive than changing matchProof… and since any new suite is obviously not going to be registered in SECURITY_CONTEXT_URL yet… it seems logical to make the change suggested…

For example, this one change, allows for a new suite: https://github.com/w3c-ccg/lds-jws2020/pull/19/files#diff-e886e78ec0726474ae672dcfa71f28c7R16

and an old suite: https://github.com/w3c-ccg/lds-jws2020/pull/19/files#diff-ed30fefd45db38ae8b8b0e692510803fR16

to both pass tests… but it required the new suite to make the change noted on this ticket… no additional changes were required, see the document loader:

https://github.com/w3c-ccg/lds-jws2020/pull/19/files#diff-e25e8ce8b4ce985e43c848580e547d55R13

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

blink/renderer/core/loader/document_loader.cc - Google Git
Asserts size of DocumentLoader, so that whenever a new attribute is added to ... All the security properties of the document must be...
Read more >
7. Technical Overview - Spring
Inside the SecurityContextHolder we store details of the principal currently interacting with the application. Spring Security uses an Authentication object ...
Read more >
JSON-LD 1.1 - W3C
JSON is a useful data serialization and messaging format. This specification defines JSON-LD 1.1, a JSON-based format to serialize Linked ...
Read more >
jsonld-signatures - npm
Table of Contents. Background; Security; Install; Usage; Contribute; Commercial Support; License. Background. A Linked Data Signature proof ...
Read more >
did - Go Packages
DocumentLoader. CachingJSONLDLoader creates JSON-LD CachingDocumentLoader with preloaded base JSON-LD DID and security contexts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found