diff options
author | Peter Palfrader <peter@palfrader.org> | 2007-10-27 20:44:48 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2007-10-27 20:44:48 +0000 |
commit | 8cf949a26cffbe9604b5611fb20b9329ec3b2b53 (patch) | |
tree | 2ec202ea6144960c75235a9aaf4530c948f1105f /contrib/auto-naming | |
parent | 5e6fc79a8893e002cf718d042c86354c908a3d44 (diff) | |
download | tor-8cf949a26cffbe9604b5611fb20b9329ec3b2b53.tar.gz tor-8cf949a26cffbe9604b5611fb20b9329ec3b2b53.zip |
Add a README and copyright statements
svn:r12233
Diffstat (limited to 'contrib/auto-naming')
-rw-r--r-- | contrib/auto-naming/README | 65 | ||||
-rwxr-xr-x | contrib/auto-naming/build-approved-routers | 23 | ||||
-rw-r--r-- | contrib/auto-naming/create-db.sql | 21 | ||||
-rw-r--r-- | contrib/auto-naming/db.rb | 20 | ||||
-rwxr-xr-x | contrib/auto-naming/process-consensus | 25 | ||||
-rwxr-xr-x | contrib/auto-naming/update-named-status.rb | 22 |
6 files changed, 176 insertions, 0 deletions
diff --git a/contrib/auto-naming/README b/contrib/auto-naming/README new file mode 100644 index 0000000000..bf0bfd7e04 --- /dev/null +++ b/contrib/auto-naming/README @@ -0,0 +1,65 @@ +=== AUTONAMING FOR TOR === + +Tor directory authorities may maintain a binding of server identities +(their long term identity key) and nicknames. In their status documents +they may for each router they know tell if this is indeed the owner of +that nickname or not. + +This toolset allows automatic maintaining of a binding list of nicknames +to identity keys, implementing Tor proposal 123[1]. + +The rules are simple: + - A router claiming to be Bob is named (i.e. added to the binding list) + if there currently does not exist a different binding for that + nickname, the router has been around for a bit (2 weeks), no other + router has used that nickname in a while (1 month). + - A binding is removed if the server that owns it has not been seen + in a long time (6 months). + + +=== REQUIREMENTS === + + * ruby, and its postgres DBI interface (Debian packages: ruby, ruby1.8, libdbi-ruby1.8, libdbd-pg-ruby1.8) + * postgres (tested with >= 8.1) + * cron + +=== SETUP === + + * copy this tree some place, like into a 'auto-naming' directory in your Tor's + data directory + * create a database and a user, modifying db-config.rb accordingly + * initialize the database by executing the sql statements in create-db.sql + * setup a cronjob that feeds the current consensus to the process-consensus + script regularly. + * once the database is sufficiently populated, maybe a month or so after the + previous step, setup a cronjob to regularly build the binding list using + the build-approved-routers script. You probably want to append a manually + manged list of rejections to that file and give it to tor as its + "approved-routers" file. + The Sample-Makefile and Sample-crontab demonstrate the method used at tor26. + + +1. https://tor-svn.freehaven.net/svn/tor/trunk/doc/spec/proposals/123-autonaming.txt + + + + +Copyright (c) 2007 Peter Palfrader + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/contrib/auto-naming/build-approved-routers b/contrib/auto-naming/build-approved-routers index c56dac5f68..4bbf8e7795 100755 --- a/contrib/auto-naming/build-approved-routers +++ b/contrib/auto-naming/build-approved-routers @@ -1,5 +1,28 @@ #!/usr/bin/ruby +# build-approved-routers - create a name-binding list for use at a Tor +# directory authority +# +# Copyright (c) 2007 Peter Palfrader +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + require "yaml" require 'db' diff --git a/contrib/auto-naming/create-db.sql b/contrib/auto-naming/create-db.sql index 6377be3ea6..86e3e63911 100644 --- a/contrib/auto-naming/create-db.sql +++ b/contrib/auto-naming/create-db.sql @@ -27,3 +27,24 @@ CREATE INDEX router_claims_nickname_router_id ON router_claims_nickname(router_i CREATE INDEX router_claims_nickname_nickname_id ON router_claims_nickname(nickname_id); CREATE INDEX router_claims_nickname_first_seen ON router_claims_nickname(first_seen); CREATE INDEX router_claims_nickname_last_seen ON router_claims_nickname(last_seen); + + +-- Copyright (c) 2007 Peter Palfrader +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the "Software"), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +-- copies of the Software, and to permit persons to whom the Software is +-- furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. diff --git a/contrib/auto-naming/db.rb b/contrib/auto-naming/db.rb index 706e81c391..b57724acdd 100644 --- a/contrib/auto-naming/db.rb +++ b/contrib/auto-naming/db.rb @@ -1,5 +1,25 @@ #!/usr/bin/ruby +# Copyright (c) 2006, 2007 Peter Palfrader +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + require "dbi" class WeaselDbQueryHandle diff --git a/contrib/auto-naming/process-consensus b/contrib/auto-naming/process-consensus index ed45634c2e..2c8b481f5d 100755 --- a/contrib/auto-naming/process-consensus +++ b/contrib/auto-naming/process-consensus @@ -1,5 +1,30 @@ #!/usr/bin/ruby +# process-consensus - read a current consensus document, inserting the +# information into a database then calling +# update-named-status.rb to update the name-binding +# flags +# +# Copyright (c) 2007 Peter Palfrader +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + require "yaml" require 'db' diff --git a/contrib/auto-naming/update-named-status.rb b/contrib/auto-naming/update-named-status.rb index ad06f919cb..b4d1b2d612 100755 --- a/contrib/auto-naming/update-named-status.rb +++ b/contrib/auto-naming/update-named-status.rb @@ -1,5 +1,27 @@ #!/usr/bin/ruby +# update-named-status.rb - update the named status of routers in our database +# +# Copyright (c) 2007 Peter Palfrader +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + require "yaml" require 'db' |