First hack at x509 auth

Posting this mostly for comments.  I haven't looked at writing the required tests yet.