Skip to main content

OpenConnect wrapper with Azure AD (SAML) SSO support for Cisco SSL-VPNs

Project description

openconnect-saml

OpenConnect wrapper with Azure AD / SAML SSO support for Cisco AnyConnect VPNs.

CI PyPI AUR Python License

Drives the SAML/SSO authentication flow against Cisco AnyConnect gateways and hands the resulting cookie to openconnect. Supports Azure AD, ADFS, and most enterprise IdPs out of the box; works with Yubikey / Nitrokey hardware keys, Duo, Microsoft Authenticator, and TOTP from your password manager.

Maintained fork of vlaci/openconnect-sso, combining work from kowyo/openconnect-lite.

Install

pip install "openconnect-saml[gui]"        # Qt browser
pip install "openconnect-saml[chrome]"     # Chromium / Playwright
pip install  openconnect-saml              # Headless only

Arch: yay -S openconnect-saml. Requires Python ≥ 3.10 and openconnect in $PATH. See docs/installation.md for Docker, build from source, and system-deps per distro.

Quick start

# Interactive setup — server, username, TOTP, browser, auto-reconnect
openconnect-saml setup

# Connect to a saved profile
openconnect-saml connect work

# Or one-shot, no profile
openconnect-saml --server vpn.example.com --user user@example.com

Headless (servers, containers, CI):

openconnect-saml --server vpn.example.com --headless --user user@example.com

Features

  • Three browser backends — Qt6 WebEngine, Chromium via Playwright, or full headless. Hardware-key WebAuthn works in all three. See docs/browsers.md.
  • Five TOTP providers — local keyring, 2FAuth, Bitwarden, 1Password, pass — or --no-totp to skip the prompt. See docs/authentication.md.
  • Multi-profile — save / list / rename / export / import named VPN configs. Includes export to NetworkManager's .nmconnection format for the Ubuntu / GNOME VPN UI. See docs/profiles.md.
  • Auto-reconnect with exponential back-off, optional cap. operations.md
  • Kill-switch — iptables-based, session or persistent, with DNS / LAN allow-listing. networking.md
  • systemd integration — install a per-server unit; service start / stop / status / logs. operations.md
  • Connection history & stats — JSONL audit log, aggregated summaries (history stats), JSON output for monitoring. operations.md
  • Diagnosticsdoctor checks Python / openconnect / sudo / TUN / dependencies / keyring / DNS / TLS / SAML endpoint. diagnostics.md

Documentation

The docs/ directory has a topic-per-file reference. Start with docs/README.md for the index.

Topic Where
Installation, Docker, system deps docs/installation.md
Browser backends + minimal GUI docs/browsers.md
TOTP providers + FIDO2 + credentials docs/authentication.md
Profiles + NetworkManager export docs/profiles.md
Split-tunnel + kill-switch + proxy docs/networking.md
Reconnect, systemd, status, history docs/operations.md
Config file + setup + config subcommand docs/configuration.md
doctor, troubleshooting, exit codes docs/diagnostics.md
Full CLI reference (every flag) docs/cli-reference.md
Contributor setup + release flow docs/development.md
Migrating from openconnect-sso docs/migration.md

Links

Resource URL
PyPI https://pypi.org/project/openconnect-saml/
AUR https://aur.archlinux.org/packages/openconnect-saml
Releases https://github.com/mschabhuettl/openconnect-saml/releases
Issues https://github.com/mschabhuettl/openconnect-saml/issues
Changelog CHANGELOG.md
License GPL-3.0

Credits

Upstream / origin

Recent contributors

  • @derkarnold--auth-script pluggable authentication (#29, v0.23.0)
  • @salty-flower — root-cause diagnosis of the PyQt 6.11 WebAuthn slot-signature crash (#24, v0.21.0)
  • @kobuki--no-cert-check / self-signed gateway report driving the v0.22.0 + v0.22.2 cert fixes and the console-only Microsoft Entra path in v0.22.4 (#19)
  • @OmarHawk--allowed-hosts whitelist proposal (#11, v0.20.0), --useragent (#12, v0.7.0), openconnect passthrough (#13, v0.7.0), MFA discussion that shaped the chrome / qt / headless three-way split (#17)
  • @BBKmsZrd — Yubikey / Nitrokey hardware-token reports + iterative debug-log triage (#21, #24)
  • @cnekmpsso-v2-login parser regression report driving the namespaced-fields + form fallback (#20, v0.8.1)
  • @mdesantis — minimal GUI proposal
    • NetworkManager .nmconnection export request (#22, v0.8.x)

Everyone else who's filed an issue, tested a release candidate, or pasted a debug log — thank you. See the full contributors graph.


Buy Me a Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openconnect_saml-0.24.4.tar.gz (263.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openconnect_saml-0.24.4-py3-none-any.whl (143.9 kB view details)

Uploaded Python 3

File details

Details for the file openconnect_saml-0.24.4.tar.gz.

File metadata

  • Download URL: openconnect_saml-0.24.4.tar.gz
  • Upload date:
  • Size: 263.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openconnect_saml-0.24.4.tar.gz
Algorithm Hash digest
SHA256 95df1e414f088d34d520057a48238233587d72b02a99b2cd045aef798b5cf739
MD5 0caed215f9d25be82b32d9c42cc0db3d
BLAKE2b-256 61e5a85c40481c7032dc0908d0bd1780022a7fdef067a72822cfea97cebea38f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openconnect_saml-0.24.4.tar.gz:

Publisher: publish.yml on mschabhuettl/openconnect-saml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openconnect_saml-0.24.4-py3-none-any.whl.

File metadata

File hashes

Hashes for openconnect_saml-0.24.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dbb74eaa32549e022eb6b48791a33e7636f6ec290cb538a8e9fb2c3344d9ad06
MD5 7b0c89233b2f6b93939387aaad6b668f
BLAKE2b-256 af0fbb1570cc2c24a55aeaf75fac3407b50fe092776512ef77e48aa3313c23c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openconnect_saml-0.24.4-py3-none-any.whl:

Publisher: publish.yml on mschabhuettl/openconnect-saml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page