traefik-forward-auth: send PKCE code_challenge, default on

Pocket ID rejects the authorization request outright when its OIDC client
has PKCE required -- "This client requires PKCE, but the 'code_challenge'
parameter is missing" -- which is the default for clients created in recent
Pocket ID versions. Every app behind the portal fails at login, not just
the one being tested.

Upstream supports this via the pocketID provider's enablePKCE flag; the
chart never emitted it, so it stayed at its false default. Adds it to the
normalised portal shape (per-portal override via portals[].pocketID.enablePKCE)
and defaults it on, since PKCE is harmless when the client does not require it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
sha
2026-09-22 02:39:14 +03:00
co-authored by Claude Opus 5
parent da79d63d49
commit f0d7c1f474
4 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v2
name: traefik-forward-auth name: traefik-forward-auth
description: Forward auth for Traefik (ItalyPaleAle/traefik-forward-auth) with Pocket ID provider description: Forward auth for Traefik (ItalyPaleAle/traefik-forward-auth) with Pocket ID provider
type: application type: application
version: 0.2.0 version: 0.2.1
appVersion: "4.14.1" appVersion: "4.14.1"
annotations: annotations:
version-source: github-release:ItalyPaleAle/traefik-forward-auth version-source: github-release:ItalyPaleAle/traefik-forward-auth
@@ -29,6 +29,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
- name: {{ .name | quote }} - name: {{ .name | quote }}
endpoint: {{ .pocketID.endpoint | quote }} endpoint: {{ .pocketID.endpoint | quote }}
clientID: {{ .pocketID.clientID | quote }} clientID: {{ .pocketID.clientID | quote }}
enablePKCE: {{ if hasKey .pocketID "enablePKCE" }}{{ .pocketID.enablePKCE }}{{ else }}true{{ end }}
existingSecret: {{ required "each portal needs an existingSecret" .existingSecret | quote }} existingSecret: {{ required "each portal needs an existingSecret" .existingSecret | quote }}
secretKey: {{ .secretKey | default "client-secret" | quote }} secretKey: {{ .secretKey | default "client-secret" | quote }}
middlewareName: {{ .middlewareName | default (printf "%s-%s" $.Release.Name .name) | quote }} middlewareName: {{ .middlewareName | default (printf "%s-%s" $.Release.Name .name) | quote }}
@@ -37,6 +38,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
- name: {{ .Values.portal.name | quote }} - name: {{ .Values.portal.name | quote }}
endpoint: {{ .Values.pocketID.endpoint | quote }} endpoint: {{ .Values.pocketID.endpoint | quote }}
clientID: {{ .Values.pocketID.clientID | quote }} clientID: {{ .Values.pocketID.clientID | quote }}
enablePKCE: {{ if hasKey .Values.pocketID "enablePKCE" }}{{ .Values.pocketID.enablePKCE }}{{ else }}true{{ end }}
existingSecret: {{ required "existingSecret is required" .Values.existingSecret | quote }} existingSecret: {{ required "existingSecret is required" .Values.existingSecret | quote }}
secretKey: "client-secret" secretKey: "client-secret"
middlewareName: {{ include "tfa.middlewareName" . | quote }} middlewareName: {{ include "tfa.middlewareName" . | quote }}
@@ -27,6 +27,7 @@ data:
- pocketID: - pocketID:
endpoint: {{ .endpoint | quote }} endpoint: {{ .endpoint | quote }}
clientID: {{ .clientID | quote }} clientID: {{ .clientID | quote }}
enablePKCE: {{ .enablePKCE }}
clientSecretFile: "{{ include "tfa.secretDir" $ }}/{{ .name }}/client-secret" clientSecretFile: "{{ include "tfa.secretDir" $ }}/{{ .name }}/client-secret"
{{- end }} {{- end }}
{{- with .Values.extraConfig }} {{- with .Values.extraConfig }}
+6
View File
@@ -41,11 +41,17 @@ portals: []
# pocketID: # pocketID:
# endpoint: https://id.example.com # endpoint: https://id.example.com
# clientID: "..." # clientID: "..."
# enablePKCE: true
# Single-portal shorthand, used when `portals` is empty. # Single-portal shorthand, used when `portals` is empty.
pocketID: pocketID:
endpoint: "" endpoint: ""
clientID: "" clientID: ""
# Send a PKCE code_challenge on the authorization request. Pocket ID rejects
# the request outright ("This client requires PKCE") when its OIDC client has
# PKCE required, which is the default for new clients. Harmless when the
# client does not require it, so this defaults on.
enablePKCE: true
# Secret containing the client secret. Must define key `client-secret`. # Secret containing the client secret. Must define key `client-secret`.
# Use sealed-secrets to provide this in cluster overlays. # Use sealed-secrets to provide this in cluster overlays.