Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion network.bs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ keys and values:
:: An alphanumeric, unguessable token consisting of characters from the set
`[A-Za-z0-9+/]`.

: sn
:: The [=certificate serial number=] of the advertising agent, encoded as a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the agent fingerprint insufficent for computing the agent hostname? I also don't see any other reference to TLS SNI in this file, and it's not entirely clear to me why we even need Server Name Indication for this protocol. Can you please provide some additional context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Been a while, from what I remember:

The serial number was introduced to solve #276. It is used as part of the subject name on the certificate. To keep connection logic as common as possible, I was also checking the subject name against the host being dialed. For the first-time dial I guess this could be seen as a bit if useless ceremony. For re-establishing a connection with a known (previous authenticated) certificate this does seems useful.
Regarding SNI: In a real browser setting I can imagine that you may want to use different connections per origin at some point (to ensure appropriate segregation). A different hostname is one way to represent that at the network level. SNI would allow doing this on one port. Also, it again keeps the use of TLS close to what is commonly done (which I think is an advantage because you can more easily use existing implementations).

base64 string according to [[!RFC4648]]. This is required for listening
agents to compute the [=agent hostname=] for TLS SNI.

Note: `at` prevents off-LAN parties from attempting authentication; see
[[#remote-active-mitigations]]. `at` should have at least 32 bits of true
entropy to make brute force attacks impractical.
Expand Down Expand Up @@ -613,7 +618,7 @@ considered public:

1. IP addresses and ports used by the Open Screen Network Protocol.
1. Data advertised through mDNS, including the display name prefix, the
certificate fingerprint and serial number, and the metadata version.
certificate fingerprint, certificate serial number, and the metadata version.

### Cross Origin State Considerations ### {#cross-origin-state}

Expand Down