HUB
Sign inSign up

travix/oauth2proxy

By travix

•Updated over 8 years ago

Docker implementation of oauth2proxy

Image
0

500K+

travix/oauth2proxy repository overview

⁠travix/oauth2proxy

Stars Pulls License

Docker implementation of oauth2_proxy⁠

⁠Environment variables

You can setup authentication against a list of username/password, these are created when the container is started.

NameDescriptionExample value
OAUTH2_PROXY_AUTHSpace separated list of user:passworduser1:pass1 user2:pass2

⁠Usage

⁠Authenticate using Google
docker run -d \
    -p 4180:4180 \
    travix/oauth2proxy:latest \
      -client-id=gcloud-client-id.apps.googleusercontent.com \
      -client-secret=gcloud-client-secret \
      -cookie-secret=$(head -c 16 /dev/urandom | md5sum | head -c 32) \
      -upstream=https://backend-server:8081 \
      -email-domain=mydomain.com
⁠Authenticate against a given user/password list
# run backend
docker run -d \
    --name backend-server \
    nginx:alpine

# run auth2proxy with user/pass and fake google credentials
docker run -d \
    -p 8080:80 \
    -e "OAUTH2_PROXY_AUTH=user1:pass1 user2:pass2 user3:pass3" \
    --link backend-server \
    travix/oauth2proxy:latest \
      -client-id=gcloud-client-id.apps.googleusercontent.com \
      -client-secret=gcloud-client-secret \
      -htpasswd-file=/etc/oauth2proxy-auth \
      -cookie-secret=$(head -c 16 /dev/urandom | md5sum | head -c 32) \
      -upstream=http://backend-server

curl -u user1:pass1 http://localhost:8080

⁠License

MIT © Travix International⁠

Tag summary
Recent tags
Content type
Image
Digest
Size
7.3 MB
Last updated
over 9 years ago
docker pull travix/oauth2proxy:latest