Spyderisk / domain-network

Network domain model
Apache License 2.0
1 stars 0 forks source link

Remote access and proxy construction sequencing issue #63

Closed mike1813 closed 11 months ago

mike1813 commented 1 year ago

The patterns for remote access to a host device using terminal or remote desktop clients must necessarily handled cases where access to a remote login or remote desktop service is mediated by a proxy.

However, for various reasons the remote access construction pattern sequence comes before the proxy inference patterns. For this reason, the remote access sequence includes a lot of patterns that infer the possibility of remote access via a proxy.

This is daft. The possibility of remote access via a proxy is precisely what the proxy inference patterns do. They should be processed first, creating indirect access links that should then be used in the remote access patterns.

mike1813 commented 11 months ago

This change is sensible because it reduces the amount of repetition and interdependency between distant parts of the construction sequence. However, it leads to a big increase in the number of patterns unless some of the inferred relationships are organised in a better inheritance hierarchy. Specifically:

Note that 'proxyAuthN' is already a subtype of 'noAuthN', because when used between a client and an adjacent service, it means there is no mutual authentication as that is handled by some other service or client.

The best solution is to introduce a pair of relationship type inheritance trees.

Then change construction and threat patterns as follows:

This should mean some of these relationships are no longer used in threats and could be removed as construction state at the end of validation.

mike1813 commented 11 months ago

Implemented in branch 65, and test cases for remote access via a proxy are now working. Still need to test that client access in general still works correctly via proxies including 3-deep nested proxy chains...

mike1813 commented 11 months ago

Now tested against cases using authenticating and transparent proxies, including up to three nested proxies, and cases using OIDC-style authentication (implicit flow) in some cases in conjunction with proxies.