Coder Social home page Coder Social logo

openvpn-oidc's Introduction

OpenVPN OpenID Connect (OIDC) Auth

Tested with google and Dex.

Consists of two components:

  • auth-server — implements authentication by OpenID Connect (OIDC) provider and outputs information for connecting to the OpenVPN server (username, one-time password and OpenVPN client configuration file).
  • auth-client — checks the username and password received from OpenVPN client.

Environment variables are used to configure auth-server:

  • ISSUER_URL — URL where auth-server can find the OpenID Provider Configuration Document, which should be available in the /.well-known/openid-configuration.
  • DOMAIN — auth-server domain.
  • CLIENT_ID — unique identifier for your registered application.
  • CLIENT_SECRET — is a secret known only to the application and the authentication server.
  • ADDITIONAL_SCOPES — list of additional scopes.
  • OPENVPN_SERVER_HOST — IP or domain for connect to OpenVPN server.
  • OPENVPN_SERVER_PORT — port that listen OpenVPN server.

Example for Google:

ISSUER_URL="https://accounts.google.com"
DOMAIN=openvpn-auth.example.com
CLIENT_ID="0-r.apps.googleusercontent.com"
CLIENT_SECRET="secret"
ADDITIONAL_SCOPES="email"
OPENVPN_SERVER_HOST=openvpn.example.com
OPENVPN_SERVER_PORT=1194

Easy install in kubernetes from Helm chart:

git clone [email protected]:vitaliy-sn/openvpn-oidc.git
cd helm
vim values.yaml
helm install openvpn-oidc .

How to register app in OIDC provider:

  • Google.
  • Dex - you need to create a custom resource oauth2clients.dex.coreos.com in kubernetes cluster.

openvpn-oidc's People

Contributors

vitaliy-sn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jenarutamara

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.