tahoe-lafs/src/allmydata/storage
Brian Warner bc21726dfd new introducer: signed extensible dictionary-based messages! refs #466
This introduces new client and server halves to the Introducer (renaming the
old one with a _V1 suffix). Both have fallbacks to accomodate talking to a
different version: the publishing client switches on whether the server's
.get_version() advertises V2 support, the server switches on which
subscription method was invoked by the subscribing client.

The V2 protocol sends a three-tuple of (serialized announcement dictionary,
signature, pubkey) for each announcement. The V2 server dispatches messages
to subscribers according to the service-name, and throws errors for invalid
signatures, but does not otherwise examine the messages. The V2 receiver's
subscription callback will receive a (serverid, ann_dict) pair. The
'serverid' will be equal to the pubkey if all of the following are true:

  the originating client is V2, and was told a privkey to use
  the announcement went through a V2 server
  the signature is valid

If not, 'serverid' will be equal to the tubid portion of the announced FURL,
as was the case for V1 receivers.

Servers will create a keypair if one does not exist yet, stored in
private/server.privkey .

The signed announcement dictionary puts the server FURL in a key named
"anonymous-storage-FURL", which anticipates upcoming Accounting-related
changes in the server advertisements. It also provides a key named
"permutation-seed-base32" to tell clients what permutation seed to use. This
is computed at startup, using tubid if there are existing shares, otherwise
the pubkey, to retain share-order compatibility for existing servers.
2012-03-13 18:24:32 -07:00
..
__init__.py break storage.py into smaller pieces in storage/*.py . No behavioral changes. 2009-02-18 14:46:55 -07:00
common.py storage/immutable: raise a specific error upon seeing a bad version number, instead of using assert. Also wrap to 80cols. 2009-03-08 20:07:32 -07:00
crawler.py hush pyflakes-0.4.0 warnings: remove trivial unused variables. For #900. 2010-01-14 14:15:29 -08:00
expirer.py Change relative imports to absolute 2010-02-26 01:14:33 -07:00
immutable.py immutable: prevent clients from reading past the end of share data, which would allow them to learn the cancellation secret 2011-09-12 15:24:58 -07:00
lease.py storage: add a lease-checker-and-expirer crawler, plus web status page. 2009-03-06 22:45:17 -07:00
mutable.py storage: more paranoid handling of bounds and palimpsests in mutable share files 2011-09-12 15:26:55 -07:00
server.py new introducer: signed extensible dictionary-based messages! refs #466 2012-03-13 18:24:32 -07:00
shares.py Change relative imports to absolute 2010-02-26 01:14:33 -07:00