[tor-bugs] #20542 [Metrics/CollecTor]: structure bridgedescs and modernize

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 3 11:19:43 UTC 2016


#20542: structure bridgedescs and modernize
-------------------------------+--------------------------
 Reporter:  iwakeh             |          Owner:  iwakeh
     Type:  enhancement        |         Status:  assigned
 Priority:  Medium             |      Milestone:
Component:  Metrics/CollecTor  |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:                     |  Actual Points:
Parent ID:  #20518             |         Points:
 Reviewer:                     |        Sponsor:
-------------------------------+--------------------------
Changes (by iwakeh):

 * status:  new => assigned
 * owner:   => iwakeh


Comment:

 Outline:

 The bridgedescs module
 1. reads descriptors supplied locally from a bridge auth (currently
 bifroest, formerly tonga, in future possibly more)
 1. verifies the auth-fingerprint
 1. parses and
 1. sanitizes the descriptors and
 1. adds them to the local storage
 1. keeping some statistics about the import.

 A `BridgeMain` class should be added to facilitate this process.
 The input tarballs need to be verified that they origin from a known and
 trusted authority.
 The (compressed) tarballs should be parsed using metrics-lib
 DescriptorReader.
 Each resulting Descriptor is sanitized by encapsulating it with
 `SanitizedBridge*Descriptor` extending `Bridge*Descriptor` (analogously to
 the `*Persistence` classes in o.t.c.persist package).
 These `SanitizedBridge*Descriptor`s can be written to the two storage
 location by using the appropriate `*Persistence` classes.

 `BridgeSnapshotReader` can be reduced to simply find all input tars in the
 given directory and after verifying the supplying authority provide a list
 of valid tar (possibly compressed) files.  It doesn't need to unpack or
 parse these files.

 Parsing is accomplished using metrics-lib `DescriptorReader`; the
 resulting Descriptors are sanitized and stored as described above.

 Thus, the two new classes `SanitizedBridgeServerDescriptor` and
 `SanitizedBridgeExtraInfoDescriptor` have to be implemented (cf.
 respective child tickets).  After that the processing logic can be
 assembled in `BridgeMain`.
 The 'stale descriptors check' (currently in SanitizedBridgesWriter) can be
 performed while processing the descriptors.


 What did I overlook?  What needs to be added?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20542#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list