--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CAC_ixdzw8_RgERgMiwmUK8-PJWbjfyex9xS8a7sn%2BEd3z19yfQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CACvaWvYR%2BEXF4P3L5FG2xPFjGhFBBBo69TjaWD9XbGuqoJzzkQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CAC_ixdyGtQ-9GcYx6FVnup7PpSV2MS5i-68xtc0LvUPdQXVk%2BQ%40mail.gmail.com.
It does seem like we run the risk of making this policy something folks accidentally depend on, rather than on the Web Platform itself. A result of such flags can make it harder to migrate browsers, as well as harder for developers to understand the Web Platform security and platform primitives.
Setting the policy permits bypassing <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>'s list of restricted ports. The value is a comma-separated list of zero or more ports that outgoing connections will be permitted on.Ports are restricted to prevent <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> being used as a vector to exploit various network vulnerabilities. Setting this policy may expose your network to attacks. This policy is intended as a temporary workaround for errors with code "ERR_UNSAFE_PORT" while migrating a service running on a blocked port to a standard port (ie. port 80 or 443).Malicious websites can easily detect that this policy is set, and for what ports, and use that information to target attacks.Leaving the value empty or unset means that all restricted ports will be blocked.This policy is overridden by the "--explicitly-allowed-ports" command-line option when present.
Is there any thought to making this enterprise policy only useful for port 10080?
E.g. so we don't regress existing blocking mechanisms? The difference between the command-line flag and an Enterprise policy is the former is useful for limited, temporary purposes, while the latter makes it easy to build assumptions around and at scale within an organization, and equally easy for software vendors to decide not to provide updated versions of their software, instead opting to simply document organizations set such policies.
The more we can limit this (e.g. by time-limiting the policy, by ensuring the policy can only apply to specific allow-listed ports), it seems like the better we can provide a predictable platform with clear targets.
On Tue, 23 Mar 2021 at 22:55, Ryan Sleevi <rsl...@chromium.org> wrote:It does seem like we run the risk of making this policy something folks accidentally depend on, rather than on the Web Platform itself. A result of such flags can make it harder to migrate browsers, as well as harder for developers to understand the Web Platform security and platform primitives.Absolutely. I've had to make a trade-off between security and predictability, and it's not completely satisfying for either.I've tried to make the description for the policy as clear as possible regarding the risks:Setting the policy permits bypassing <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>'s list of restricted ports. The value is a comma-separated list of zero or more ports that outgoing connections will be permitted on.Ports are restricted to prevent <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> being used as a vector to exploit various network vulnerabilities. Setting this policy may expose your network to attacks. This policy is intended as a temporary workaround for errors with code "ERR_UNSAFE_PORT" while migrating a service running on a blocked port to a standard port (ie. port 80 or 443).Malicious websites can easily detect that this policy is set, and for what ports, and use that information to target attacks.Leaving the value empty or unset means that all restricted ports will be blocked.This policy is overridden by the "--explicitly-allowed-ports" command-line option when present.Is there any thought to making this enterprise policy only useful for port 10080?There will inevitably be more ports to block in future, and it would be very inefficient to add a new pref every time. In addition, we may need to backport a port block. Adding an enterprise policy touches so many files that backporting it would be impractical.
E.g. so we don't regress existing blocking mechanisms? The difference between the command-line flag and an Enterprise policy is the former is useful for limited, temporary purposes, while the latter makes it easy to build assumptions around and at scale within an organization, and equally easy for software vendors to decide not to provide updated versions of their software, instead opting to simply document organizations set such policies.In practice, people change the Chrome shortcut to include the --explicitly-allowed-ports command-line option. See for example https://superuser.com/questions/188006/how-to-fix-err-unsafe-port-error-on-chrome-when-browsing-to-unsafe-ports (and many other pages with similar advice). So effectively it becomes permanent. While it's easier to roll out an enterprise policy at scale, it's also easier to undo it once the problem is fixed.
Hopefully the description I wrote is scary enough that software vendors expecting enterprises to use it will get at least some push back.The more we can limit this (e.g. by time-limiting the policy, by ensuring the policy can only apply to specific allow-listed ports), it seems like the better we can provide a predictable platform with clear targets.We could split restricted ports into "old restricted ports" that can't be unblocked and "new restricted ports" that can, but I don't think it would be worth the code complexity, and it would be meaningless unless we changed "--explicitly-allowed-ports" at the same time, which we can't, because people have been using it as a workaround for years.You'll also find a bunch of pages recommending using Firefox's equivalent about:config setting. This cat is already out of the bag.
Happy to help with implementation, but there are several strategies we've found have worked out well here - e.g. an explicit allowlist of port blocks that this policy is allowed to override, which are merged with the actual port block.
I can understand random advice on Stackoverflow, but I think you're underestimating the complexity tradeoff for Enterprises. Yes, individual users may do this, but the significance of an enterprise policy like you're proposing makes it very easy to do this for hundreds of thousands of users at once, and without any friction or visibility that it may be a bad idea. These policies then slowly accrete over time, creating not a Web Platform, but an Enterprise-Specific Platform, that makes it difficult to help push the web forward.