chiark / gitweb /
rename "password" to "secret" everywhere
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 25 Apr 2017 13:50:01 +0000 (14:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 25 Apr 2017 13:50:01 +0000 (14:50 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
PROTOCOL
README.config
debian/hippotat.postinst
hippotat
hippotatd
hippotatlib/__init__.py
sgo-demo.cfg
simple.cfg
test.cfg

index cf6eacfc554a034c2e663f78945af7c4942220f6..4e07db163296421c402714f8858a0059a1e5725a 100644 (file)
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -8,7 +8,7 @@ from the queue and returns them as the POST response body payload
 Each incoming request contains up to max_batch_up bytes of payload.
 It's a multipart/form-data.
 
 Each incoming request contains up to max_batch_up bytes of payload.
 It's a multipart/form-data.
 
-Authentication: for now, plaintext password
+Authentication: for now, plaintext secret
 
 Routing assistance: none in hippotat; can be requested on client
  from userv-ipif via `vroutes' parameter.  Use with secnet polypath
 
 Routing assistance: none in hippotat; can be requested on client
  from userv-ipif via `vroutes' parameter.  Use with secnet polypath
index 2b58512eaaedad3677c9c24934a232011d3440a6..a9d36d72a85907c2f808f67fb8443bf17753e215 100644 (file)
@@ -21,7 +21,7 @@ Exceptional settings:
      Used by server to select the appropriate parts of the
      rest of the configuration.  Ignored by the client.
 
      Used by server to select the appropriate parts of the
      rest of the configuration.  Ignored by the client.
 
-  password
+  secret
      Looked up in the usual way, but used by client and server to
      determine which possible peerings to try to set up, and which to
      ignore.
      Looked up in the usual way, but used by client and server to
      determine which possible peerings to try to set up, and which to
      ignore.
@@ -32,11 +32,11 @@ Exceptional settings:
      (LIMIT sections do not count.)
 
      The server queue packets for, and accept requests from, each
      (LIMIT sections do not count.)
 
      The server queue packets for, and accept requests from, each
-     putative client for which the config search yields a password.
+     putative client for which the config search yields a secret.
 
      Each client will create a local interface, and try to communicate
      with the server, for each possible pair (putative server,
 
      Each client will create a local interface, and try to communicate
      with the server, for each possible pair (putative server,
-     putative client) for which the config search yields a password.
+     putative client) for which the config search yields a secret.
 
   ipif
      Command to run to create and communicate with local network
 
   ipif
      Command to run to create and communicate with local network
index 7954152e0e932636eba076e3b340ca5e1e772962..9419eea849c781d1723a56ee6b133ab8612604d3 100644 (file)
@@ -6,7 +6,7 @@ adduser --system --group --force-badname --shell=/bin/bash \
 
 umask 077
 
 
 umask 077
 
-pd=/etc/hippotat/passwords.d
+pd=/etc/hippotat/secrets.d
 test -d $pd || \
 install -m 750 -o root -g Debian-hippotat -d $pd
 
 test -d $pd || \
 install -m 750 -o root -g Debian-hippotat -d $pd
 
index 248538e7c422e1c1b502ddcadf5d40e24164c630..56e3e458daaa77a5ff7f5cedfd8ad1588792b6fa 100755 (executable)
--- a/hippotat
+++ b/hippotat
@@ -191,7 +191,7 @@ class Client():
               b'Content-Type: text/plain; charset="utf-8"'  + crlf +
               b'Content-Disposition: form-data; name="m"'   + crlf + crlf +
               str(cl.c.client)            .encode('ascii')  + crlf +
               b'Content-Type: text/plain; charset="utf-8"'  + crlf +
               b'Content-Disposition: form-data; name="m"'   + crlf + crlf +
               str(cl.c.client)            .encode('ascii')  + crlf +
-              cl.c.password                                 + crlf +
+              cl.c.secret                                   + crlf +
               str(cl.c.target_requests_outstanding)
                                           .encode('ascii')  + crlf +
               str(cl.c.http_timeout)      .encode('ascii')  + crlf +
               str(cl.c.target_requests_outstanding)
                                           .encode('ascii')  + crlf +
               str(cl.c.http_timeout)      .encode('ascii')  + crlf +
index 8fb0e0c7333163366050e2633ecff42e36be06ee..bbc866618e37011cdebc101ec620878bd9ea1b67 100755 (executable)
--- a/hippotatd
+++ b/hippotatd
@@ -182,7 +182,7 @@ def process_request(request, desca):
   ci = ipaddr(ci_s)
   desca['ci'] = ci
   cl = clients[ci]
   ci = ipaddr(ci_s)
   desca['ci'] = ci
   cl = clients[ci]
-  if pw != cl.cc.password: raise ValueError('bad password')
+  if pw != cl.cc.secret: raise ValueError('bad secret')
   desca['pwok']=True
 
   if tro != cl.cc.target_requests_outstanding:
   desca['pwok']=True
 
   if tro != cl.cc.target_requests_outstanding:
index 9b2c33db0aa2efce154855281cc9c21edd6b4fc1..282266c009651b004ec940f7b79aac2b84f5c3c7 100644 (file)
@@ -157,7 +157,7 @@ vvnetwork = 172.24.230.192
 
 
 # [<client-ip4-or-ipv6-address>]
 
 
 # [<client-ip4-or-ipv6-address>]
-# password = <password>    # used by both, must match
+# secret = <secret>    # used by both, must match
 
 [LIMIT]
 max_batch_down = 262144
 
 [LIMIT]
 max_batch_down = 262144
@@ -521,7 +521,7 @@ def cfg_process_client_limited(cc,ss,sections,key):
   cc.__dict__[key] = min(val,lim)
 
 def cfg_process_client_common(cc,ss,cs,ci):
   cc.__dict__[key] = min(val,lim)
 
 def cfg_process_client_common(cc,ss,cs,ci):
-  # returns sections to search in, iff password is defined, otherwise None
+  # returns sections to search in, iff secret is defined, otherwise None
   cc.ci = ci
 
   sections = ['%s %s' % (ss,cs),
   cc.ci = ci
 
   sections = ['%s %s' % (ss,cs),
@@ -529,11 +529,11 @@ def cfg_process_client_common(cc,ss,cs,ci):
               ss,
               'COMMON']
 
               ss,
               'COMMON']
 
-  try: pwsection = cfg_search_section('password', sections)
+  try: pwsection = cfg_search_section('secret', sections)
   except NoOptionError: return None
     
   except NoOptionError: return None
     
-  pw = cfg1get(pwsection, 'password')
-  cc.password = pw.encode('utf-8')
+  pw = cfg1get(pwsection, 'secret')
+  cc.secret = pw.encode('utf-8')
 
   cfg_process_client_limited(cc,ss,sections,'target_requests_outstanding')
   cfg_process_client_limited(cc,ss,sections,'http_timeout')
 
   cfg_process_client_limited(cc,ss,sections,'target_requests_outstanding')
   cfg_process_client_limited(cc,ss,sections,'http_timeout')
@@ -607,7 +607,7 @@ def common_startup(process_cfg):
 
   def read_defconfig():
     readconfig('/etc/hippotat/config.d', False)
 
   def read_defconfig():
     readconfig('/etc/hippotat/config.d', False)
-    readconfig('/etc/hippotat/passwords.d', False)
+    readconfig('/etc/hippotat/secrets.d', False)
     readconfig('/etc/hippotat/master.cfg',   False)
 
   def oc_defconfig(od,os, value, op):
     readconfig('/etc/hippotat/master.cfg',   False)
 
   def oc_defconfig(od,os, value, op):
index 7dca241a7de5ce3ca91d61b17f54a18801aef766..381f0046c46b1e6bd3e29b27d7786dea553458dc 100644 (file)
@@ -33,9 +33,9 @@ max_batch_down = 32768
 [SERVER]
 server = chiark
 
 [SERVER]
 server = chiark
 
-# -- in   passwords.d/chiark-zealot   (on zealot and chiark)
+# -- in   secrets.d/chiark-zealot   (on zealot and chiark)
 [chiark 192.0.2.4]
 [chiark 192.0.2.4]
-password = sesame
+secret = sesame
 
 # zealot knows it's 192.0.2.4 because that's the only client
 
 # zealot knows it's 192.0.2.4 because that's the only client
-# for which it has a password
+# for which it has a secret
index 3348e8e1c0c1b96f9110421328beba7d6581f01b..5406f5d7615b8dcd1e0cb5c1fdde7723dbaac966 100644 (file)
@@ -2,6 +2,6 @@
 [SERVER]
 addrs = 203.0.113.46
 
 [SERVER]
 addrs = 203.0.113.46
 
-# -- in  passwords.d/password (on both client and server)
+# -- in  secrets.d/secret (on both client and server)
 [172.24.230.195]
 [172.24.230.195]
-password = sesame
+secret = sesame
index d44a090f7f23991c72d224d363dbb08dbc6e45f8..9cc92d9d133c2e28a9e49ed65c9fefd5bb932a7f 100644 (file)
--- a/test.cfg
+++ b/test.cfg
@@ -11,7 +11,7 @@ vnetwork = 192.0.2.0/24
 # nc -n -v -l -p 8100 -c 'dd of=/dev/null'
 
 [192.0.2.3]
 # nc -n -v -l -p 8100 -c 'dd of=/dev/null'
 
 [192.0.2.3]
-password = sesame
+secret = sesame
 
 [192.0.2.3]
 ipif = PATH=/usr/local/sbin:/sbin:/usr/sbin:$PATH really ./fake-userv /home/ian/things/Userv/userv-utils.git/ipif/service \* -- %(local)s,%(peer)s,%(mtu)s,slip '%(rnets)s'
 
 [192.0.2.3]
 ipif = PATH=/usr/local/sbin:/sbin:/usr/sbin:$PATH really ./fake-userv /home/ian/things/Userv/userv-utils.git/ipif/service \* -- %(local)s,%(peer)s,%(mtu)s,slip '%(rnets)s'
@@ -19,6 +19,6 @@ ipif = PATH=/usr/local/sbin:/sbin:/usr/sbin:$PATH really ./fake-userv /home/ian/
 # ./hippotat -D -c test.cfg
 
 [192.0.2.4]
 # ./hippotat -D -c test.cfg
 
 [192.0.2.4]
-#password = zorkmids
+#secret = zorkmids
 
 # dd if=/dev/urandom bs=1024 count=16384 | nc -q 0 -n -v 192.0.2.1 8100
 
 # dd if=/dev/urandom bs=1024 count=16384 | nc -q 0 -n -v 192.0.2.1 8100