[tor-bugs] #22207 [Metrics/CollecTor]: Add bridge authority fingerprint to sanitized bridge network statuses

2017-05-09 Thread Tor Bug Tracker & Wiki
#22207: Add bridge authority fingerprint to sanitized bridge network statuses
---+--
 Reporter:  karsten|  Owner:  metrics-team
 Type:  enhancement| Status:  new
 Priority:  Medium |  Milestone:
Component:  Metrics/CollecTor  |Version:
 Severity:  Normal |   Keywords:
Actual Points: |  Parent ID:
   Points: |   Reviewer:
  Sponsor: |
---+--
 When I looked through existing code that uses methods from
 `DescriptorFile` other than `DescriptorFile#getDescriptors()` for #22141,
 I spotted [https://gitweb.torproject.org/metrics-
 
web.git/tree/modules/legacy/src/main/java/org/torproject/ernie/cron/network/ConsensusStatsFileHandler.java#n205
 this code in metrics-web]:

 {{{
   if (descriptorFile.getFileName().contains(
   "4A0CCD2DDC7995083D73F5D667100C8A5831F16D")) {
 authority = "Tonga";
   } else if (descriptorFile.getFileName().contains(
   "1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1")) {
 authority = "Bifroest";
   }
 }}}

 Not beautiful, I know, but that's not the point.  The point is that we
 need to parse the bridge authority fingerprint from the file name, because
 it's not contained in the descriptor itself.  That seems bad, and
 relatively easy to fix.

 Right now, the header of a sanitized bridge network status looks like
 this:

 {{{
 @type bridge-network-status 1.1
 published 2017-05-09 07:57:32
 flag-thresholds stable-uptime=1075980 stable-mtbf=2384868 fast-speed=21000
 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=318000 guard-bw-exc-
 exits=318000 enough-mtbf=1 ignoring-advertised-bws=0
 }}}

 We could easily include a "fingerprint" line there, like this:

 {{{
 @type bridge-network-status 1.2
 published 2017-05-09 07:57:32
 flag-thresholds stable-uptime=1075980 stable-mtbf=2384868 fast-speed=21000
 guard-wfu=98.000% guard-tk=691200 guard-bw-inc-exits=318000 guard-bw-exc-
 exits=318000 enough-mtbf=1 ignoring-advertised-bws=0
 fingerprint 1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1
 }}}

 Ideally, we'd modify the bridge authority code to include this line, too,
 and then go through archived bridge network statuses and retroactively put
 it in.

 This is somewhat related to #12951 when we added a `"published"` line to
 bridge network statuses in a similar way.

 I'm copying isis to hear what they think about putting in a
 `"fingerprint"` line.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #22207 [Metrics/CollecTor]: Add bridge authority fingerprint to sanitized bridge network statuses

2017-05-14 Thread Tor Bug Tracker & Wiki
#22207: Add bridge authority fingerprint to sanitized bridge network statuses
---+--
 Reporter:  karsten|  Owner:  metrics-team
 Type:  enhancement| Status:  new
 Priority:  Medium |  Milestone:
Component:  Metrics/CollecTor  |Version:
 Severity:  Normal | Resolution:
 Keywords:  intro  |  Actual Points:
Parent ID: | Points:
 Reviewer: |Sponsor:
---+--
Changes (by isis):

 * keywords:   => intro


Comment:

 Replying to [ticket:22207 karsten]:
 > I'm copying isis to hear what they think about putting in a
 `"fingerprint"` line.

 Sounds good to me!  Generally, I'm against sticking extra things in
 descriptors, but this is small and it's definitely better than doing hacky
 things with filenaming.

 Tagging this as 'intro' since it should be a relatively easy patch for a
 newcomer! :)  See the changes to `src/or/networkstatus.c` for #12951 in
 commit `1431bc22f6d3287a7aac73567b27a40ed963cb6c` (as Karsten mentioned)
 for adding a new line to the networkstatus file.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs