Summary of activity from 1/04/2021 to 11/06/2021
- Preparation
- LDP Test Suite for Basic Containers
- Implement Basic Access Control
- Initial Caching mechanism
- Work with Solid Auth Groups
To properly implement the work for this Milestone, I needed to update banana-rdf and re-implement HTTP-Signature.
Scala 3 is a major upgrade to Scala and was released in May.
As banana-rdf is a core component of Reactive-Solid, I wanted to bring it as close as possible to Scala 3, in order to get a clear idea of what will be needed to make the transition. This upgrade was done with PR 364.
I also opened a discussion to see what the best way to complete the transition could be. This is preliminary work for a later milestone dedicated to banana-rdf.
The code for HTTP Sig from Milestone 2 depended on Tomitribe's http-signatures-java which implemented an old version of the specification. There has not been any movement there, so I decided it would be better to implement it completely in Scala.
HTTP Sig depends on Signing HTTP Messages v04 RFC which in turn depends on RFC8941: Structured Field Values for HTTP. So I first implemented RFC8941 and then rewrote Signing HTTP Messages Draft.
Close reading of those specs, allowed me to open some issues on the HTTP WG's github repo:
- Signatures: Difficulty verifying B.2 examples
- Signatures 04: Use lists instead of Inner lists for §2.3 Prefixes
- Signatures 04: Typo in multiple Signatures signature string?
These have been fixed for version 05 of the Signing spec.
- Ran the LDP test Suite produced by W3C WG
- I started looking at testing with the Solid Test suites too.
Output from running LDP test suite
- May 10, 2021 report: a useable part of LDP was implemented, but there is still some more to come. Some of it (e.g. support for PATCH) requires implementation of the Script Free Monad described in the next section. This is because one can only really PATCH an RDF graph if one has first turned it into a Graph.
Detailied in Issue 17: Implement Basic WAC like Access Control.
Building the AuthZ layer, I immediately came to think of inheritance of Access Control Rules. This happens as follows just by thinking about building a test suite:
- The test suite has to start with an empty Pod, with perhaps at most one access control rule for the root container.
- Then, one will want to create containers and resources in that container: these will need to inherit the access control rules of the parent if they are to be editable or viewable at all.
WAC has support for a basic form of default inheritance, but default reasoning is awkward on the semantic web, and so proposed in solid Authorization Panel issue 210: add :imports relation. I used something similar in rww-play 6 years ago - where it was called it :includes
. I find that makes it much easier to think about access control, so I implemented this in Commit 7771d5871dd9c10f535200730f4290454c0d3032.
In order to implement Access Control flexibly I added a basic system of Free Monad Scripts defined in SolidCmd.scala. This allows one to for example write a script that fetches a graph and the transitive closure of its :imports related graphs.
One advantage is that it makes it possible to test the script with a mock WWW
and simple interpretation as in TestLDPCmd.scala. One can then interpret exactly the same script using Actors. Each command comes with a URL allowing it to gets Routed to its own Actor and interpreted by that actor: a filesystem actor will read data from the FileSystem and Web Proxy actor read from the relevant remote resource, or from its cache, a DB Actor ... (see the BasicContainer for example). This was done in RWW-Play too, but here we integrate this clearly with a pure streaming web server view via the Wait
command to allow us to work with Futures when transforming an RDF Stream into a Graph for example.
The result of running the Free Monad, is a Cofree Comonad, which interestingly enough is the structure of a RDF Dataset!
Remaining to be done by 14-16 Jume:
- add (basic) authorization logic
- tie it in with HTTP Sig
- write tests
A caching mechanims for pages fetched on the web is an optimisation. Will try to have an initial version by 16 June.
- 2021-04-28 meeting notes, turned into a very nice, helpful and readable dialog.
- Solid authz issue 210: add :imports relation
- And other panel meetings.
There were fewer meetings here.