Spyderisk / system-modeller

Spyderisk web service and web client
Other
3 stars 3 forks source link

Link from system-modeller UI to domain model docs #178

Open scp93ch opened 3 weeks ago

scp93ch commented 3 weeks ago

It would be useful to be able to link from system model Assets/Threats/ControlSets/ControlStrategies/MisbehaviourSets/etc to the documentation for the domain model Asset/Threat/Control/ControlStrategy/Misbehaviour/etc so that the user could understand better what they were doing and what was going on. This would also give impetus to improve the domain model docs.

Domain model docs are currently hosted at e.g. https://spyderisk.org/documentation/knowledgebase/network/v6a3-1-4/. There is only one version of the docs there, which was manually deployed. The idea was to also use "/latest" to symlink to the latest version of a particular domain model.

The documentation produced by csv2doc places docs at locations such as /threat/DS.T.HPDFDAuDS.0/ whereas the URI of the threat in the RDF does not begin with threat (would be nice if it did!).

We're therefore going to need a method to map from the URI of an entity in a domain model to an actual resolvable URL. We also need to consider that not all domain models will begin with http://it-innovation.soton.ac.uk/whatever.

One way to do this would be to have a mapping (routing table) deployed at https://spyderisk.org/documentation/knowledgebase/ which could redirect the browser from the entity URI to a resolvable URL. So mapping e.g. https://spyderisk.org/documentation/knowledgebase/URL-encoded-URI to https://spyderisk.org/documentation/knowledgebase/network/v6a3-1-4/threat/something. Unfortunately this cannot work in the general case because we do not have the version number in the URI.

We could do part of the work in the system-modeller UI and get the domain model "name" and version into the URL so we instead query https://spyderisk.org/documentation/knowledgebase/network/version/URL-encoded-URI and have a separate entity to URL path mapping for each domain model (this could be generated by csv2doc).

scp93ch commented 3 weeks ago

@wwaites any thoughts?

wwaites commented 3 weeks ago

We're therefore going to need a method to map from the URI of an entity in a domain model to an actual resolvable URL.

The URIs in the domain model need to be directly resolvable. The choice is either to make the existing ones resolve, or to change to new ones that do resolve. The latter seems to be the better option. So we need to put some thought into how to structure the new namespace.

We should not be monkey-patching URIs in the browser.