oauth2-proxy is a free, open source identity & access management (iam) project written in Go and released under MIT. It has 14,978 GitHub stars, 2,196 forks and 285 open issues, and was last pushed 9 hours ago. On this registry it ranks #11 of 27 tracked projects in Identity & Access Management (IAM), with 5 head-to-head comparisons available.

What is oauth2-proxy?

OAuth2 Proxy is an open-source, MIT-licensed reverse proxy and middleware written in Go that puts OAuth2 and OpenID Connect authentication in front of web applications, aimed at operators and platform teams who need single sign-on without adding auth code to every app.

What it is

OAuth2 Proxy is a flexible, open-source tool that can act either as a standalone reverse proxy or as a middleware component integrated into existing reverse proxy and load balancer setups. It lives in the Go and cloud-infrastructure ecosystem, where it occupies the layer between an incoming HTTP request and the upstream application, handling authentication on behalf of that application. The project supports a large number of OAuth2 and OIDC providers, working either through a generic OIDC client or through specific implementations for Google, Microsoft Entra ID, GitHub, login.gov and others.

The concrete problem it solves is auth for applications that have none of their own. As a reverse proxy, it intercepts requests to the application and redirects users to an OAuth2 provider for authentication; as middleware, it can be integrated into existing infrastructure to handle authentication for multiple applications at once. That means it replaces per-application login code and bespoke session handling with one shared proxy that speaks the standard protocols. Through specialised provider implementations it also extracts more detail about the user, such as preferred usernames and groups, and forwards those details to upstream applications as HTTP headers.

Key capabilities

  • Runs in standalone reverse proxy mode, intercepting requests and redirecting users to an OAuth2 provider for authentication.
  • Runs as middleware inside an existing reverse proxy or load balancer, handling authentication for multiple applications from one deployment.
  • Supports many OAuth2 and OIDC providers through a generic OIDC client plus specific implementations for Google, Microsoft Entra ID, GitHub, login.gov and others.
  • Extracts preferred usernames and groups through specialised provider implementations and forwards them as HTTP headers to upstream applications.
  • Publishes compiled binaries on GitHub for all major architectures, including ppc64le and s390x.
  • Ships container images built on GoogleContainerTools/distroless from v7.6.0 onward, with -alpine suffixed tags for debugging and armv6.
  • Publishes nightly images from the master branch at quay.io/oauth2-proxy/oauth2-proxy-nightly.

Who uses it and how

  • Teams that already run a reverse proxy or load balancer and want to add authentication as middleware rather than change each application.
  • Platform operators exposing several internal applications behind one proxy and one identity provider, using the generic OIDC client to avoid per-app wiring.
  • Deployments on less common hardware, where the ppc64le and s390x binaries or the -alpine images for armv6 are the practical route.
  • Security-focused environments that adopt the distroless base image specifically to reduce installed dependencies in the container.
  • Contributors and integrators: the project carries the hacktoberfest topic, runs a Slack channel, and is sponsored by the SAP Open Source Program, with Microsoft Azure credits listed as a former sponsor.

Getting started

Installation and configuration are covered by the project's installation docs at http://oauth2-proxy.github.io/oauth2-proxy/, which point to example setup files in contrib/local-environment. Ready-made options are compiled binaries from GitHub releases, container images from the published registry, or nightly builds at quay.io/oauth2-proxy/oauth2-proxy-nightly.

How it compares

No comparable projects are named in the material available for this entry, and no list of paid products it replaces is provided. On the facts given, it stands alone in this registry.

When to use it — and when not to

A self-hoster must run and configure the proxy itself, register an OAuth2 or OIDC client with an external identity provider, and manage TLS termination for the endpoints it fronts, since the project has no user directory of its own and depends entirely on that external provider. It is a poor fit for anyone who wants authentication without operating extra infrastructure or who needs managed auth as a service. Two honest caveats: the nightly images are explicitly unstable and should not be used in production unless the operator knows what they are doing, and with 285 open issues the tracker is busy, so checking recent activity before committing is sensible.

project readme (upstream, from github) — read inline

Continuous Integration Go Report Card GoDoc MIT licensed Maintainability Code Coverage OpenSSF Scorecard OpenSSF Best Practices FOSSA Status

