[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #14846 [Tor]: Controller: retrieve an HS descriptor of a service run by a user



#14846: Controller: retrieve an HS descriptor of a service run by a user
-------------------------+-------------------------------------------------
     Reporter:  dgoulet  |      Owner:  donncha
         Type:           |     Status:  needs_revision
  enhancement            |  Milestone:  Tor: 0.2.7.x-final
     Priority:  trivial  |    Version:  Tor: 0.2.7
    Component:  Tor      |   Keywords:  SponsorR, tor-hs, controller,
   Resolution:           |  027-triaged-1-in, SponsorS, TorCoreTeam201508
Actual Points:           |  Parent ID:  #3521
       Points:  small    |
-------------------------+-------------------------------------------------

Comment (by nickm):

 Replying to [comment:20 donncha]:
 > Replying to [comment:18 nickm]:>
 >
 > Thank you for the feedback
 >
 > > Overall notes:
 > >   * It makes me a little bit nervous to have a single function to
 handle server-side and client-side lookups.
 >
 > Should I revert to having separate
 `rend_cache_lookup_v2_desc_as_service()` and `rend_cache_lookup_entry()`
 functions? Alternatively I could add an assert for the cache type and
 require explicit specification of the cache  rather than defaulting to the
 client cache. This should reduce the risk of information leaks between the
 client and service-side cache.

 That might be good.  It's okay if they share code, but what I'm really
 concerned about is accidental API misuse.

 > >   * I think we should name the "service cache" to make it clear that
 it's our own descriptors we're asking about.
 >
 > I'll rename it to `rend_cache_local_service`.

 Sounds fine!

 > >   * rend_cache_store_v2_desc_as_service() appears to be mostly
 duplicate code from rend_desc_cache_store_v2_desc_as_client().  Duplicate
 code usually indicates an opportunity for a function.
 >
 > I'm don't think sharing code between
 `rend_cache_store_v2_desc_as_service()` and
 `rend_desc_cache_store_v2_desc_as_client()` would result in cleaner code.
 The client function needs to do validation based on the client's rend
 query.  It also parses the descriptor's introduction points unlike
 `rend_cache_store_v2_desc_as_service()`.

 Hmm.  Possibly?  Let's just open a new ticket once this is merged to
 return to the question.

 > >   * I wonder if this will conflict with any of dgoulet's patches for
 #16389.
 >
 > I'll rebase on #16389 which is now merged in master.

 Thanks!

 > >   * Does anything ever expire entries from rend_cache_service, or do
 they stick around forever?  (Currently this is handled for the other cache
 in rend_cache_clean.)
 >
 > I'll add a rend_cache_type argument to `rend_cache_clean()` and then
 clean `rend_cache_service` when the client cache is cleaned.

 Sounds good!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14846#comment:21>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs