-
Notifications
You must be signed in to change notification settings - Fork 135
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
Auth finish request not working if CSD is needed #35
Comments
By default csd is not executed by openconnect. You can enable execution of the csd script by e.g passing Unfortunately I have no access to a vpn forcing csd, so cannot investigate this myself. |
Hi @vlaci, |
I was slow to conenct the dots if the server denies authentication because of the missing csd info, anything we may pass to openconnect after authetnication completes won't help. I just always assumed that csd happens after the authentication. I personally used mitmproxy dumps to develop this application. Openconnect's source provide some guidance on what to do. Unfortunately it seems that the whole CSD execution stuff would need to happen during authentication:
|
Thanks, I'll try to get something working. I already have captured some traffic while establishing the connection. My first goal will be to use a csd wrapper script which fakes the result of this process see: https://github.com/Gilks/hostscan-bypass . I'll never install AV snakeoil on my system :) |
I'm also trying to leverage openconnect-sso to call CSD as well, but getting similar errors. Is there anything I can do to help test? |
Sorry for not responding earlier, I haven't got much time lately but hopefully I can start look into it in a few weeks. If me or someone else could submit a PR, then it would be a great help if anyone could actually test it. @impynutz have you started working on anything? |
Actually I got it to work, but no time to do a proper patch. Basically you can just send the CSD result (extracted with mentioned hostscan-bypass) and add the host-scan-token attribute. But its just hacky and there would need to be more changes to actually run the CSD script, if someone wants this anyway :) |
@vlaci I pushed some code for testing CSD. Like I said we will need some more code to handle CSD wrapper and or for now just add a config option to pass the result of CSD. @tysegall if you want to test this I added the CSD result which works for me, not sure if it will for you. Your company may have other requirements and if this does not work you will probably need to get your own CSD results or modify some parts of it like changing the AV software. |
@impynutz Thanks very much for investigating and making a proposal for this. @vlaci Is there any update on including this as general functionality? My organization is using the CSD functionality so for me it would be very useful (and I suspect many others eventually, as more start using openconnect-sso). Cheers! |
Hi @impynutz I tested your patch impynutz@3ecfb76 and it seemed to work. I had to change line 77 to |
In the file hostscan-data is the result of the CSD scan for my company network. If this does not work for your company network you will need to find out what values are needed in there. Like mentioned there is a small programm which I used to get the values (I used a windows VM for that, where I installed all required programs like antivirus): https://github.com/Gilks/hostscan-bypass |
Unfortunately I no longer have access to an anyconnect VPN endpoint so I won't be able to help much implementing this feature :( |
Nice! It works with the hostscan-data file! |
The SAML support is merged in OpenConnect v9.01 and the latest version of the GNOME NetworkManager authentication dialog has support for the webview part. We'd be very interested in hearing if it doesn't work for you. Packages for Fedora are in the COPR repository at https://copr.fedorainfracloud.org/coprs/dwmw2/openconnect/ |
Hi,
With this you mean nm-applet or is it some separate package? I have installed
Thanks for your work |
You need NetworkManager-openconnect from git; it isn't released yet. |
With the git version it does not show any error, it just disables the vpn again after showing the connection animation, not sure where to get some useful log output. journalctl output is not helpful. |
Yeah, we should fix that. In the short term since you're building it anyway (thanks) you can try something like this:
Probably easiest just to run it from the command line for testing.
|
Probably best to take further discussion on that to https://gitlab.gnome.org/GNOME/NetworkManager-openconnect/-/issues as it isn't really about openconnect-sso any more. Thanks! |
thank you @impynutz, this CSD logic worked for me as well! for anybody interested, i've forked @vlaci's latest main branch (0.8.0) and applied @impynutz' csd_test branch to it, along with publishing a self-contained Windows .exe release & some Windows specific build instructions here => https://github.com/Beej126/openconnect-sso-windows-csd |
See upstream [issue vlaci#35][1] and particularly the [patch by impynutz][2] for more details. Other related relevant resources: * the OpenConnect website's [infos on CSD][3] * OpenConnect [issue vlaci#75 on support for AnyConnect SSO][4] * OpenConnect [issue vlaci#84 on support for SAML auth with AnyConnect][5] * Arch Linux package of [OpenConnect with custom user agent][6] [1]: vlaci#35 [2]: impynutz@3ecfb76 [3]: https://www.infradead.org/openconnect/csd.html [4]: https://gitlab.com/openconnect/openconnect/-/merge_requests/75 [5]: https://gitlab.com/openconnect/openconnect/-/issues/84 [6]: https://aur.archlinux.org/packages/networkmanager-openconnect-useragent-git
See upstream [issue vlaci#35][1] and particularly the [patch by impynutz][2] for more details. Other related relevant resources: * the OpenConnect website's [infos on CSD][3] * OpenConnect [issue vlaci#75 on support for AnyConnect SSO][4] * OpenConnect [issue vlaci#84 on support for SAML auth with AnyConnect][5] * Arch Linux package of [OpenConnect with custom user agent][6] [1]: vlaci#35 [2]: impynutz@3ecfb76 [3]: https://www.infradead.org/openconnect/csd.html [4]: https://gitlab.com/openconnect/openconnect/-/merge_requests/75 [5]: https://gitlab.com/openconnect/openconnect/-/issues/84 [6]: https://aur.archlinux.org/packages/networkmanager-openconnect-useragent-git
See upstream [issue vlaci#35][1] and particularly the [patch by impynutz][2] for more details. Other related relevant resources: * the OpenConnect website's [infos on CSD][3] * OpenConnect [issue vlaci#75 on support for AnyConnect SSO][4] * OpenConnect [issue vlaci#84 on support for SAML auth with AnyConnect][5] * Arch Linux package of [OpenConnect with custom user agent][6] [1]: vlaci#35 [2]: impynutz@3ecfb76 [3]: https://www.infradead.org/openconnect/csd.html [4]: https://gitlab.com/openconnect/openconnect/-/merge_requests/75 [5]: https://gitlab.com/openconnect/openconnect/-/issues/84 [6]: https://aur.archlinux.org/packages/networkmanager-openconnect-useragent-git
This should now be fixed with the |
In my company the newest disimprovement for our VPN is to force us to install AV software. Now I need to get openconnect-sso somehow to work with a Cisco Secure Desktop (CSD) wrapper script. I don't know the protocol so not shure what to send when to make the request work. Here is what I get after already going through login and 2FA:
I tried to somehow pass the sso-token to openconnect, but could not get it to work. I would appreciate if someone who knows this protocol could give me a hint on how to do the final auth step.
The text was updated successfully, but these errors were encountered: