Giter Club home page Giter Club logo

openfortivpn-webview's Introduction

Application to perform the SAML single sing-on and easily retrieve the SVPNCOOKIE needed by openfortivpn.

The application will simply open the SAML page to let you sign in. As soon as the SVPNCOOKIE is set, the application will print it to stdout and exit.

Usage

As a single command with openfortivpn:

sudo openfortivpn $DOMAIN --cookie=$(openfortivpn-webview $DOMAIN)

Obtain SVPNCOOKIE for host vpn-gateway:

openfortivpn-webview vpn-gateway

You can also specify an authentication realm (normally not required):

openfortivpn-webview vpn-gateway:1234 --realm=foo

By default the application builds the SAML URL using the given host, port and realm. You can alternatively provide an already built URL:

openfortivpn-webview --url 'https://vpn-gateway:1234/remote/saml/start?realm=foo'

The application exits automatically as soon as it prints SVPNCOOKIE to stdout. You can change this behavior passing --keep-open. The application will in this case stay open and keep printing SVPNCOOKIE as its value changes, thus generating a stream of text.

The application does not print SVPNCOOKIE until it finds a URL matching the regular expression passed to --url-regex. If no regular expression is specified, the application will look for URLs containing /sslvpn/portal.html. Waiting for such URL allows to deal with concurrent VPN sessions when the gateway is configured to allow a single active session.


The inner Chromium engine may print a lot of messages. You can disable them to only see the messages of the application.

QT_LOGGING_RULES="*=false;webview=true" QTWEBENGINE_CHROMIUM_FLAGS="--enable-logging --log-level=3" openfortivpn-webview vpn-gateway

Proxy servers

If you have to use an http proxy to access the vpn gateway or the SAML id provider, you can pass the --proxy-server option to Chromium.

Note that when using the Electron variant, all command line options are also passed along to Chromium.

QTWEBENGINE_CHROMIUM_FLAGS="--proxy-server=proxy.example.com:8080" openfortivpn-webview vpn-gateway

openfortivpn-webview's People

Contributors

dependabot[bot] avatar dimitripapadopoulos avatar gm-vm avatar oven avatar steinuil avatar

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.