Skip to main content
A step‑by‑step cookbook for adding single‑sign‑on to Keep with your self‑hosted GitLab using oauth2‑proxy and the NGINX Ingress Controller.
Conventions used below
  • <keep-host>             – public FQDN where users access Keep (e.g. keep.example.com)
  • <gitlab-host>           – URL of your GitLab instance (e.g. gitlab.example.com)
  • <registry-host>         – container registry that stores images (omit if you use the public images)
  • Kubernetes namespace keep – feel free to change it everywhere if you prefer another namespace.

1. Prerequisites


2. Create the GitLab OAuth application

  1. GitLab ▸ Admin → Applications → New
  2. Name → keep‑sso
  3. Redirect URI → https://<keep-host>/oauth2/callback
  4. Scopes → openid profile email (+ read_api if you plan to gate access by group/project)
  5. Save – copy the generated Application ID and Secret.

3. Kubernetes secrets & config


4. Deploy oauth2‑proxy (Helm)

Lab‑only shortcut: instead of mounting the CA you can temporarily add ssl-insecure-skip-verify: "true" under extraArgs.

5. Patch (or create) Keep’s Ingress resource

Add three annotations so ingress‑nginx delegates auth to the Service:
Redeploy Keep (or patch the Ingress manually).

6. Environment variables for Keep

Roll out the frontend:

7. Quick validation

Browser smoke‑test:
  • https://<keep-host> → redirect to GitLab → sign in → return to Keep.
  • DevTools ▸ Network → /api/auth/session returns 200.

8. Troubleshooting


9. Clean‑up


Appendix B – Sync images to an offline registry (example)