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

feat(cloud-native): add ingress for jans-lock as jans-auth service #8857

Merged
merged 4 commits into from
Jul 4, 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
10 changes: 6 additions & 4 deletions charts/janssen-all-in-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Kubernetes: `>=v1.22.0-0`
| additionalLabels | object | `{}` | Additional labels that will be added across the gateway in the format of {mylabel: "myapp"} |
| adminPassword | string | `"Test1234#"` | Admin password to log in to the UI. |
| alb.ingress | bool | `false` | switches the service to Nodeport for ALB ingress |
| auth-server | object | `{"appLoggers":{"auditStatsLogLevel":"INFO","auditStatsLogTarget":"FILE","authLogLevel":"INFO","authLogTarget":"STDOUT","enableStdoutLogPrefix":"true","httpLogLevel":"INFO","httpLogTarget":"FILE","ldapStatsLogLevel":"INFO","ldapStatsLogTarget":"FILE","persistenceDurationLogLevel":"INFO","persistenceDurationLogTarget":"FILE","persistenceLogLevel":"INFO","persistenceLogTarget":"FILE","scriptLogLevel":"INFO","scriptLogTarget":"FILE"},"authEncKeys":"RSA1_5 RSA-OAEP","authSigKeys":"RS256 RS384 RS512 ES256 ES384 ES512 PS256 PS384 PS512","enabled":true,"ingress":{"authServerEnabled":true,"deviceCodeEnabled":true,"firebaseMessagingEnabled":true,"openidConfigEnabled":true,"u2fConfigEnabled":true,"uma2ConfigEnabled":true,"webdiscoveryEnabled":true,"webfingerEnabled":true},"lockEnabled":false}` | Parameters used globally across all services helm charts. |
| auth-server | object | `{"appLoggers":{"auditStatsLogLevel":"INFO","auditStatsLogTarget":"FILE","authLogLevel":"INFO","authLogTarget":"STDOUT","enableStdoutLogPrefix":"true","httpLogLevel":"INFO","httpLogTarget":"FILE","ldapStatsLogLevel":"INFO","ldapStatsLogTarget":"FILE","persistenceDurationLogLevel":"INFO","persistenceDurationLogTarget":"FILE","persistenceLogLevel":"INFO","persistenceLogTarget":"FILE","scriptLogLevel":"INFO","scriptLogTarget":"FILE"},"authEncKeys":"RSA1_5 RSA-OAEP","authSigKeys":"RS256 RS384 RS512 ES256 ES384 ES512 PS256 PS384 PS512","enabled":true,"ingress":{"authServerEnabled":true,"deviceCodeEnabled":true,"firebaseMessagingEnabled":true,"lockConfigEnabled":false,"openidConfigEnabled":true,"u2fConfigEnabled":true,"uma2ConfigEnabled":true,"webdiscoveryEnabled":true,"webfingerEnabled":true},"lockEnabled":false}` | Parameters used globally across all services helm charts. |
| auth-server-key-rotation | object | `{"additionalAnnotations":{},"additionalLabels":{},"customScripts":[],"dnsConfig":{},"dnsPolicy":"","enabled":true,"image":{"pullPolicy":"IfNotPresent","pullSecrets":[],"repository":"ghcr.io/janssenproject/jans/certmanager","tag":"1.1.3_dev"},"initKeysLife":48,"keysLife":48,"keysPushDelay":0,"keysPushStrategy":"NEWER","keysStrategy":"NEWER","lifecycle":{},"resources":{"limits":{"cpu":"300m","memory":"300Mi"},"requests":{"cpu":"300m","memory":"300Mi"}},"usrEnvs":{"normal":{},"secret":{}},"volumeMounts":[],"volumes":[]}` | Responsible for regenerating auth-keys per x hours |
| auth-server-key-rotation.additionalAnnotations | object | `{}` | Additional annotations that will be added across the gateway in the format of {cert-manager.io/issuer: "letsencrypt-prod"} |
| auth-server-key-rotation.additionalLabels | object | `{}` | Additional labels that will be added across the gateway in the format of {mylabel: "myapp"} |
Expand Down Expand Up @@ -75,10 +75,11 @@ Kubernetes: `>=v1.22.0-0`
| auth-server.authEncKeys | string | `"RSA1_5 RSA-OAEP"` | space-separated key algorithm for encryption (default to `RSA1_5 RSA-OAEP`) |
| auth-server.authSigKeys | string | `"RS256 RS384 RS512 ES256 ES384 ES512 PS256 PS384 PS512"` | space-separated key algorithm for signing (default to `RS256 RS384 RS512 ES256 ES384 ES512 PS256 PS384 PS512`) |
| auth-server.enabled | bool | `true` | Boolean flag to enable/disable auth-server chart. You should never set this to false. |
| auth-server.ingress | object | `{"authServerEnabled":true,"deviceCodeEnabled":true,"firebaseMessagingEnabled":true,"openidConfigEnabled":true,"u2fConfigEnabled":true,"uma2ConfigEnabled":true,"webdiscoveryEnabled":true,"webfingerEnabled":true}` | Enable endpoints in either istio or nginx ingress depending on users choice |
| auth-server.ingress | object | `{"authServerEnabled":true,"deviceCodeEnabled":true,"firebaseMessagingEnabled":true,"lockConfigEnabled":false,"openidConfigEnabled":true,"u2fConfigEnabled":true,"uma2ConfigEnabled":true,"webdiscoveryEnabled":true,"webfingerEnabled":true}` | Enable endpoints in either istio or nginx ingress depending on users choice |
| auth-server.ingress.authServerEnabled | bool | `true` | Enable Auth server endpoints /jans-auth |
| auth-server.ingress.deviceCodeEnabled | bool | `true` | Enable endpoint /device-code |
| auth-server.ingress.firebaseMessagingEnabled | bool | `true` | Enable endpoint /firebase-messaging-sw.js |
| auth-server.ingress.lockConfigEnabled | bool | `false` | Enable endpoint /.well-known/lock-master-configuration |
| auth-server.ingress.openidConfigEnabled | bool | `true` | Enable endpoint /.well-known/openid-configuration |
| auth-server.ingress.u2fConfigEnabled | bool | `true` | Enable endpoint /.well-known/fido-configuration |
| auth-server.ingress.uma2ConfigEnabled | bool | `true` | Enable endpoint /.well-known/uma2-configuration |
Expand Down Expand Up @@ -194,7 +195,6 @@ Kubernetes: `>=v1.22.0-0`
| configmap.kcDbUsername | string | `"keycloak"` | Keycloak database username |
| configmap.kcDbVendor | string | `"mysql"` | Keycloak database vendor name (default to MySQL server). To use PostgreSQL server, change the value to postgres. |
| configmap.kcLogLevel | string | `"INFO"` | Keycloak logging level |
| configmap.kcProxy | string | `"edge"` | Keycloak proxy mode (for most deployments, this doesn't need to be changed) |
| configmap.lbAddr | string | `""` | Load balancer address for AWS if the FQDN is not registered. |
| configmap.quarkusTransactionEnableRecovery | bool | `true` | Quarkus transaction recovery. When using MySQL, there could be issue regarding XA_RECOVER_ADMIN; refer to https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_xa-recover-admin for details. |
| countryCode | string | `"US"` | Country code. Used for certificate creation. |
Expand Down Expand Up @@ -296,6 +296,8 @@ Kubernetes: `>=v1.22.0-0`
| 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"` | |
| nginx-ingress.ingress.lockConfigAdditionalAnnotations | object | `{}` | Lock config ingress resource additional annotations. |
| nginx-ingress.ingress.lockConfigLabels | object | `{}` | Lock config ingress resource labels. key app is taken |
| nginx-ingress.ingress.openidAdditionalAnnotations | object | `{}` | openid-configuration ingress resource additional annotations. |
| nginx-ingress.ingress.openidConfigLabels | object | `{}` | openid-configuration ingress resource labels. key app is taken |
| nginx-ingress.ingress.path | string | `"/"` | |
Expand Down Expand Up @@ -360,4 +362,4 @@ Kubernetes: `>=v1.22.0-0`
| volumes | list | `[]` | Configure any additional volumes that need to be attached to the pod |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
1 change: 0 additions & 1 deletion charts/janssen-all-in-one/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ data:
{{- if .Values.saml.enabled }}
QUARKUS_TRANSACTION_MANAGER_ENABLE_RECOVERY: {{ .Values.configmap.quarkusTransactionEnableRecovery | quote }}
KC_LOG_LEVEL: {{ .Values.configmap.kcLogLevel | quote }}
KC_PROXY: {{ .Values.configmap.kcProxy | quote }}
KC_DB: {{ .Values.configmap.kcDbVendor | quote }}
KC_DB_USERNAME: {{ .Values.configmap.kcDbUsername | quote }}
KC_DB_SCHEMA: {{ .Values.configmap.kcDbSchema | quote }}
Expand Down
49 changes: 49 additions & 0 deletions charts/janssen-all-in-one/templates/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -708,4 +708,53 @@ spec:
port:
number: 8080
{{- end }}

---

{{ if and (index .Values "auth-server" "lockEnabled") (index .Values "auth-server" "ingress" "lockConfigEnabled") -}}
{{ $fullName := include "janssen-all-in-one.fullname" . -}}
{{- $ingressPath := index .Values "nginx-ingress" "ingress" "path" -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}-lock-config
labels:
app: {{ $fullName }}-lock-config
{{- if index .Values "nginx-ingress" "ingress" "additionalLabels" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "additionalLabels" | indent 4 }}
{{- end }}
{{- if index .Values "nginx-ingress" "ingress" "lockConfigLabels" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "lockConfigLabels" | indent 4 }}
{{- end }}
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/rewrite-target: /jans-auth/v1/configuration
{{- if index .Values "nginx-ingress" "ingress" "lockConfigAdditionalAnnotations" }}
{{ toYaml index .Values "nginx-ingress" "ingress" "lockConfigAdditionalAnnotations" | 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: /.well-known/lock-master-configuration
pathType: Exact
backend:
service:
name: {{ .Values.service.name }}
port:
number: 8080
{{- end }}

{{- end }}
8 changes: 6 additions & 2 deletions charts/janssen-all-in-one/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ configmap:
quarkusTransactionEnableRecovery: true
# -- Keycloak logging level
kcLogLevel: INFO
# -- Keycloak proxy mode (for most deployments, this doesn't need to be changed)
kcProxy: edge
# -- Keycloak database vendor name (default to MySQL server). To use PostgreSQL server, change the value to postgres.
kcDbVendor: mysql
# -- Keycloak database username
Expand Down Expand Up @@ -239,6 +237,8 @@ auth-server:
webdiscoveryEnabled: true
# -- Enable endpoint /.well-known/fido-configuration
u2fConfigEnabled: true
# -- Enable endpoint /.well-known/lock-master-configuration
lockConfigEnabled: false
# -- Enable jans-lock as service running inside auth-server
lockEnabled: false
# -- Responsible for regenerating auth-keys per x hours
Expand Down Expand Up @@ -596,6 +596,10 @@ nginx-ingress:
samlLabels: { }
# -- SAML ingress resource additional annotations.
samlAdditionalAnnotations: { }
# -- Lock config ingress resource labels. key app is taken
lockConfigLabels: {}
# -- Lock config ingress resource additional annotations.
lockConfigAdditionalAnnotations: {}
# -- Additional labels that will be added across all ingress definitions in the format of {mylabel: "myapp"}
additionalLabels: { }
# -- Additional annotations that will be added across all ingress definitions in the format of {cert-manager.io/issuer: "letsencrypt-prod"}
Expand Down
Loading