-
Notifications
You must be signed in to change notification settings - Fork 16
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
Proposal for breaking change in jsonld document loader #50
Comments
If we're going to do a breaking change on bedrock, yes, we should absolutely split jsonld out so we can have that evolve independently. I'm +1 for breaking it out and making bedrock-jsonld have a secure document loader by default. And, really, bedrock-jsonld should just be bedrock-jsonld-documentloader (or something better named). We just want to provide a document loader that hooks into the bedrock shared internals -- we don't need to wrap the whole library. |
Also, with that approach, we can build a fancy doc loader that is secure by default but easily configured with an API for adding static contexts/docs to be loaded or dynamic loaders to pull things from the network (or wherever). IOW, we could implement this in a BSD lib and then implement a bedrock wrapper that hooks it into bedrock internals/shares it across modules. Of course, this increases scope. If we're able to create something that allows us to put this approach on the roadmap and just take a step towards it (whilst getting better security) we should do that instead. |
Anything that allows us a more flexible modular structure for the wallet, issuer, and verifier is good. |
@dlongley @davidlehn @gannan08 I'm trying to think about what the first, easiest step here. We have lots of existing code that just uses The context modules add documents to a Seems like we would want a Is the aim that we should have a OR... Is it (as was suggested) |
Addressed in: #52 |
This has landed. |
It is currently considered best practice not to have jsonld document loaders fetch things from the Internet. The default document loader in Bedrock is designed to fetch things from the Internet.
https://github.com/digitalbazaar/bedrock/blob/master/lib/jsonld.js#L20
https://github.com/digitalbazaar/jsonld.js/blob/master/lib/documentLoaders/node.js
It has also been discussed that jsonld should not be baked into the base Bedrock module and should be in a module like
bedrock-jsonld
.In order to make Bedrock secure by default, I propose a breaking change that implements a secure document loader.
We could at the same remove
bedrock.jsonld
all together and require that a newbedrock-jsonld
module be installed and used instead.How should we approach this issue?
The text was updated successfully, but these errors were encountered: