1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-03-25 22:00:56 +02:00

33 lines
1.8 KiB
Markdown
Raw Normal View History

2019-02-03 21:44:04 +00:00
---
layout: default
title: Home
permalink: /
2019-03-26 16:04:59 +00:00
nav_order: 0
2019-02-03 21:44:04 +00:00
---
2019-10-30 10:04:29 +00:00
![OAuth2 Proxy](/logos/OAuth2_Proxy_horizontal.svg)
2019-03-26 16:04:59 +00:00
2019-02-03 21:44:04 +00:00
A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others)
to validate accounts by email, domain or group.
2019-03-26 16:04:59 +00:00
**Note:** This repository was forked from [bitly/OAuth2_Proxy](https://github.com/bitly/oauth2_proxy) on 27/11/2018.
2019-02-03 21:44:04 +00:00
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]({{ site.gitweb }}/CHANGELOG.md).
2019-02-03 21:44:04 +00:00
2020-03-29 14:54:36 +01:00
[![Build Status](https://secure.travis-ci.org/oauth2-proxy/oauth2-proxy.svg?branch=master)](http://travis-ci.org/oauth2-proxy/oauth2-proxy)
2019-02-03 21:44:04 +00:00
![Sign In Page](https://cloud.githubusercontent.com/assets/45028/4970624/7feb7dd8-6886-11e4-93e0-c9904af44ea8.png)
2019-03-26 16:04:59 +00:00
## Architecture
![OAuth2 Proxy Architecture](https://cloud.githubusercontent.com/assets/45028/8027702/bd040b7a-0d6a-11e5-85b9-f8d953d04f39.png)
## Behavior
1. Any request passing through the proxy (and not matched by `--skip-auth-regex`) is checked for the proxy's session cookie (`--cookie-name`) (or, if allowed, a JWT token - see `--skip-jwt-bearer-tokens`).
2. If authentication is required but missing then the user is asked to log in and redirected to the authentication provider (unless it is an Ajax request, i.e. one with `Accept: application/json`, in which case 401 Unauthorized is returned)
3. After returning from the authentication provider, the oauth tokens are stored in the configured session store (cookie, redis, ...) and a cookie is set
4. The request is forwarded to the upstream server with added user info and authentication headers (depending on the configuration)
Notice that the proxy also provides a number of useful [endpoints](/oauth2-proxy/endpoints).