mozilla-iam / mozilla.oidc.accessproxy

Stand-alone OIDC Access Proxy
Mozilla Public License 2.0
11 stars 10 forks source link

Nginx Lua OpenID Connect Access Proxy

Wow that's a lot of words. What this is a reverse proxy that stands in front of your application. It proxies ALL calls, no exception. While doing so it can either pass ("whitelist") or require authentication, from an OIDC (OpenID Connect) provider.

This proxy uses the OpenResty version of Nginx, that has Lua support, and uses the lua-resty-openidc library for authentication, as well as credstash to fetch credentials as needed.

Setup

For testing, or if credstash isn't being used, you can also pass secrets through environment variables:

The Callback URL that the Mozilla OIDC Access Proxy uses is /redirect_uri. You can provide this to the identity provider to add into the list of allowed callback URLs.

You can manually start this as such, if you like:

$ make build
$ make run

AWS Deployment

Note

By default the Access Proxy does NOT configure TLS (HTTPS). This is up to you to either front it with an AWS ELB that supports TLS, or to configure TLS. It is very, very strongly discouraged to run this access proxy without TLS. In other words, do not do that, it's a terrible idea and will lead to compromise of your service. If you need a certificate get it from LetsEncrypt for free.

Config Structure