From c61cf5a48fb4548321aae0c8a3e5babf790fc1fe Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 19 Jan 2022 17:54:15 +0100 Subject: [PATCH] #344 unauthorized paged improved on gatekeeper --- .../helm/templates/auto-gatekeepers.yaml | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/utilities/cloudharness_utilities/deployment-configuration/helm/templates/auto-gatekeepers.yaml b/utilities/cloudharness_utilities/deployment-configuration/helm/templates/auto-gatekeepers.yaml index abf9718e..18b9f100 100644 --- a/utilities/cloudharness_utilities/deployment-configuration/helm/templates/auto-gatekeepers.yaml +++ b/utilities/cloudharness_utilities/deployment-configuration/helm/templates/auto-gatekeepers.yaml @@ -9,11 +9,12 @@ metadata: app: "{{ .app.harness.service.name }}-gk" data: proxy.yml: |- - verbose: true + verbose: {{ .root.Values.debug }} discovery-url: {{ ternary "https" "http" $tls}}://{{ .root.Values.apps.accounts.harness.subdomain }}.{{ .root.Values.domain }}/auth/realms/{{ .root.Values.namespace }} client-id: {{ .root.Values.apps.accounts.webclient.id | quote }} client-secret: {{ .root.Values.apps.accounts.webclient.secret }} secure-cookie: {{ $tls }} + forbidden-page: /templates/access-denied.html.tmpl listen: 0.0.0.0:8080 enable-refresh-tokens: true tls-cert: @@ -31,6 +32,43 @@ data: skip-openid-provider-tls-verify: true {{- end }} cacert.crt: {{ .files.Get "resources/certs/cacert.crt" | quote }} + access-denied.html.tmpl: |- + + + + + 403 - Access Forbidden + + + + + + +
+
+
+
+

Oops!

+

403 Permission Denied

+
+ Sorry, you do not have access to this page, please contact your administrator. + If you have been assigned new authorizations try to login again. +
+
+
+
+
+ + + --- apiVersion: v1 kind: Service @@ -82,6 +120,9 @@ spec: - name: "{{ .app.harness.service.name }}-gk-proxy-config" mountPath: /etc/pki/ca-trust/source/anchors/cacert.crt subPath: cacert.crt + - name: "{{ .app.harness.service.name }}-gk-proxy-config" + mountPath: /templates/access-denied.html.tmpl + subPath: access-denied.html.tmpl ports: - name: http containerPort: 8080