# 外部 SSO(oauth2-proxy)へ認証を委譲する構成。 # ブラウザ → Ingress → (oauth2-proxy) → claude-code gateway。 # gateway 自身も auth_request で二重チェックする。 # # 前提: auth ネームスペースに oauth2-proxy がデプロイ済みで、 # http://oauth2-proxy.auth.svc.cluster.local:4180/oauth2/auth が使えること。 auth: mode: forward forward: url: "http://oauth2-proxy.auth.svc.cluster.local:4180/oauth2/auth" signInUrl: "https://auth.example.com/oauth2/start?rd=$escaped_request_uri" anthropic: authMode: oauth # `claude setup-token` で発行したトークンを使う # oauthToken は --set / existingSecret で注入 git: allowedHosts: - github.com - git.cafepieters.com session: maxSessions: 15 idleTimeoutSeconds: 3600 ingress: enabled: true className: nginx annotations: nginx.ingress.kubernetes.io/auth-url: "https://auth.example.com/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://auth.example.com/oauth2/start?rd=$escaped_request_uri" hosts: - host: claude-code.example.com paths: - path: / pathType: Prefix tls: - secretName: claude-code-tls hosts: - claude-code.example.com