``` Filename: 122-unnamed-flag.txt Title: Network status entries need a new Unnamed flag Author: Roger Dingledine Created: 04-Oct-2007 Status: Closed Implemented-In: 0.2.0.x 1. Overview: Tor's directory authorities can give certain servers a "Named" flag in the network-status entry, when they want to bind that nickname to that identity key. This allows clients to specify a nickname rather than an identity fingerprint and still be certain they're getting the "right" server. As dir-spec.txt describes it, Name X is bound to identity Y if at least one binding directory lists it, and no directory binds X to some other Y'. In practice, clients can refer to servers by nickname whether they are Named or not; if they refer to nicknames that aren't Named, a complaint shows up in the log asking them to use the identity key in the future --- but it still works. The problem? Imagine a Tor server with nickname Bob. Bob and his identity fingerprint are registered in tor26's approved-routers file, but none of the other authorities registered him. Imagine there are several other unregistered servers also with nickname Bob ("the imposters"). While Bob is online, all is well: a) tor26 gives a Named flag to the real one, and refuses to list the other ones; and b) the other authorities list the imposters but don't give them a Named flag. Clients who have all the network-statuses can compute which one is the real Bob. But when the real Bob disappears and his descriptor expires? tor26 continues to refuse to list any of the imposters, and the other authorities continue to list the imposters. Clients don't have any idea that there exists a Named Bob, so they can ask for server Bob and get one of the imposters. (A warning will also appear in their log, but so what.) 2. The stopgap solution: tor26 should start accepting and listing the imposters, but it should assign them a new flag: "Unnamed". This would produce three cases in terms of assigning flags in the consensus networkstatus: i) a router gets the Named flag in the v3 networkstatus if a) it's the only router with that nickname that has the Named flag out of all the votes, and b) no vote lists it as Unnamed else, ii) a router gets the Unnamed flag if a) some vote lists a different router with that nickname as Named, or b) at least one vote lists it as Unnamed, or c) there are other routers with the same nickname that are Unnamed else, iii) the router neither gets a Named nor an Unnamed flag. (This whole proposal is meant only for v3 dir flags; we shouldn't try to backport it to the v2 dir world.) Then client behavior is: a) If there's a Bob with a Named flag, pick that one. else b) If the Bobs don't have the Unnamed flag (notice that they should either all have it, or none), pick one of them and warn. else c) They all have the Unnamed flag -- no router found. 3. Problems not solved by this stopgap: 3.1. Naming authorities can go offline. If tor26 is the only authority that provides a binding for Bob, when tor26 goes offline we're back in our previous situation -- the imposters can be referenced with a mere ignorable warning in the client's log. If some other authority Names a different Bob, and tor26 goes offline, then that other Bob becomes the unique Named Bob. So be it. We should try to solve these one day, but there's no clear way to do it that doesn't destroy usability in other ways, and if we want to get the Unnamed flag into v3 network statuses we should add it soon. 3.2. V3 dir spec magnifies brief discrepancies. Another point to notice is if tor26 names Bob(1), doesn't know about Bob(2), but moria lists Bob(2). Then Bob(2) doesn't get an Unnamed flag even if it should (and Bob(1) is not around). Right now, in v2 dirs, the case where an authority doesn't know about a server but the other authorities do know is rare. That's because authorities periodically ask for other networkstatuses and then fetch descriptors that are missing. With v3, if that window occurs at the wrong time, it is extended for the entire period. We could solve this by making the voting more complex, but that doesn't seem worth it. [3.3. Tor26 is only one tor26. We need more naming authorities, possibly with some kind of auto-naming feature. This is out-of-scope for this proposal -NM] 4. Changes to the v2 directory Previously, v2 authorities that had a binding for a server named Bob did not list any other server named Bob. This will change too: Version 2 authorities will start listing all routers they know about, whether they conflict with a name-binding or not: Servers for which this authority has a binding will continue to be marked Named, additionally all other servers of that nickname will be listed without the Named flag (i.e. there will be no Unnamed flag in v2 status documents). Clients already should handle having a named Bob alongside unnamed Bobs correctly, and having the unnamed Bobs in the status file even without the named server is no worse than the current status quo where clients learn about those servers from other authorities. The benefit of this is that an authority's opinion on a server like Guard, Stable, Fast etc. can now be learned by clients even if that specific authority has reserved that server's name for somebody else. 5. Other benefits: This new flag will allow people to operate servers that happen to have the same nickname as somebody who registered their server two years ago and left soon after. Right now there are dozens of nicknames that are registered on all three binding directory authorities, yet haven't been running for years. While it's bad that these nicknames are effectively blacklisted from the network, the really bad part is that this logic is really unintuitive to prospective new server operators. ```