title: Adding authentication to beanstalkd from Python (or any UNIX) client
body: <p>So what I like about beanstalkd: small, lightweight, has priorities for messages, has a great set of clients, easy to use. </p>
  
  <p>What I dislike about beanstalkd: the lack of authentication menaing if you can connect to the port you can insert messages into it. </p>
  
  <p>So my thoughts are to either firewall it to trusted systems (which is a pain to maintain and external to the application adding another layer of stuff to do) or to wrap it in TLS/SSL using something like <a href="http://www.stunnel.org/" rel="nofollow noreferrer">stunnel</a> (which will incur a good chunk of overhead with respect to establishing connections and whatnot). I did think of maybe signing jobs (MD5 or SHA of job string+time value+secret appended to the job), but if an attacker were to flood the server with bogus jobs I'd still be in trouble. <strong>Can anyone think of any other methods to secure the beanstalkd against insertion of bogus messages from an attacker?</strong> Especially those that don't incur a lot of overhead computationally or administratively. </p>