OAuth2 Proxy

OAuth2 Proxy is a flexible, open-source tool that can act as either a standalone reverse proxy or a middleware component integrated into existing reverse proxy or load balancer setups. It provides a simple and secure way to protect your web applications with OAuth2 / OIDC authentication. As a reverse proxy, it intercepts requests to your application and redirects users to an OAuth2 provider for authentication. As a middleware, it can be seamlessly integrated into your existing infrastructure to handle authentication for multiple applications.

OAuth2 Proxy supports a lot of OAuth2 as well as OIDC providers. Either through a generic OIDC client or a specific implementation for Google, Microsoft Entra ID, GitHub, login.gov and others. Through specialised provider implementations OAuth2 Proxy can extract more details about the user like preferred usernames and groups. Those details can then be forwarded as HTTP headers to your upstream applications.

Simplified Architecture

Get Started

OAuth2 Proxy's Installation Docs cover how to install and configure your setup. Additionally you can take a further look at the example setup files.

Releases

Binaries

We publish OAuth2 Proxy as compiled binaries on GitHub for all major architectures as well as more exotic ones like ppc64le as well as s390x.

Check out the latest release.

Images

From v7.6.0 and up the base image has been changed from Alpine to GoogleContainerTools/distroless. This image comes with even fewer installed dependencies and thus should improve security. The image therefore is also slightly smaller than Alpine. For debugging purposes (and those who really need it. e.g. armv6) we still provide images based on Alpine. The tags of these images are suffixed with -alpine.

Since 2023-11-18 we build nightly images directly from the master branch and provide them at quay.io/oauth2-proxy/oauth2-proxy-nightly. These images are considered unstable and therefore should NOT be used for production purposes unless you know what you're doing.

Sponsors

Would you like to sponsor the project then please contact us at [email protected]

SAP

SAP Open Source Program

Former Sponsors

Microsoft

Microsoft Azure credits for open source projects

Getting Involved

Slack

Join the #oauth2-proxy Slack channel to chat with other users of OAuth2 Proxy or reach out to the maintainers directly. Use the public invite link to get an invite for the CNCF space.

OAuth2 Proxy is a community-driven project. We rely on the contribut️ions of our users to continually improve it. While review times can vary, we appreciate your patience and understanding. As a volunteer-driven project, we strive to keep this project stable and might take longer to merge changes.

If you want to contribute to the project. Please see our Contributing guide.

Thanks to all the people who already contributed ❤

Made with contrib.rocks.

Security

If you believe you have found a vulnerability within OAuth2 Proxy or any of its dependencies, please do NOT open an issue or PR on GitHub, please do NOT post any details publicly.

Security disclosures MUST be done in private. If you have found an issue that you would like to bring to the attention of the maintainers, please compose an email and send it to the list of people listed in our MAINTAINERS.md file.

For more details read our full Security Docs

Security Notice for v6.0.0 and older

If you are running a version older than v6.0.0 we strongly recommend to the current version.

See open redirect vulnerability for details.

Repository History

2018-11-27: This repository was forked from bitly/OAuth2_Proxy. Versions v3.0.0 and up are from this fork and will have diverged from any changes in the original fork. A list of changes can be seen in the CHANGELOG.

2020-03-29: This project was formerly hosted as pusher/oauth2_proxy but has been renamed to oauth2-proxy/oauth2-proxy. Going forward, all images shall be available at quay.io/oauth2-proxy/oauth2-proxy and binaries will be named oauth2-proxy.

Code of Conduct

Participation in the OAuth2 Proxy project is governed by the CNCF Code of Conduct.

License

OAuth2 Proxy is distributed under The MIT License.

FOSSA Status

Trademarks

OAuth2 Proxy is a Cloud Native Computing Foundation Sandbox project.

CNCF

The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see Trademark Usage.

Frequently asked questions

Is oauth2-proxy free to use?

oauth2-proxy is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does oauth2-proxy do?

A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers.

What is oauth2-proxy written in?

oauth2-proxy is primarily written in Go. Its source is publicly available at https://github.com/oauth2-proxy/oauth2-proxy, and it has 14,978 GitHub stars.