Public | Automated Build

Last pushed: 5 months ago
Short Description
Docker implementation of oauth2proxy
Full Description

travix/oauth2proxy



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.

Name Description Example value
OAUTH2_PROXY_AUTH Space separated list of user:password user1: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

Docker Pull Command
Owner
travix

Comments (0)