evry / docker-oidc-proxy

Docker Image built on Alpine Linux for secure OpenID Connect (OIDC) proxy authentication
https://hub.docker.com/r/evry/oidc-proxy/
MIT License
121 stars 59 forks source link

SSL error - self signed certs #10

Open thebetterjort opened 5 years ago

thebetterjort commented 5 years ago

openidc.lua:486: failed: 18: self signed certificate, client: 172.24.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost:9099"

version: '3'

services:
  fathom:
    image: usefathom/fathom:latest
    command: ./fathom --config=/config/.env server
    depends_on:
      - postgres_fathom
    volumes:
      - ./fathom.env:/config/.env
    ports:
      - 8446:8080

  postgres_fathom:
    image: postgres:latest
    volumes:
      - ./data:/var/lib/postgresql/data
      - db_data:/var/lib/postgresql/data
    environment:
      PGDATA: /var/lib/postgresql/data/fathom
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}

  nginx_openid:
    image: "evry/oidc-proxy"
    environment: 
      - OID_DISCOVERY=https://localhost:8444/auth/realms/master/protocol/openid-connect/auth
      - OID_CLIENT_ID=nginx
      - OID_CLIENT_SECRET=0fd32218-8e31-45ac-8b53-d6b523ab99b6
      - PROXY_HOST=fathom
      - PROXY_PORT=8446
      - PROXY_PROTOCOL=https
      - OID_SESSION_CHECK_SSI=off
      - OID_SESSION_NAME=oidc_auth
      - OID_REDIRECT_PATH=/redirect_uri
    ports:
     - "9099:80"
jd-daniels commented 5 years ago

What I got to work was adding ssl_verify=no to the code and building it myself.

[]# cat nginx/lua/auth.lua local opts = { redirect_uri_path = os.getenv("OID_REDIRECT_PATH") or "/redirect_uri", discovery = os.getenv("OID_DISCOVERY"), client_id = os.getenv("OID_CLIENT_ID"), client_secret = os.getenv("OID_CLIENT_SECRET"), token_endpoint_auth_method = os.getenv("OIDC_AUTH_METHOD") or "client_secret_basic", renew_access_token_on_expiry = os.getenv("OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY") ~= "false", scope = os.getenv("OIDC_AUTH_SCOPE") or "openid", iat_slack = 600, ssl_verify = "no", }