yoursunny / NDNts

NDN libraries for the Modern Web
https://ndnts-docs.ndn.today
ISC License
31 stars 9 forks source link

more fine-grained permission verification #18

Closed quwenzhe closed 1 year ago

quwenzhe commented 1 year ago

About trust-schema module example, if authorA and authorB are both signed by adminA, authorA signed articleA, this is our expectation. Meanwhile, authorB also signed articleA, this is not our expectation. When a consumer received a data package, how to check it come from authorB, and reject it.

yoursunny commented 1 year ago

This question is about the design of trust schema, not the NDNts implementation.

The trust-schema example assumes these names:

Notably, article name does not have a component that indicates author name, so that the schema cannot enforce an article can only be signed by a particular author.

If the article name is changed to /a/blog/article/categoryA/authorA/2023/07, it would be possible to enforce this article must be signed by authorA, with schema rules changed as follows:

article: _site/"article"/category/authorName/year/month <= author
author: _site/"author"/authorName/_KEY <= admin

In this name structure, if authorB signs the packet /a/blog/article/categoryA/authorA/2023/07, the validator will reject the signature due to mismatched authorName variable.

quwenzhe commented 1 year ago

Thank you for your answer. If I use the following schema rules, I want to know what's the advantage of Yingdi Yu proposed trust schema , compared to hierarchical trust model?

article: _site/"article"/category/authorName/year/month <= author
author: _site/"author"/authorName/_KEY <= admin
yoursunny commented 1 year ago

what's the advantage of trust schema , compared to hierarchical trust model?

Hierarchical trust model is one form of trust schema.

The quoted name structure is infeasible in hierarchical trust model because author subject name is not a prefix of article name. It is only feasible in policy trust schema that has better expressness.

quwenzhe commented 1 year ago

I found hierarchical trust model was proposed in 2013, Yingdi's trust schema was proposed in 2015. I want to know what happened, Yingdi propose a new solution about trust schema?

yoursunny commented 1 year ago

The history isn't relevant to the current implementation. Please ask in ndn-interest mailing list instead. If you think the history described in README requires amendment, please present the evidence.