Giter VIP home page Giter VIP logo

openconnect-pulse-gui's Introduction

openconnect-pulse-gui

This script provides a wrapper around OpenConnect which allows a user to log in through a WebKitGTK2 window. This allows OpenConnect to be compatible with web-based authentication mechanisms, such as SAML.

Requirements

The script can be used with python2 or python3, however python3 is recommended. The following packages are also required:

  • python-gi or python-gobject
  • webkit2gtk
  • openconnect

Instruction for specific distros can be found below.

Debian/Ubuntu

sudo apt install python3-gi gir1.2-webkit2-4.0 openconnect

Fedora

sudo yum install python-gi webkit2gtk3 openconnect

Arch

sudo pacman -S python-gobject webkit2gtk openconnect

Installation

This repo can be downloaded with git clone https://github.com/utknoxville/openconnect-pulse-gui or via the GitHub webpage.

Installation can be performed using pip install . or directly calling python setup.py install.

Usage

Once installed, the openconnect-pulse-gui script should be in your $PATH. If not, the script openconnect_pulse_gui/openconnect_pulse_gui.py can be called directly.

The only required required argument is the sign-in link / server URL. Other arguments can be found by using python openconnect-pulse-gui.py -h.

Note that this script will not run openconnect, it will only print the command with the correct arguments to stdout.

Login process

Anybody wishing to recreate this functionality either manually or using another library can with the following steps:

  1. Send the user to the sign-in URL. This will either give them the ability to log in directly or redirect them to an external authentication server.
  2. Wait for a Set-Cookie header that contains the DSID cookie. This is the authentication cookie used by Pulse Secure.
  3. Pass the cookie to openconnect using --protocol nc and -C 'DSID=<cookie-value>'. Note that some workflows may work with --protocol pulse, but at this time SAML-based logins do not.

openconnect-pulse-gui's People

Contributors

kbirkeland avatar proski avatar

Stargazers

 avatar  avatar Keith Scroggs avatar  avatar João Serras avatar  avatar  avatar  avatar José Coelho avatar Sávio Cangussu avatar  avatar  avatar Felipe Gules avatar Piotr Strzelecki avatar Victor Demonchy avatar Rob Audenaerde avatar  avatar Ben Klein avatar geurhinder-antwerpen avatar Mark S. Bentley avatar Piotr Zalewski avatar Valerio Pilo avatar Mark Baggett avatar Kwadroke of "The Wired" avatar

Watchers

James Cloos avatar  avatar Antoine Jacoutot avatar  avatar  avatar  avatar  avatar

openconnect-pulse-gui's Issues

Not Working on Ubuntu But Working on Fedora

I use this package to establish a vpn connection from WSL, and it works for me on my Fedora installation of WSL. However, I recently tried to use it on an Ubuntu WSL install, and encountered a strange error. The code works fine and takes me to an ivanti pre sign-in page, which asks me to click a button to proceed. When I click proceed, it takes me to a page that says: "A software error was encountered that prevents normal operation:
java.lang.IllegalArgumentException: range=
Please report this problem to your Help Desk or administrative staff. It has also been logged for an administrator to review."

However on Fedora when I click proceed it takes me to the usual (Office 365 based) authentication page for my organization. Any clue what is going on?

"Empty window"

Hello,

Thank you for your work,

When I enter openconnect-pulse-gui ADRESS,

I get an empty window, and after a moment a "timeout was reached" message

Can you help me please ? I am using ubuntu 20.04

Thank you,
Vincent

ValueError: Namespace WebKit2 not available

Using Ubuntu 18.04, I got the following error despite following the instructions in the readme:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/michael/tmp/openconnect-pulse-gui/openconnect_pulse_gui/__init__.py", line 1, in <module>
    from .openconnect_pulse_gui import main
  File "/home/michael/tmp/openconnect-pulse-gui/openconnect_pulse_gui/openconnect_pulse_gui.py", line 25, in <module>
    gi.require_version("WebKit2", "4.0")
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace WebKit2 not available

It appears installing gir1.2-webkit2-4.0 fixes the issue however. Just want to bring this to your attention in case others run into the issue.

Host Checker is not supported

Hi, since today I get

Host Checker is not supported. Please contact your Administrator.
and
Your browser is incompatible with Host Checker.

tried to remove cookies (this path is logged when trying to connect):

rm -r /root/.config/pulse-gui-cookies

but this just reruns microsoft authentication and then Host checker error comes again.
image
image

my system:

Linux pl1lxl-112991 5.14.0-1045-oem #51-Ubuntu SMP Mon Jul 4 06:41:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.