Code Monkey home page Code Monkey logo

wireguard-okta's Introduction

Wireguard Okta

Wireguard is an extremely fast, secure and modern VPN solution. It is now included in linux kernel and is used by VPN providers like mozilla vpn and mullad. Wireguard follows the linux philosophy of doing one thing well. It deals with cryptography and network routing and doesn't handle identity management. It explicitly leaves identity management to application layer.

One major deterrent for wireguard adoption by enterprises is lack of 2FA. There are awesome products like tailscale, which offers a zero config VPN solution built on top of wireguard. They even have open sourced their code. You could create islands of intranets within your corporate network and is a great option for large enterprises.

The aim of this project is to explore wireguard in detail and create a simple system to link wireguard and okta together. Small companies who are already using wireguard either manually or via algo might find this useful as an added security measure.

Once okta is integrated, other OIDC providers will be integrated in a generic way and will be exposed as a go package in a new project.

High Level Objectives

Phase 1

  • Periodically sync okta users and wireguard peers and add/delete peers as needed, using either
    • event webhooks
    • cronjob

Webhooks are more efficient but cron have lesser attack surface and is more robust. Hence, we'll use cron first.

Phase 2

  • Figure out a way to do key rotation and provide means for users to download new keys after they authenticate with okta 2FA

Configuration

Configuration settings required by the project so far. Subject to change

OKTASERVER_API_TOKEN=
OKTASERVER_WIREGUARD_GROUP_ID=
OKTASERVER_ORG_URL=
WG_INTERFACE_IP=10.49.0.1/24
ALLOWED_IPS=10.0.0.0/8

Libraries Used

  • wgctrl-go - Package wgctrl enables control of WireGuard interfaces on multiple platforms.
  • wireguard-go - Go implementation of wireguard protocol. Used by wgctrl-go internally
  • go-sqlite3

Inspirations

Would like to thank contributors of below open source projects, who has travelled before me in this path

Progress so far

  • Creation of wireguard client programmatically in the server using wgctrl-go package
  • Fetching of users in okta and comparison of that list to the list of users in the sqlite db

Next Steps

  • Save peer configuration as text file, to share with user

wireguard-okta's People

Contributors

mjeffin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

moizbadr

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.