git.iko.soy/typeable/oauth2-proxy
on master help sign in
initial import
commitc6f07d54d71b49cf3ba77c55cfdc9e8b924c71e9 authorJehiah Czebotar <jehiah@gmail.com> dateMon 10 Dec 2012, 20:34 (14 years ago)
1 file changed+39
README.md+39
README.mdnew file+39
@@ -0,0 +1,39 @@
1+google_auth_proxy
2+=================
3+
4+A reverse proxy that acts as an authentication layer using Google Oauth2 to validate
5+individual accounts, or a whole google apps domain.
6+
7+
8+## Structure
9+
10+
11+```
12+ _______ ___________________ __________
13+ |Nginx| ----> |google_auth_proxy| ----> |upstream|
14+ ------- ------------------- ----------
15+ ||
16+ \/
17+ [google oauth2 api]
18+
19+```
20+
21+## Configuration
22+
23+1) visit to Google Api Console https://code.google.com/apis/console/
24+2) under "API Access", choose "Create an OAuth 2.0 Client ID"
25+3) Edit the application settings, and list the Redirect URI(s) where you will run your application. For example:
26+`https://internalapp.yourcompany.com/oauth2/callback`
27+
28+## Usage
29+
30+```
31+./google_auth_proxy
32+ -client-id="": the Google OAuth Client ID: ie: "123456.apps.googleusercontent.com"
33+ -client-secret="": the OAuth Client secret
34+ -cookie-secret="": the seed for cookie values
35+ -redirect-url="": the http base to redirect to. ie: https://internalapp.yourcompany.com/oauth2/callback
36+ -htpasswd-file="": additionally lookup basic auth in a htpasswd file. Entries must be created with "htpasswd -s" for SHA encryption
37+ -pass-basic-auth=true: pass basic auth information to upstream
38+ -upstream=[]: the http url(s) of the upstream endpoint(s). If multiple, routing is based on URL path
39+```