diff --git a/authentik-application/Chart.yaml b/authentik-application/Chart.yaml index fb329b4..065a28a 100644 --- a/authentik-application/Chart.yaml +++ b/authentik-application/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: authentik-application description: "A Chart to deploy a secret for the authentik blueprint-sidecar." type: application -version: "0.4.6" +version: "0.4.7" maintainers: - name: WrenIX url: https://wrenix.eu diff --git a/authentik-application/README.md b/authentik-application/README.md index d3a61b3..43b897f 100644 --- a/authentik-application/README.md +++ b/authentik-application/README.md @@ -7,7 +7,7 @@ description: "A Chart to deploy a secret for the authentik blueprint-sidecar." # authentik-application -![Version: 0.4.6](https://img.shields.io/badge/Version-0.4.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.4.7](https://img.shields.io/badge/Version-0.4.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Chart to deploy a secret for the authentik blueprint-sidecar. diff --git a/authentik-application/ci/ct-redirect-values.yaml b/authentik-application/ci/ct-redirect-values.yaml new file mode 100644 index 0000000..6c58c88 --- /dev/null +++ b/authentik-application/ci/ct-redirect-values.yaml @@ -0,0 +1,7 @@ +blueprint: + provider: + oidc: + redirectURL: + - matching_mode: "regex" + url: "https://regex.url" + - "https://url" diff --git a/authentik-application/files/provider/oidc.yaml.gotmpl b/authentik-application/files/provider/oidc.yaml.gotmpl index cc80565..f14e8ba 100644 --- a/authentik-application/files/provider/oidc.yaml.gotmpl +++ b/authentik-application/files/provider/oidc.yaml.gotmpl @@ -28,8 +28,20 @@ client_id: {{ $clientID | quote }} client_secret: {{ $clientSecret | quote }} redirect_uris: + {{- if (kindIs "string" .redirectURL) }} - matching_mode: "strict" url: {{ .redirectURL | quote }} + {{- else }} + {{- range $url := .redirectURL }} + {{- if (kindIs "string" $url) }} + - matching_mode: "strict" + url: {{ $url | quote }} + {{- else }} + {{- toYaml (list $url) | nindent 6 }} + {{- end }}{{/* one of is a string -> else is a object */}} + {{- end }}{{/* one of range */}} + {{- end }}{{/* redirect is a string -> else is a slice */}} + {{- with .tokenDuration }} access_token_validity: {{ . | quote }} {{- end }} diff --git a/authentik-application/templates/secrets.yaml b/authentik-application/templates/secrets.yaml index 9e59346..2aac5d5 100644 --- a/authentik-application/templates/secrets.yaml +++ b/authentik-application/templates/secrets.yaml @@ -21,7 +21,12 @@ stringData: clientID: {{ $clientID | quote }} clientSecret: {{ $clientSecret | quote }} - redirectURL: {{ .redirectURL }} + {{- if (kindIs "string" .redirectURL) }} + redirectURL: {{ .redirectURL | quote }} + {{- else }} + {{- $url := .redirectURL | first}} + redirectURL: {{ ternary $url (get $url "url") (kindIs "string" .redirectURL) | quote }} + {{- end }} {{- with .tokenDuration }} tokenDuration: {{ . | quote }}