nmos-testing
nmos-testing copied to clipboard
Mock Registry accepts registrations from orphan Nodes
Currently the mock Registry will accept registrations from any Node on the network, not just the mock Node, or the Node under test. This can lead to unexpected behavior if an orphan Node on the network registers itself to the mock Registry while Node or Controller testing is underway. The mock Registry should (perhaps) limit registrations to the mock Node, and/or Node under Test and reject registrations from orphan Nodes.
This would also address the issue raised in #570
Also raised recently in AMWA Workshops Slack by @pimiller, where @mattdicken suggested disregarding messages from IP addresses other than the one you are testing. That may be possible, though in some scenarios we've seen, a Node can contact the mock Registry from an IP address different than the one on which it is hosting its Node API. We've also seen cases when the testing tool and Node-under-test are run on the same host, that the apparent IP address varies between runs if the host has more than interface.
This could be fixed by including an "allow list" in UserConfig.py where the user explicitly specifies the IP addresses that the mock Registry will accept. By default this would allow access to all IPs.
Yes, that would be great! Should apply to other mocks too... NMOS HTTP and WebSocket APIs and if possible other services like DNS, OCSP, CRL and Auth server?