Hardened rootless OAuth2 Proxy identity-aware reverse proxy on Debian 13 (multi-arch, 0 CVEs).
305
A hardened, rootless, read-only-rootfs OAuth2 Proxy identity-aware reverse proxy built from official upstream source on Debian 13 (trixie-slim) with patched Go modules and 0 fixable CVEs. Maintained by Daniel G. Cosenza from FNX Labs.
dgcosenza/oauth2-proxyghcr.io/dgcosenza/oauth2-proxy (identical signed multi-arch digest)dgcosenza/oauth2-proxy-dockerdgcosenza/oauth2-proxy is a hardened, drop-in replacement for quay.io/oauth2-proxy/oauth2-proxy. It compiles official oauth2-proxy/oauth2-proxy releases from source with patched Go modules (golang.org/x/crypto, golang.org/x/net, golang.org/x/sys), supports Docker secret files (OAUTH2_PROXY_CLIENT_SECRET_FILE, OAUTH2_PROXY_COOKIE_SECRET_FILE) and /config/oauth2-proxy.cfg, and runs strictly as non-root UID/GID 1000:1000 with read_only: true and cap_drop: [ALL].
| Component | Resolved Version |
|---|---|
| OAuth2 Proxy | 7.15.6 |
| Base OS | Debian 13.8 (trixie-slim) |
| Architectures | linux/amd64, linux/arm64 |
| Uncompressed size (per arch) | amd64: 48.3 MB, arm64: 150.0 MB |
| Last verified build (UTC) | 2026-11-29 |
| Published multi-arch digest | dgcosenza/oauth2-proxy@sha256:97ca1ddca2d71368457d6b15fa5b573e22062adb417c5cc5b5fb39fc74578037 |
| GHCR mirror | ghcr.io/dgcosenza/oauth2-proxy@sha256:97ca1ddca2d71368457d6b15fa5b573e22062adb417c5cc5b5fb39fc74578037 |
| Supply chain | Cosign OIDC signed + SPDX & CycloneDX SBOM attestations + SLSA Build L3 provenance |
| Security gate (Trivy + Grype on SBOM) | 0 fixable findings of any severity (15 upstream-unfixed) |
| Tag | Policy | Description |
|---|---|---|
latest | Moving | Latest verified multi-arch build passing all CVE, Dive, and smoke gates. |
<version> (e.g. 7.15.6) | Moving | Latest verified build for that upstream release. |
<version>-<YYYYMMDD> | Immutable | Date-stamped daily security rebuild. |
sha-<short> | Immutable | Git commit tag from this repository. |
Pin production deployments by immutable digest: dgcosenza/oauth2-proxy@sha256:<digest> or ghcr.io/dgcosenza/oauth2-proxy@sha256:<digest>.
| Architecture | Status | Verification |
|---|---|---|
linux/amd64 | Published & natively tested | Native x86_64 build, smoke test, Dive >= 95%, Trivy + Grype 0 fixable CVEs, Cosign OIDC, SLSA L3. |
linux/arm64 | Published & natively tested | Native ARM64 build, smoke test, Dive >= 95%, Trivy + Grype 0 fixable CVEs, Cosign OIDC, SLSA L3. |
Volume ownership note:
docker-compose.example.ymldefaults to a named Docker volume so non-root runtime permissions (1000:1000) are initialized automatically; if switching to a host bind mount, pre-create the directory owned by1000:1000beforedocker compose up -d.
docker run -d --name oauth2-proxy --restart unless-stopped \
--read-only --tmpfs /tmp:uid=1000,gid=1000 \
--cap-drop ALL --security-opt no-new-privileges:true \
-p 127.0.0.1:4180:4180 \
-e OAUTH2_PROXY_PROVIDER=google \
-e OAUTH2_PROXY_CLIENT_ID=your-client-id \
-e OAUTH2_PROXY_CLIENT_SECRET_FILE=/run/secrets/oauth2_proxy_client_secret \
-e OAUTH2_PROXY_COOKIE_SECRET_FILE=/run/secrets/oauth2_proxy_cookie_secret \
-e OAUTH2_PROXY_EMAIL_DOMAINS="*" \
-e OAUTH2_PROXY_UPSTREAMS="http://upstream:8080" \
dgcosenza/oauth2-proxy:latest
See docker-compose.example.yml:
services:
oauth2-proxy:
image: dgcosenza/oauth2-proxy:latest
container_name: oauth2-proxy
restart: unless-stopped
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:uid=1000,gid=1000
ports:
- "127.0.0.1:4180:4180"
environment:
TZ: "Etc/UTC"
OAUTH2_PROXY_PROVIDER: "oidc"
OAUTH2_PROXY_OIDC_ISSUER_URL: "https://idp.example.com"
OAUTH2_PROXY_CLIENT_ID: "oauth2-proxy"
OAUTH2_PROXY_CLIENT_SECRET_FILE: "/run/secrets/oauth2_proxy_client_secret"
OAUTH2_PROXY_COOKIE_SECRET_FILE: "/run/secrets/oauth2_proxy_cookie_secret"
OAUTH2_PROXY_EMAIL_DOMAINS: "*"
OAUTH2_PROXY_UPSTREAMS: "http://127.0.0.1:8080"
OAUTH2_PROXY_HTTP_ADDRESS: "0.0.0.0:4180"
secrets:
- oauth2_proxy_client_secret
- oauth2_proxy_cookie_secret
volumes:
- oauth2_proxy_config:/config
secrets:
oauth2_proxy_client_secret:
file: ./secrets/oauth2_proxy_client_secret.txt
oauth2_proxy_cookie_secret:
file: ./secrets/oauth2_proxy_cookie_secret.txt
volumes:
oauth2_proxy_config:
| Variable | Default | Description |
|---|---|---|
OAUTH2_PROXY_HTTP_ADDRESS | 0.0.0.0:4180 | HTTP listening address and port. |
OAUTH2_PROXY_PROVIDER | google | OAuth2 / OIDC provider (oidc, google, github, entra-id, keycloak-oidc, etc.). |
OAUTH2_PROXY_CLIENT_ID | (required) | OAuth2 client ID. |
OAUTH2_PROXY_CLIENT_SECRET_FILE | /run/secrets/oauth2_proxy_client_secret | Path to file containing the OAuth2 client secret. |
OAUTH2_PROXY_COOKIE_SECRET_FILE | /run/secrets/oauth2_proxy_cookie_secret | Path to file containing the 16/24/32-byte cookie secret. |
OAUTH2_PROXY_EMAIL_DOMAINS | * | Allowed email domains. |
OAUTH2_PROXY_UPSTREAMS | (optional) | Upstream HTTP URLs or static://200. |
Ports: 4180/tcp (OAuth2 Proxy HTTP endpoint and /ping health probe). Volumes: /config (optional oauth2-proxy.cfg and custom templates). User: oauth2proxy (UID/GID 1000:1000). PID 1: tini.
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD ["/usr/local/bin/oauth2-proxy-healthcheck"]
Probes http://127.0.0.1:4180/ping and verifies an exact OK response.
quay.io/oauth2-proxy/oauth2-proxydgcosenza/oauth2-proxy@sha256:<digest>.OAUTH2_PROXY_* environment variables (binary remains at /bin/oauth2-proxy).cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/oauth2-proxy-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/oauth2-proxy:latest
gh attestation verify oci://ghcr.io/dgcosenza/oauth2-proxy:latest --owner dgcosenza
UNKNOWN–CRITICAL, --ignore-unfixed, exit 1) and Grype on the Syft SPDX SBOM (--only-fixed --fail-on negligible) on both amd64 and arm64.tini PID 1 with least-privilege capabilities and no-new-privileges:true.SECURITY.md.docker buildx build --platform linux/amd64 --load -t dgcosenza/oauth2-proxy:local .
./tests/smoke.sh dgcosenza/oauth2-proxy:local
.github/workflows/daily.yml runs daily at 42 5 UTC with --no-cache: refreshes the debian:13.8-slim digest and OS security patches, runs smoke + Dive + Trivy + Grype gates on amd64 and arm64, publishes identical Cosign-signed SLSA L3 digests to Docker Hub and GHCR (plus optional Quay.io, GitLab, Codeberg, and Amazon ECR Public mirrors when configured), creates a signed GitHub Release, syncs docs & Docker Hub overview, and manages a single ci-failure issue.
golang.org/x/crypto vulnerabilities.OAUTH2_PROXY_CLIENT_SECRET_FILE and OAUTH2_PROXY_COOKIE_SECRET_FILE out of the box.Packaging, scripts, workflows, and documentation (packaging: MIT, upstream: MIT) are licensed under the MIT License — copyright Daniel G. Cosenza from FNX Labs. Third-party upstream notices: THIRD-PARTY-NOTICES.md.
Maintained by Daniel G. Cosenza from FNX Labs. Upstream project: oauth2-proxy/oauth2-proxy.
Content type
Image
Digest
sha256:97ca1ddca…
Size
46 MB
Last updated
about 4 hours ago
docker pull dgcosenza/oauth2-proxy