Use OAuth2 proxy on Kubernetes to secure access

OAuth2-proxy was once a bit.ly project, but was officially archived in Sept 2018. It lives on though, at https://github.com/oauth2-proxy/oauth2-proxy.


This is a companion discussion topic for the original entry at https://geek-cookbook.funkypenguin.co.nz/recipes/kubernetes/oauth2-proxy

anyway, is there any update for configuration for the next on k8s dashboard?

On the latest version of oauth2-proxy, I had to pass an additional flag under extraArgs for the issuer URL, like so:

    extraArgs:
      provider: oidc
      oidc-issuer-url: "https://authentik.example.com/application/o/kube-apiserver/"
      provider-display-name: "Authentik"
      skip-provider-button: "true"
      pass-authorization-header: "true" 
      session-store-type: cookie # Note I am not using redis
      cookie-refresh: 15m