Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] OpenVPN with OTP and Challenge/Response #3290

Closed
2 tasks done
tbandixen opened this issue Mar 6, 2019 · 24 comments
Closed
2 tasks done

[feature request] OpenVPN with OTP and Challenge/Response #3290

tbandixen opened this issue Mar 6, 2019 · 24 comments
Assignees
Labels
feature Adding new functionality
Milestone

Comments

@tbandixen
Copy link
Contributor

tbandixen commented Mar 6, 2019

Is your feature request related to a problem? Please describe.
The OpenVPN client has a nice option to add a challenge/response input box to enter a OTP, however I can't figure out how this should work in OPNsense.

I configured OpenVPN with google authenticator (which works great), but it requires to enter the number in combination with the password.

Describe the solution you'd like
I feel it would be much more user friendly if we could use the "static-challenge" option in the client.

image

Additional context
Just setting the static-challenge option in the client gives a "SIGUSR1[soft,auth-failure] received, process restarting".

The thread was opened by olivierfaber in the forum.
I just ported it to github, that we can discuss thing a bit nearer to the code 😄

@tbandixen tbandixen changed the title OpenVPN with OTP and static-challenge [feature request] OpenVPN with OTP and static-challenge Mar 6, 2019
@tbandixen
Copy link
Contributor Author

The Viscosity Client has this nice feature too.
By setting static-challenge "Please enter your OTP code" 1 in the client settings you'll get this nice window after you entered your credentials.
image

I dont know yet, what needs to be changed server side. I'm totaly new in the OpenVPN topic.

@tbandixen tbandixen changed the title [feature request] OpenVPN with OTP and static-challenge [feature request] OpenVPN with OTP and Challenge/Response Mar 6, 2019
@AdSchellevis
Copy link
Member

looks doable, it seems to encode the password differently when set:

SCRV1:dGVzdA==:OTk5OTk5OTk5OQ==

is the equivalent for password test token 9999999999

@AdSchellevis AdSchellevis self-assigned this Mar 6, 2019
@tbandixen
Copy link
Contributor Author

@AdSchellevis
Copy link
Member

yes, it seems so, specifically this:

password "Auth" "SCRV1:<password_base64>:<response_base64>"

@tbandixen
Copy link
Contributor Author

With this request, I hope that I can save my credentials in the vpn client and only have to enter the OTP...

@AdSchellevis
Copy link
Member

There will be one limitation, it won't support "reverse token order"
image

Eventually this plugin should be detached from the configuration, so I don't want to add extra knobs and switches in now.

@tbandixen
Copy link
Contributor Author

tbandixen commented Mar 6, 2019

I think there would be one extra knob, "Use seperate OTP window" (then the reverse token order should be disabled).

@AdSchellevis
Copy link
Member

it's a client setting only

@tbandixen
Copy link
Contributor Author

Really? Oh ok. But does the current auth code works? How can I test this?

@AdSchellevis
Copy link
Member

patience....

@tbandixen
Copy link
Contributor Author

Sorry 😄

@AdSchellevis
Copy link
Member

opnsense-patch 2c2eca7 

will do the trick

@tbandixen
Copy link
Contributor Author

It does the trick, but as you said, the limitation is that "Reverse token order" isn't selected.
And saving the credentials now works 😄

@AdSchellevis
Copy link
Member

we might lift that limitation when working on #3266

@AdSchellevis
Copy link
Member

@tbandixen It might be good to review and update our docs (https://github.com/opnsense/docs), if you would like to contribute on it that would be highly appreciated.

@fichtner fichtner added the feature Adding new functionality label Mar 6, 2019
@fichtner fichtner added this to the 19.7 milestone Mar 6, 2019
@tbandixen
Copy link
Contributor Author

Thank you for your quick interaction. I will definately have a look. Do you have a recommended hard-/software setup to test and maybe develop on the opnsense/core repo? I have a spare notebook...

@tbandixen
Copy link
Contributor Author

Do you have a recommended hard-/software setup to test and maybe develop on the opnsense/core repo? I have a spare notebook...

I think https://github.com/opnsense/tools would be it, right?

@AdSchellevis
Copy link
Member

you should be able to compile the docs with the steps described here https://github.com/opnsense/docs

Thanks in advance!

@fichtner
Copy link
Member

fichtner commented Mar 6, 2019

For core work set up a VM with OPNsense 19.1, change to development mode and update, then log into the console:

# opnsense-code core
# cd /usr/core
(edit files)
# make upgrade

@tbandixen
Copy link
Contributor Author

Thank you, I will try both.

@tbandixen
Copy link
Contributor Author

tbandixen commented Mar 13, 2019

When will the patch be included in the releases? 19.1.3 und 19.1.4 didn't include the patch.
Works as expected with my setup (Windows 10, Viscosity Client 1.7.14 (1595))

It would be nice if the "Custom config" would be persisted, but there is another request open (I think?)

@AdSchellevis
Copy link
Member

@tbandixen probably next version, I'll take a look at the custom config, kind of missed that one

@AdSchellevis
Copy link
Member

@tbandixen 24c5c67 is the custom config issue, it was saved, just not loaded properly

@tbandixen
Copy link
Contributor Author

Thank you, thats it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

3 participants