Page 1 of 1

Passing credentials through applescript

Posted: Fri Dec 15, 2017 11:54 am
by dzanot
My use of Viscosity includes multiple different VPN servers and a dynamic password for each. Because of the 2fa portion of the password I cannot use the stored credentials feature. Is there a way to tell Viscosity to connect to several connections with the credentials being passed in once, avoiding the login dialog?

Re: Passing credentials through applescript

Posted: Fri Dec 22, 2017 5:00 pm
by James
Hi dzanot,

I’m afraid there is no current method to dynamically feed a username and password to a Viscosity connection. However we’re hoping to add a feature in the future to allow a “Before Connect” script optionally return the login credentials to use.

I recommend adopting OpenVPN's “Challenge/Response Protocol” for requesting the OTP. This will allow you to seperate out the username/password and let Viscosity save them into the Keychain (to avoid the need to re-enter them when reconnecting). If you’re not in control over the OpenVPN server you may need to ask your IT administrator to switch to this (which is the recommended approach for two-factor auth).

The following forum post has some more information on how to use it:
https://www.sparklabs.com/forum/viewtop ... 1279#p3677

Additional information can also be found on the OpenVPN website:
https://openvpn.net/index.php/open-sour ... rface.html

Cheers,
James