All Projects → HAL24K → ooproxy

HAL24K / ooproxy

Licence: GPL-3.0 license
A reverse OpenID Connect and OAuth 2 proxy, implementing the client-credentials flow.

Programming Languages

rust
11053 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ooproxy

Aspnet.security.openidconnect.server
OpenID Connect/OAuth2 server framework for OWIN/Katana and ASP.NET Core
Stars: ✭ 544 (+2076%)
Mutual labels:  openidconnect
Nginx Openid Connect
Reference implementation of OpenID Connect integration for NGINX Plus
Stars: ✭ 96 (+284%)
Mutual labels:  openidconnect
oidc
Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation
Stars: ✭ 475 (+1800%)
Mutual labels:  openidconnect
Lua Resty Openidc
OpenID Connect Relying Party and OAuth 2.0 Resource Server implementation in Lua for NGINX / OpenResty
Stars: ✭ 626 (+2404%)
Mutual labels:  openidconnect
Cas
Apereo CAS - Enterprise Single Sign On for all earthlings and beyond.
Stars: ✭ 9,154 (+36516%)
Mutual labels:  openidconnect
Jose2go
Golang (GO) implementation of Javascript Object Signing and Encryption specification
Stars: ✭ 150 (+500%)
Mutual labels:  openidconnect
Auth
:atom: Social (OAuth1\OAuth2\OpenID\OpenIDConnect) sign with PHP
Stars: ✭ 457 (+1728%)
Mutual labels:  openidconnect
lemonldap-ng
LemonLDAP::NG main code
Stars: ✭ 49 (+96%)
Mutual labels:  openidconnect
Oauth2 Oidc Debugger
An OAuth2 and OpenID Connect Debugger
Stars: ✭ 78 (+212%)
Mutual labels:  openidconnect
React-OpenIdConnect
Simple React OpenIdConnect component
Stars: ✭ 30 (+20%)
Mutual labels:  openidconnect
Jose Jwt
Ultimate Javascript Object Signing and Encryption (JOSE) and JSON Web Token (JWT) Implementation for .NET and .NET Core
Stars: ✭ 692 (+2668%)
Mutual labels:  openidconnect
Login Cidadao
Projeto Login Cidadão
Stars: ✭ 61 (+144%)
Mutual labels:  openidconnect
Openiddict Samples
ASP.NET Core, Microsoft.Owin/ASP.NET 4.x and JavaScript samples for OpenIddict
Stars: ✭ 214 (+756%)
Mutual labels:  openidconnect
Angular Auth Oidc Client
npm package for OpenID Connect, OAuth Code Flow with PKCE, Refresh tokens, Implicit Flow
Stars: ✭ 577 (+2208%)
Mutual labels:  openidconnect
openiddict-documentation
OpenIddict documentation
Stars: ✭ 53 (+112%)
Mutual labels:  openidconnect
Portier Broker
Portier Broker reference implementation, written in Rust
Stars: ✭ 474 (+1796%)
Mutual labels:  openidconnect
Openiddict Core
Versatile OpenID Connect stack for ASP.NET Core and Microsoft.Owin (compatible with ASP.NET 4.6.1)
Stars: ✭ 2,275 (+9000%)
Mutual labels:  openidconnect
fastapi-azure-auth
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.
Stars: ✭ 174 (+596%)
Mutual labels:  openidconnect
doorkeeper-openid connect
OpenID Connect extension for Doorkeeper
Stars: ✭ 152 (+508%)
Mutual labels:  openidconnect
fab-oidc
Flask-AppBuilder SecurityManager for OpenIDConnect
Stars: ✭ 28 (+12%)
Mutual labels:  openidconnect

ooproxy

Deprecated, no longer maintained

A reverse OpenID Connect and OAuth 2 proxy, implementing the client-credentials flow (machine-to-machine authentication/authorization). It can be used to protect http-based APIs with an authentication mechanism. Because it only supports the client-credentials flow, there are no redirects when the authentication fails, and only bearer tokens are supported in the authorization header.

The proxy has the following advantages:

  • Low resource usage (CPU / Memory), small docker image
  • Doesn't put a lot of strain on the SSO server, will only retrieve new keys on the first request, when keys are rotated and on an optional timeout

The proxy supports the following algorithms:

  • RS256
  • RS384
  • RS512
  • HS256
  • HS384
  • HS512

The reverse authentication proxy

Configuration

The proxy can be configured through environment variables:

  • LISTEN_URL -> The url the proxy listens on
  • LISTEN_SSL_URL -> The SSL url the proxy listens on (if this is set, also configure CERT_FILE)
  • PROVIDER_URL -> The OpenID connect provider root url, no trailing slashes
  • UPSTREAM_URL -> The upstream url for the proxy (the resource it's protecting)
  • CLIENT_SECRET -> The OpenID client secret (optional, necessary when using symmetric token encryption algorithms)
  • KEY_EXPIRY_SECS -> Check for new jkws keys every x seconds (optional, defaults to no timeout)
  • UPSTREAM_TIMEOUT_SECS -> Requests to upstream timeout after x seconds (optional, defaults to 1 hour)
  • AUDIENCE -> Validate that the "aud" claim matches this value (optional, not validated when not provided). Since the aud claim can be either an array, or a single string, the configuration must be in json format. Use ["a", "b"] if you want to validate it as an array, or "c" if you want to validate that it's that exact value.
  • SUBJECT -> Validate that the "sub" claim matches this value (optional, not validated when not provided)
  • LEEWAY -> The amount of clock skew in seconds that is allowed to occur when validating tokens (optional, defaults to 0)
  • NUM_WORKERS -> Number of threads (optional, defaults to two)
  • CERT_FILE -> A pfx SSL certificate (optional, needs to be configured if listen_ssl_url is configured)
  • CERT_PASSWORD -> A password to decrypt the certificate (optional)
  • RUST_LOG -> Either error, warning, info, debug or all (optional, for enabling logging)

It also supports loading a configuration from a settings.toml file in $PATH:

listen_url = "0.0.0.0:8080'
listen_ssl_url = '0.0.0.0:4443'
cert_file = 'cert.pfx'
cert_password = 'hunter2'
upstream_url = 'http://upstream.com'
provider_url = 'https://my-identity.com'
client_secret = 'secret'
key_expiry_secs = 3600
upstream_timeout_secs = 120
audience = '"my-api"'
subject = 'my-user'
leeway = 3
num_workers = 8

Run

Run from docker:

docker run -e LISTEN_URL=0.0.0.0:80 -e PROVIDER_URL=https://identity -e CLIENT_SECRET=secret -e UPSTREAM_URL=https://upstream/ -e RUST_LOG=info -e KEY_EXPIRY_SECS=3600 -e UPSTREAM_TIMEOUT_SECS=60 -e NUM_WORKERS=4 -e AUDIENCE='\"myproxy\"' -e SUBJECT=myuser -e LEEWAY=2 -e CERT_FILE=cert.pfx -e CERT_PASSWORD=hunter2 hal24000/ooproxy:lastest

Run outside docker (after building, use a settings.toml file):

ooproxy

Build

If you want to run the proxy inside docker:

docker build . -t ooproxy --build-arg features=

For a docker image with TLS use:

docker build . -t ooproxy --build-arg features=tls

Or, if you want to run the proxy outside of docker:

cargo install ooproxy

With TLS:

cargo install ooproxy --all-features

How to authenticate

To authenticate to your APIs, use the client credentials flow, using the correct credentials for the client (indicated by client and secret). Example with curl:

Copyright

HAL 24000 B.V. 2018

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].