Skip to content

Commit 37ca0fb

Browse files
committed
readme updates
1 parent 7eb17ba commit 37ca0fb

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ individual accounts, or a whole google apps domain.
88
[![Build Status](https://secure.travis-ci.org/bitly/google_auth_proxy.png?branch=master)](http://travis-ci.org/bitly/google_auth_proxy)
99

1010

11-
## Structure
12-
11+
## Architecture
1312

1413
```
1514
_______ ___________________ __________
@@ -18,17 +17,29 @@ individual accounts, or a whole google apps domain.
1817
||
1918
\/
2019
[google oauth2 api]
21-
2220
```
2321

24-
## Configuration
25-
26-
1. visit to Google Api Console https://code.google.com/apis/console/
22+
23+
## Installation
24+
25+
1. [Install Go](http://golang.org/doc/install)
26+
2. install dependencies `$ go get github.com/bitly/go-simplejson`
27+
3. clone the repository `$ git clone https://github.com/bitly/google_auth_proxy.git`
28+
4. compile `$ cd google_auth_proxy && go build`
29+
5. copy the built binary `google_auth_proxy` to `/usr/local/bin` (or wherever you want to run it from)
30+
31+
## OAuth Configuration
32+
33+
You will need to register an OAuth application with google, and configure it with Redirect URI(s) for the domain you
34+
intend to run google_auth_proxy on.
35+
36+
1. Visit to Google Api Console https://code.google.com/apis/console/
2737
2. under "API Access", choose "Create an OAuth 2.0 Client ID"
2838
3. Edit the application settings, and list the Redirect URI(s) where you will run your application. For example:
2939
`https://internalapp.yourcompany.com/oauth2/callback`
40+
4. Make a note of the Client ID, and Client Secret and specify those values as command line arguments
3041

31-
## Usage
42+
## Command Line Options
3243

3344
```
3445
Usage of ./google_auth_proxy:
@@ -46,13 +57,11 @@ Usage of ./google_auth_proxy:
4657
-version=false: print version string
4758
```
4859

49-
Unauthenticated requests will be redirected to `/oauth2/sign_in` to start the sign-in process.
5060

61+
## Example Configuration
5162

52-
## Example
53-
54-
To run google_auth_proxy as a reverse proxy on port 4180 authenticating requests for an application running
55-
on port 8080 at internal.yourcompany.com you would use
63+
To run `google_auth_proxy` as a reverse proxy on port `4180` authenticating requests for an application running
64+
on port `8080` at `http://internal.yourcompany.com/` you would use
5665

5766
```bash
5867
./google_auth_proxy \
@@ -64,7 +73,7 @@ on port 8080 at internal.yourcompany.com you would use
6473
--client-secret=...
6574
```
6675

67-
An example Nginx config to listen on ssl (port 443) and forward requests to port 4180 would be
76+
An example Nginx config to listen on ssl (port 443) and forward requests to port google_auth_proxy on port 4180 would be
6877

6978
```
7079
server {
@@ -86,7 +95,9 @@ server {
8695
}
8796
```
8897

89-
## Documentation
98+
## Endpoint Documentation
99+
100+
Google auth proxy responds directly to the following endpoints. All other endpoints will be authenticated.
90101

91102
* /oauth2/sign_in - the login page, which also doubles as a sign out page (it clears cookies)
92103
* /oauth2/start - a URL that will redirect to start the oauth cycle

0 commit comments

Comments
 (0)