GithubHelp home page GithubHelp logo

filippor / xdgopensaml Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 61.22 MB

retrieve saml token using external browser

License: GNU General Public License v3.0

Java 33.88% Shell 20.48% Batchfile 8.99% PowerShell 24.24% C 12.41%

xdgopensaml's Introduction

XdgOpenSaml

retrieve saml token using external browser and write it to standar out

use xdg-open to open a browser

usage

if jbang is intalled set executable permission permission to XdgOpenSaml.java

   XdgOpenSaml.java <vpn-url> 

else

./jbang XdgOpenSaml.java <vpn-url> 

if graalvm is installed it's possible to create a native executable with

   jbang export native XdgOpenSaml.java 

a native executable XdgOpenSaml for linux x86-64 is committed

this can be used with openconnect

sudo openconnect --protocol fortinet --cookie $(XdgOpenSaml <host>:<port>) --server <host>:<port> --servercert pin-sha256:xxxxxxxxxxxxxxxxxxx

with openfortivpn

XdgOpenSaml <host>:<port> 2>/dev/null | sudo openfortivpn <host>:<port> --cookie-on-stdin

sudo openfortivpn <host>:<port> --cookie=`XdgOpenSaml.java <host>:<port>`

there is a version of the script that retrieve only the id source XdgOpenSamlId.java binary XdgOpenSamlId this print on standard output "remote/saml/auth_id?id=<id>"

and can be used with openconnect

sudo ./openconnect --protocol fortinet --server <host>:<port> --servercert pin-sha256:xxxxxxxxxx -g $(XdgOpenSamlId.java  <host>:<port>)

when prompted for Username and Password insert any value will be ignored

options

Usage: XdgOpenSaml [-htV] [-p=<port>] [-r=<realm>] <server>
retrieve saml token with xdg open
      <server>          The server to call
  -h, --help            Show this help message and exit.
  -p, --port=<port>     port to listen for redirect
  -r, --realm=<realm>   The authentication realm.
  -t, --trust-all       ignore  ssl certificate validation
  -V, --version         Print version information and exit.

xdgopensaml's People

Contributors

filippor avatar

Stargazers

Fulvio Scapin avatar

Watchers

 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.