GithubHelp home page GithubHelp logo

justkiddingcode / arpoc Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.23 MB

An Authorisation Reverse Proxy using OpenID Connect

License: MIT License

Dockerfile 0.33% Makefile 0.66% Python 93.41% HTML 5.59%
reverseproxy openid-connect abac

arpoc's Introduction

ARPOC

A simple reverse proxy that adds OpenID Connect Authentication and lets you write access rules for services you want to protect.

Fast tutorial

You will need:

  • A domain name <domain>
  • A tls keypair (<fullchain>, <privkey>)
  • A server with python (3.7 or newer) <python3>

Install

  • Download the repository and run <python3> setup.py install
  • If successful you should now have the oidcproxy command.
  • Make yourself familiar with the basic interface with oidcproxy --help.
  • Create a configuration file oidcproxy --print-sample-config
  • Save the configuration file (preferable under /etc/oidc-proxy/config.yml)
  • Create a default access control hierarchy using oidcproxy --print-sample-config
  • Save the access control hierarchy in a json file (defaultdir: /etc/oidc-proxy/acl/)

Edit the sample configuration

Fill in the right values for <keyfile>, <certfile>, <domainname>, <redirect> urls (path the openid connect providers will redirect the user to, with a leading slash) and the contacts field (at least on valid mail adress).

Add an openid connect provider

You need the configuration url (should end with .well-known/openid/configuration, cut this part of, it is added automatically). You also need either:

  • A configuration token
  • A registration url and a registration token
  • Client ID and Client Secret

Configuration URL and Token:

Choose a key under which oidcproxy will internally use for the provider.

Add both parameters to the config.yml under openid_providers -> <key> -> configuration_url openid_providers -> <key> -> configuration_token

Registration URL and registration token:

If you already registered your client and have a registration token add the configuration url, the registration url and the registration token under to the config.yml file under openid_providers -> <key> using the configuration_url, registration_url and registration_token.

Client ID and Client Secret

Add the configuration url to the config.yml. Call oidcproxy --add-provider <key> --client-id <client_id> --client-secret <client-secret>

Add a service you want to protect.

You need the origin url, the proxy url and the key of an access control policy set (the key of an ac entity in the json file with type policy set).

Choose a key which oidcproxy will internally use for the service. Add the origin url and the proxy url (the path under which the service will be available with a leading slash) using the origin_URL and proxy_url keys under services -> <service key> -> to the config.yml

Now you should be able to access the service.

Dependencies

  • pyjwkest -- a python library for web tokens
  • lark-parser -- a parser for the access control language
  • pyoidc -- a python library for Open ID Connect
  • ...

arpoc's People

Contributors

justkiddingcode avatar

Stargazers

 avatar

Watchers

 avatar  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.