Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(charts): add missing jans-fido2 ingress #1606

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion charts/gluu-all-in-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ Kubernetes: `>=v1.22.0-0`
| fido2.appLoggers.scriptLogTarget | string | `"FILE"` | fido2_script.log target |
| fido2.enabled | bool | `true` | Boolean flag to enable/disable the fido2 chart. |
| fido2.fido2ServiceName | string | `"fido2"` | Name of the fido2 service. Please keep it as default. |
| fido2.ingress | object | `{"fido2ConfigEnabled":false}` | Enable endpoints in either istio or nginx ingress depending on users choice |
| fido2.ingress | object | `{"fido2ConfigEnabled":false,"fido2Enabled":false}` | Enable endpoints in either istio or nginx ingress depending on users choice |
| fido2.ingress.fido2ConfigEnabled | bool | `false` | Enable endpoint /.well-known/fido2-configuration |
| fido2.ingress.fido2Enabled | bool | `false` | Enable endpoint /jans-fido2 |
| fqdn | string | `"demoexample.gluu.org"` | Fully qualified domain name to be used for Gluu installation. This address will be used to reach Gluu services. |
| fullNameOverride | string | `""` | |
| hpa | object | `{"behavior":{},"enabled":true,"maxReplicas":10,"metrics":[],"minReplicas":1,"targetCPUUtilizationPercentage":50}` | Configure the HorizontalPodAutoscaler |
Expand Down Expand Up @@ -276,8 +277,10 @@ Kubernetes: `>=v1.22.0-0`
| nginx-ingress.ingress.configApiLabels | object | `{}` | configAPI ingress resource labels. key app is taken |
| nginx-ingress.ingress.deviceCodeAdditionalAnnotations | object | `{}` | device-code ingress resource additional annotations. |
| nginx-ingress.ingress.deviceCodeLabels | object | `{}` | device-code ingress resource labels. key app is taken |
| nginx-ingress.ingress.fido2AdditionalAnnotations | object | `{}` | fido2 ingress resource additional annotations. |
| nginx-ingress.ingress.fido2ConfigAdditionalAnnotations | object | `{}` | fido2 config ingress resource additional annotations. |
| nginx-ingress.ingress.fido2ConfigLabels | object | `{}` | fido2 config ingress resource labels. key app is taken |
| nginx-ingress.ingress.fido2Labels | object | `{}` | fido2 ingress resource labels. key app is taken |
| nginx-ingress.ingress.firebaseMessagingAdditionalAnnotations | object | `{}` | Firebase Messaging ingress resource additional annotations. |
| nginx-ingress.ingress.firebaseMessagingLabels | object | `{}` | Firebase Messaging ingress resource labels. key app is taken |
| nginx-ingress.ingress.ingressClassName | string | `"nginx"` | |
Expand Down
47 changes: 47 additions & 0 deletions charts/gluu-all-in-one/templates/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,53 @@ spec:

---

