daml/libs-scala
Samir Talwar 9bdfbb0534
Avoid opening a server to the world when finding a free port. (#4683)
* Avoid opening a server to the world when finding a free port.

This is very annoying on macOS because we get a focus-stealing popup for
a split second, asking for permission to allow the server through the
firewall. The popup pretty much always disappears before it can even be
read, when the server is closed.

This is almost certainly not an attack vector, because:
  - we only do this in tests,
  - the server is open for only a few milliseconds,
  - nothing is served,
  - and finding the port is tricky, because it's effectively random.

Nevertheless, it's very annoying.

CHANGELOG_BEGIN
CHANGELOG_END

* Extract a Bazel package for finding free ports.

We seem to do it in 4 different places, which I think is enough to
remove the duplication.
2020-02-25 13:09:28 +00:00
..
auth-utils update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
contextualized-logging Add logging context information to ledger services (#4205) 2020-01-24 18:28:08 +00:00
direct-execution-context Replace NamedLoggerFactory (#4097) 2020-01-21 10:57:28 +01:00
grpc-utils update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
ports Avoid opening a server to the world when finding a free port. (#4683) 2020-02-25 13:09:28 +00:00
postgresql-testing Avoid opening a server to the world when finding a free port. (#4683) 2020-02-25 13:09:28 +00:00
resources Document and comment Resource and ResourceOwner. (#4651) 2020-02-21 14:56:00 +01:00
resources-akka Resource refactorings (#4382) 2020-02-04 17:20:24 +00:00
timer-utils ledger-on-posix-filesystem: Fix the tests on CI. (#4166) 2020-01-22 18:02:23 +01:00