[TriLUG] nginx 2fa gateway ?

Igor Partola via TriLUG trilug at trilug.org
Tue May 30 07:57:24 EDT 2017


If you want to use something like TOTP and Google Authenticator, I don't believe there is a ready made thing for that. Technically it is very possible to do this without writing a bunch of C because nginx has a built in Lua interpreter that you can use to create a custom set of views which will facilitate setting this all up. Practically this sounds like way more work than it would be worth.

This is a case where I would turn to something like PHP or Django to handle authentication. You can then have nginx just verify that the user session is valid and serve all your content directly. It would require a bit of configuration wrangling but is probably the least effort solution that is also the most user friendly.

Igor


More information about the TriLUG mailing list