Sep
02
2014
Dockerfile for Two-Factor Authentication

Most of the people that read this blog post should already know what Two-Factor Authentication is.

For those you don’t, in short terms 2FA is when you can login to a server/site/application using two things and not only one (your password).
Something you have and something you know, like when using your bank card (something you have) with it’s pin (something you know).

There are three (3) android apps at f-droid

  • Google Authenticator
  • FreeOTP
  • Gort

I dont want to use the google authenticator, and i havent yet tested FreeOTP, so i’ve chosen Gort to write about.
Gort is using the barada-pam package as the back-end.

Barada/Gort are based on HMAC-Based One-Time Password Algorithm and not on time sync. This is useful if the clocks are drift and the server (barada) can “catch” one-time passwords even if the counter is out-of-sync by a little.

I ‘ve built a Docker image to show barada/gort on the next Security Talk at Athens,Greece Hackerspace and below is the link on my wiki that contains the Dockerfile.

Be aware on the notes/comments on the file.