db-less authentication

L2met has a multi-user mode. Multi-user is activated when $LIBRATO_USER and $LIBRATO_TOKEN are not present in the environment. When in multi-user mode, logs are delivered to l2met using a uuid. This uuid must correspond to a set of librato credentials that are currently being stored in a PG database. This is bad for a variety of reason, the least of which is that we depend on a PG solely for this purpose and the current l2met implementation treats PG as a SPOF. Thus we are motivated to serve mutliple librato accounts with a single l2met while not storing credentials or relying on a PG database.

Db-less authentication is the best proposed solution. It assumes that the librato credentials are provided in the HTTP request header of incoming logs. Logs are commonly delivered to l2met via log-shuttle or logplex, both of these transports requires a URL to which the logs will be delivered. This is where the librato credentials will live.

In addition to having librato credentials in the HTTP basic authentication header, we will also  encrypt and sign the librato credentials. Thus knowing a shared secret is required in order to send data to l2met. If we are unable to verify and decrypt the authentication, we drop the HTTP request.