{{ if .Values.fido2.ingress.fido2Enabled -}}
{{ $fullName := include "flex-all-in-one.fullname" . -}}
{{- $ingressPath := index .Values "nginx-ingress" "ingress" "path" -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}-fido2
labels:
app: {{ $fullName }}-fido2
{{- if index .Values "nginx-ingress" "ingress" "additionalLabels" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "additionalLabels" | indent 4 }}
{{- end }}
{{- if index .Values "nginx-ingress" "ingress" "fido2Labels" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "fido2Labels" | indent 4 }}
{{- end }}
annotations:
nginx.org/ssl-services: "fido2"
nginx.ingress.kubernetes.io/proxy-next-upstream: "error timeout invalid_header http_500 http_502 http_503 http_504"
{{- if index .Values "nginx-ingress" "ingress" "fido2AdditionalAnnotations" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "fido2AdditionalAnnotations" | indent 4 }}
{{- end }}
{{- if index .Values "nginx-ingress" "ingress" "additionalAnnotations" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "additionalAnnotations" | indent 4 }}
{{- end }}
spec:
ingressClassName: {{ index .Values "nginx-ingress" "ingress" "ingressClassName" }}
{{- if index .Values "nginx-ingress" "ingress" "tlsSecretName" }}
tls:
- hosts:
- {{ .Values.fqdn | quote }}
secretName: {{ index .Values "nginx-ingress" "ingress" "tlsSecretName" }}
{{- end }}
rules:
- host: {{ .Values.fqdn | quote }}
http:
paths:
- path: /jans-fido2
pathType: Exact
backend:
service:
name: {{ .Values.service.name }}
port:
number: 8080
{{- end }}

---

{{ if index .Values "auth-server" "ingress" "authServerEnabled" -}}
{{ $fullName := include "flex-all-in-one.fullname" . -}}
{{- $ingressPath := index .Values "nginx-ingress" "ingress" "path" -}}
Expand Down
6 changes: 6 additions & 0 deletions charts/gluu-all-in-one/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ fido2:
ingress:
# -- Enable endpoint /.well-known/fido2-configuration
fido2ConfigEnabled: false
# -- Enable endpoint /jans-fido2
fido2Enabled: false
scim:
# -- Name of the scim service. Please keep it as default.
scimServiceName: scim
Expand Down Expand Up @@ -601,6 +603,10 @@ nginx-ingress:
fido2ConfigLabels: { }
# -- fido2 config ingress resource additional annotations.
fido2ConfigAdditionalAnnotations: { }
# -- fido2 ingress resource labels. key app is taken
fido2Labels: { }
# -- fido2 ingress resource additional annotations.
fido2AdditionalAnnotations: { }
# -- Auth server ingress resource labels. key app is taken
authServerLabels: { }
# -- Auth server ingress resource additional annotations.
Expand Down
9 changes: 6 additions & 3 deletions charts/gluu/README.md

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion charts/gluu/charts/fido2/templates/fido2-virtual-services.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.global.istio.ingress) (.Values.global.fido2.ingress.fido2ConfigEnabled) }}
{{- if .Values.global.istio.ingress }}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
Expand All @@ -25,16 +25,30 @@ spec:
- {{ .Release.Name }}-global-gtw
{{- end }}
http:
{{- if .Values.global.fido2.ingress.fido2ConfigEnabled }}
- name: {{ .Release.Name }}-istio-fido2-configuration
match:
- uri:
prefix: /.well-known/fido2-configuration
rewrite:
uri: /jans-fido2/restv1/fido2/configuration
route:
- destination:
host: {{ .Values.global.fido2.fido2ServiceName }}.{{.Release.Namespace}}.svc.cluster.local
port:
number: 8080
weight: 100
{{- end }}
{{- if .Values.global.fido2.ingress.fido2Enabled }}
- name: {{ .Release.Name }}-istio-fido2
match:
- uri:
prefix: "/jans-fido2"
route:
- destination:
host: {{ .Values.global.fido2.fido2ServiceName }}.{{.Release.Namespace}}.svc.cluster.local
port:
number: 8080
weight: 100
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion charts/gluu/charts/nginx-ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Kubernetes: `>=v1.21.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| fullnameOverride | string | `""` | |
| ingress | object | `{"additionalAnnotations":{},"additionalLabels":{},"authServerAdditionalAnnotations":{},"authServerLabels":{},"casaAdditionalAnnotations":{},"casaLabels":{},"deviceCodeAdditionalAnnotations":{},"deviceCodeLabels":{},"enabled":true,"fido2ConfigAdditionalAnnotations":{},"fido2ConfigLabels":{},"fido2Enabled":false,"fido2Labels":{},"firebaseMessagingAdditionalAnnotations":{},"firebaseMessagingLabels":{},"hosts":["demoexample.gluu.org"],"ingressClassName":"nginx","legacy":false,"openidAdditionalAnnotations":{},"openidConfigLabels":{},"path":"/","samlAdditionalAnnotations":{},"samlLabels":{},"scimAdditionalAnnotations":{},"scimConfigAdditionalAnnotations":{},"scimConfigLabels":{},"scimLabels":{},"tls":[{"hosts":["demoexample.gluu.org"],"secretName":"tls-certificate"}],"u2fAdditionalAnnotations":{},"u2fConfigLabels":{},"uma2AdditionalAnnotations":{},"uma2ConfigLabels":{},"webdiscoveryAdditionalAnnotations":{},"webdiscoveryLabels":{},"webfingerAdditionalAnnotations":{},"webfingerLabels":{}}` | Nginx ingress definitions chart |
| ingress | object | `{"additionalAnnotations":{},"additionalLabels":{},"authServerAdditionalAnnotations":{},"authServerLabels":{},"casaAdditionalAnnotations":{},"casaLabels":{},"deviceCodeAdditionalAnnotations":{},"deviceCodeLabels":{},"enabled":true,"fido2AdditionalAnnotations":{},"fido2ConfigAdditionalAnnotations":{},"fido2ConfigLabels":{},"fido2Enabled":false,"fido2Labels":{},"firebaseMessagingAdditionalAnnotations":{},"firebaseMessagingLabels":{},"hosts":["demoexample.gluu.org"],"ingressClassName":"nginx","legacy":false,"openidAdditionalAnnotations":{},"openidConfigLabels":{},"path":"/","samlAdditionalAnnotations":{},"samlLabels":{},"scimAdditionalAnnotations":{},"scimConfigAdditionalAnnotations":{},"scimConfigLabels":{},"scimLabels":{},"tls":[{"hosts":["demoexample.gluu.org"],"secretName":"tls-certificate"}],"u2fAdditionalAnnotations":{},"u2fConfigLabels":{},"uma2AdditionalAnnotations":{},"uma2ConfigLabels":{},"webdiscoveryAdditionalAnnotations":{},"webdiscoveryLabels":{},"webfingerAdditionalAnnotations":{},"webfingerLabels":{}}` | Nginx ingress definitions chart |
| ingress.additionalAnnotations | object | `{}` | Additional annotations that will be added across all ingress definitions in the format of {cert-manager.io/issuer: "letsencrypt-prod"}. key app is taken Enable client certificate authentication nginx.ingress.kubernetes.io/auth-tls-verify-client: "optional" Create the secret containing the trusted ca certificates nginx.ingress.kubernetes.io/auth-tls-secret: "gluu/tls-certificate" Specify the verification depth in the client certificates chain nginx.ingress.kubernetes.io/auth-tls-verify-depth: "1" Specify if certificates are passed to upstream server nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream: "true" |
| ingress.additionalLabels | object | `{}` | Additional labels that will be added across all ingress definitions in the format of {mylabel: "myapp"} |
| ingress.authServerAdditionalAnnotations | object | `{}` | Auth server ingress resource additional annotations. |
Expand All @@ -36,6 +36,7 @@ Kubernetes: `>=v1.21.0-0`
| ingress.casaLabels | object | `{}` | Casa ingress resource labels. key app is taken |
| ingress.deviceCodeAdditionalAnnotations | object | `{}` | device-code ingress resource additional annotations. |
| ingress.deviceCodeLabels | object | `{}` | device-code ingress resource labels. key app is taken |
| ingress.fido2AdditionalAnnotations | object | `{}` | fido2 ingress resource additional annotations. |
| ingress.fido2ConfigAdditionalAnnotations | object | `{}` | fido2 config ingress resource additional annotations. |
| ingress.fido2ConfigLabels | object | `{}` | fido2 config ingress resource labels. key app is taken |
| ingress.fido2Enabled | bool | `false` | Enable all fido2 endpoints |
Expand Down
56 changes: 56 additions & 0 deletions charts/gluu/charts/nginx-ingress/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,62 @@ spec:

---

{{ if .Values.global.fido2.ingress.fido2Enabled -}}
{{ $fullName := include "nginx-ingress.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}-fido2
labels:
app: {{ $fullName }}-fido2
{{- if .Values.ingress.additionalLabels }}
{{ toYaml .Values.ingress.additionalLabels | indent 4 }}
{{- end }}
{{- if .Values.ingress.fido2Labels }}
{{ toYaml .Values.ingress.fido2Labels | indent 4 }}
{{- end }}
annotations:
nginx.org/ssl-services: "fido2"
nginx.ingress.kubernetes.io/proxy-next-upstream: "error timeout invalid_header http_500 http_502 http_503 http_504"
{{- if .Values.ingress.fido2AdditionalAnnotations }}
{{ toYaml .Values.ingress.fido2AdditionalAnnotations | indent 4 }}
{{- end }}
{{- if .Values.ingress.additionalAnnotations }}
{{ toYaml .Values.ingress.additionalAnnotations | indent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- $host := . -}}
{{- with $ }}
- host: {{ $host | quote }}
http:
paths:
- path: /jans-fido2
pathType: Exact
backend:
service:
name: {{ .Values.global.fido2.fido2ServiceName }}
port:
number: 8080
{{- end }}
{{- end }}
{{- end }}

---

{{ if index .Values "global" "auth-server" "ingress" "authServerEnabled" -}}
{{ $fullName := include "nginx-ingress.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
Expand Down
2 changes: 2 additions & 0 deletions charts/gluu/charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ ingress:
fido2Enabled: false
# -- fido2 ingress resource labels. key app is taken
fido2Labels: { }
# -- fido2 ingress resource additional annotations.
fido2AdditionalAnnotations: { }
# -- Auth server config ingress resource labels. key app is taken
authServerLabels: { }
# -- Auth server ingress resource additional annotations.
Expand Down
6 changes: 6 additions & 0 deletions charts/gluu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,8 @@ global:
ingress:
# -- Enable endpoint /.well-known/fido2-configuration
fido2ConfigEnabled: false
# -- Enable endpoint /jans-fido2
fido2Enabled: false
# -- GCE storage kind if using Google disks
gcePdStorageType: pd-standard
# -- Boolean flag to enable mapping global.lbIp to global.fqdn inside pods on clouds that provide static ip for load balancers. On cloud that provide only addresses to the LB this flag will enable a script to actively scan config.configmap.lbAddr and update the hosts file inside the pods automatically.
Expand Down Expand Up @@ -1337,6 +1339,10 @@ nginx-ingress:
fido2ConfigLabels: { }
# -- fido2 config ingress resource additional annotations.
fido2ConfigAdditionalAnnotations: { }
# -- fido2 ingress resource labels. key app is taken
fido2Labels: { }
# -- fido2 ingress resource additional annotations.
fido2AdditionalAnnotations: { }
# -- Auth server ingress resource labels. key app is taken
authServerLabels: { }
# -- Auth server ingress resource additional annotations.
Expand Down