Skip to main content

An Authentication Reverse Proxy using OpenID Connect

Project description

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, or install via pip: pip install arpoc
  • If successful you should now have the arpoc command.
  • Make yourself familiar with the basic interface with arpoc --help.
  • Create a configuration file arpoc --print-sample-config
  • Save the configuration file (preferable under /etc/arpoc/config.yml)
  • Create a default access control hierarchy using arpoc --print-sample-config
  • Save the access control hierarchy in a json file (defaultdir: /etc/arpoc/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 which arpoc uses internally 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 arpoc --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 arpoc 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
  • ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ARPOC-0.3.1.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

ARPOC-0.3.1-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file ARPOC-0.3.1.tar.gz.

File metadata

  • Download URL: ARPOC-0.3.1.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for ARPOC-0.3.1.tar.gz
Algorithm Hash digest
SHA256 47c1a45d57a40a1bb26846fda79fab371876cf15199eeb7c3980cf32b94d43c7
MD5 4a5f0c78d1c9e57f0769bee705a3e7e5
BLAKE2b-256 515b3a6f6eecbb33fdd4ee98524335b4d550716dab2e7cba562dec2dee4f7b22

See more details on using hashes here.

File details

Details for the file ARPOC-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: ARPOC-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for ARPOC-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58ec7ca27afe183762ee4639f8d68d1c2f08ef6e1797bc1bb60dd08c24b94189
MD5 969f01ac636ae1b6ff6df8ac789a7c2a
BLAKE2b-256 4c649cc0b651de5824c6a5ebfcfed32b2628f4d8344591a170df8739b24c8971

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page