Skip to content

libcthorne/samlwebcookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAML Web Cookie VPN Connect

This utility allows you to authenticate using SAML and 2FA and then connect to your using openconnect at the command line on Linux.

Setup

1. Install the dependencies if you do not already have them

  • Docker (Download Page)
  • OpenConnect (please use your package manager to install this)

2. Clone this code and build the container

git clone [email protected]:libcthorne/samlwebcookie.git
cd samlwebcookie
docker build -t samlwebcookie .

3. Create the .env file with the local config

SAML_HOST=saml.host.my.company
FS_AUTH_HOST=auth.host.my.company
VPN_HOST=the.vpn.my.company
[email protected]

Usage

The connect.sh script will first as you for your VPN password, then your 2FA verification code, and finally it will ask you to sudo - do not be alarmed when it prompts you for these.

Once connected, the openconnect command will remain running.

./connect.sh

You should see output similar to:

Please enter your VPN password: 
Running samlwebcookie
Waiting for 2FA code prompt...
Verification code: 999999
Got VPN cookie:
AAAAAAABBABABABAB@@AAAEXAMPLECOOKLIEPLEASEIGNORETHIOSVALYEHERE
Attempting to connect to server 111.111.111.11:443
Connected to 111.111.111.11:443
...

To disconnect from the VPN, simply hit Ctrl+C to terminate the connect.sh script.

About

Retrieves SAML cookie to use with openconnect

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published