There's a situation I've run into that I'd love to see a small improvement on. It takes a little to describe, so please be patient and ask for clarification if I'm unclear...
I'm using DuoSecurity for two-factor auth with OpenVPN/TunnelBlick. Following the guidelines at
https://www.duosecurity.com/docs/openvpn I have added the plugin line to the server config. Initially, I also added auth-user-pass to the client config, which pulls up a prompt for the username and password to be sent to the server (and auth-nocache and reneg-sec 0 to the client). The username is always ignored by the server's plugin, as it uses the certificate's common name (CN) instead.
The password can be either "sms", "push", a TOTP presented by the companion phone app, or a HOTP received via sms. The password could also be an empty string, which defaults to the method set via the web-based admin panel for the user (eg. "push" in my case). At least that's what I believe, as I'm unable to send an empty string via TunnelBlick as long as auth-user-pass is in the client config..
I am currently using an alternate config where I add auth-user-pass-optional to the server config and remove auth-user-pass in the client config. The server still does not use the username, and being that the client doesn't send a password (or perhaps does, but sends an empty string?), it uses my default method of "push", as described at the bottom of the FAQ at
https://duo.com/docs/openvpn-faq.
I'd like to still use auth-user-pass in the client config, as that would allow me to enter a OTP if push isn't working. However, it's annoying to have to enter a dummy entry in the username and "push" in the password when I'm not using a OTP, as that's the way I use it most of the time. The problem is, if I don't put something in both of those fields, I get an error dialog from Tunnelblick saying they are required. If I save them to my keyring, I don't get the option to enter something else before it connects. It would be nice if TunnelBlick could be configured to:
1) allow empty passwords (accept and send an empty string),
2) allow empty usernames, or perhaps not even prompt for a username at all, and
3) optionally not allow saving credentials to the keychain (grey out or remove the checkbox) since OTPs shouldn't be reused.
If I were presented with just an optional password field with these changes implemented, I could simply hit enter to use the default method, enter another method such as "sms", or enter an OTP for alternate authentication. Also, since the password is a OTP, saving to the keychain doesn't make sense, so having that option presented is just clutter. Same with the username if the server just ignores it anyway in favor of the CN.
What do you think of those changes? Do you think they would help make at least some multi-factor auth plugins easier to manage?
On a side note, I'm trying to understand the use of VPN Credentials under Advanced Settings of a configuration's details. Admittedly, I don't plan on storing my credentials in a keychain, primarily because I'm using OTPs that are never the same. I'm also the only user of my macbook. Is there a good howto or faq that describes how named credentials are used and when named vs. common credentials would be appropriate?
Thanks!
--
Pete