Code Monkey home page Code Monkey logo

openspa's Introduction

OpenSPA

CI Go Reference Go Report Card License

OpenSPA: An open and extensible Single Packet Authorization (SPA) implementation of the OpenSPA Protocol.

v1 of the protocol was created in 2018 and while functioning, it has a few shortcomings which are being resolved in v2 (currently the dev branch) of the protocol.

v2 is currently as of 2022 under heavy development. No guarantees are made that it will remain backwards compatible in it's current form. We WILL break it during development.

v1 was never production ready and so any PR regarding v1 will be rejected.

What is OpenSPA?

OpenSPA is an open and extensible SPA implementation built upon the OpenSPA Protocol. OpenSPA allows the deployment of a service on an internal network or the internet, that is hidden to all unauthorized users. Authorized users authenticate by sending a single packet to the OpenSPA server, which will reveal itself only if the user is authorized to access the service.

OpenSPA builds what essentially is a dynamic firewall.

OpenSPA-Demo

Unauthorized users will not be able to detect via the network the presence of the hidden service (no ping, traceroute, port scans, fingerprinting, etc.). Once the user sends an OpenSPA request packet (via UDP) and they are authorized only then will the server respond with a response. Unauthorized users thus will also be unable to confirm the existence of the OpenSPA service.

Version 1 vs. 2?

The major difference between v1 and v2 of the OpenSPA protocol is how binary messages (request & response) are encoded. Version 1 had a well-defined binary format (e.g. offset X with a length of 32 bits contains the client's IP address). While this of course worked, it also proved very difficult to extend and modify. Which is why version 2 uses TLVs to encode the binary messages. This allows v2 to be customized and extended very easily for different use-cases.

Version 2 also brings native support for IPtables, making extension scripts optional (or rather an alternative to the native IPtables integration to support different firewalls).

Version 2 Status

Completed:

  • openspalib (pkg/openspalib) - library for the OpenSPA protocol. With this you can implement your own OpenSPA client and server
  • Client (cli/openspa-client) - OpenSPA client CLI
  • Server (cli/openspa-server) - OpenSPA server CLI
    • Config file support
    • Native IPtables integration
    • External firewall integration
    • External authorization integration
  • adk (Anti DoS Knocking protection) implemented using TOTP
  • Server should expose Prometheus metrics via HTTP
  • eBPF/XDP adk acceleration (Anti DoS knocking protection)
  • Benchmarks (ADK with XDP and without)

Planned:

  • ECC support
  • x509 certificate support
  • Helper utility to generate keys
  • Server external authentication support
  • Replay attack prevention
  • Use SO_REUSEPORT to increase performance on multi-core, multi-NIC queue systems good blog post about the issue

Building from Source

$ sudo apt install build-essential make git
$ git clone https://github.com/greenstatic/openspa.git
$ cd openspa
$ make build
# Build artifacts in the: ./artifacts directory

openspa's People

Contributors

greenstatic avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openspa's Issues

config.yaml in source code is missing

zenith@LAPTOP-ZENITH:~/openspa/artifacts$ ./openspa_linux_amd64 server start
3:28PM FTL Failed to read config file error="open config.yaml: no such file or directory"

openspa server run err because of a lack of config.yaml

ps: I would appreciate it very much if README.md could be more specific : )

replay protection support

I would rather at least include replay protection into the project before considering it a viable replacement for fwknop

#5 (comment)

Let's track it here.

Was it possible to make a progress, any hope?

is it alive?

Hi, the Readme states the project is under heavy development, but last commit is from beginning of the year.
Has something changed about it?

I wonder about it's readiness for everyday use.

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.