Support overriding address space for specific IP addresses in test environments
Categories
(Core :: Networking, enhancement, P3)
Tracking
()
People
(Reporter: titouan, Unassigned)
Details
(Whiteboard: [necko-triaged])
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Steps to reproduce:
There is no good way to write Web Platform Tests for the CORS-RFC1918 specification [1] without additional support from browsers. This has been discussed in the WPT repo [2], which led me to write an RFC [3].
The gist of the RFC is this: browsers need additional configuration surfaces to override the address space [4] of specific IP addresses, so as to simulate the behavior under test. For example, we would like to test that requests to public IP addresses are unaffected, but there is no way to make requests to e.g. https://example.org from a test runner. Instead, we would like to tell the browser: "please consider 127.0.100.1 to be public" and then make requests against this IP address, which loops back to the WPT server. This override mechanism can take the shape of command-line flags, or preferences, or any mechanism deemed most apt by Firefox developers.
Since the bulk of the implementation work for this RFC rests with browser developers, the WPT maintainers would like input from them, hence this bug.
Does the idea outlined above (and explored in more detail in [3]) sound reasonable?
[1] https://wicg.github.io/cors-rfc1918/
[2] https://github.com/web-platform-tests/wpt/issues/26166
[3] https://github.com/web-platform-tests/rfcs/pull/72
[4] https://wicg.github.io/cors-rfc1918/#address-space
Updated•4 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
CC-ing Anne: could you please help find a point of contact for this?
Comment 2•3 years ago
|
||
I left a comment on github. This is generally fine, but I prefer my proposal from github, which is:
I think it is better to do an overwrite of ip address right before creating a socket instead of redefining address type. For example : map 100.10.10.10 to 127.0.0.1. In this way the entire browser engine will only see 100.10.10.10 and only the socket will be created to 127.0.0.1.
I think this is less prompt to errors.
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
Thanks for the comment Dragana. I responded on the GH issue, could you please take a look? I would like to unblock this, it's been sitting for a while.
Reporter | ||
Comment 4•3 years ago
|
||
Hi there! Friendly ping. Could you take a quick look at the RFC again?
Updated•3 years ago
|
Updated•3 years ago
|
Description
•