GithubHelp home page GithubHelp logo

rkojedzinszky / go-novncauthproxy Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 34 KB

NoVNC auth proxy using JWE tokens for passing control

License: BSD 2-Clause "Simplified" License

Dockerfile 1.43% Go 91.10% Python 7.47%
vnc-proxy kubernetes golang jwe

go-novncauthproxy's Introduction

go-novncauthproxy

A novnc proxy inspired on snf-vncauthproxy, but handles VNC connections over Websocket only. The target host/password is encoded in a JWE token, which is passed in the URI. Thus the application is stateless, multiple instances can be run (e.g. in Kubernetes).

Usage

Plain

./go-novncauthproxy -jwe-secret=lz2jVFPT36rk3Vak11dTSNRBQ0NEH/0sYt3Q2yVOnI4=

The secret key is a 256 bit (32 byte) key, encoded in base64. One can be generated as:

$ dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64
VyA/BvPHJTJEt2EZv3PVPuM4xEXFL+dS5KCOiWKz4MM=

Containerized

All flags can be passed as environment variables, so running with Docker is easy too:

$ docker run -it --rm -e JWE_SECRET=lz2jVFPT36rk3Vak11dTSNRBQ0NEH/0sYt3Q2yVOnI4= -p 8080:8080 ghcr.io/rkojedzinszky/go-novncauthproxy

Kubernetes

See example deployments.

Operation

Then the proxy listens on plain http on :8080 by default, expects the JWE token passed at /novnc/<token> with no slash at the end. Then, it parses the token, checks its expiry, and extracts VNC connection details from claims. For generating a sample token, see encode.py. Then, you can use that token on novnc demo for testing purposes.

Applications

Right now, a forked ganetimgr is using it.

go-novncauthproxy's People

Contributors

rkojedzinszky avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

gber

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.