From c88b3b0ba7530ff99be12c958af6ec2e182edaaf Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Tue, 16 Jul 2024 23:13:08 +0300 Subject: [PATCH] Remove "Replay" function functionality (#1563) --- config/configStruct.go | 1 - config/configStructs/tapConfig.go | 2 -- helm-chart/README.md | 2 +- helm-chart/templates/06-front-deployment.yaml | 2 -- helm-chart/templates/12-config-map.yaml | 1 - helm-chart/values.yaml | 2 -- manifests/complete.yaml | 5 +---- 7 files changed, 2 insertions(+), 13 deletions(-) diff --git a/config/configStruct.go b/config/configStruct.go index e23f62e31..6b24bcbdd 100644 --- a/config/configStruct.go +++ b/config/configStruct.go @@ -64,7 +64,6 @@ func CreateDefaultConfig() ConfigStruct { Roles: map[string]configStructs.Role{ "admin": { Filter: "", - CanReplayTraffic: true, CanDownloadPCAP: true, CanUseScripting: true, CanUpdateTargetedPods: true, diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index a01d9bcec..a3a3f46d2 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -91,7 +91,6 @@ type ResourcesConfig struct { type Role struct { Filter string `yaml:"filter" json:"filter" default:""` - CanReplayTraffic bool `yaml:"canReplayTraffic" json:"canReplayTraffic" default:"false"` CanDownloadPCAP bool `yaml:"canDownloadPCAP" json:"canDownloadPCAP" default:"false"` CanUseScripting bool `yaml:"canUseScripting" json:"canUseScripting" default:"false"` CanUpdateTargetedPods bool `yaml:"canUpdateTargetedPods" json:"canUpdateTargetedPods" default:"false"` @@ -187,7 +186,6 @@ type TapConfig struct { KernelModule KernelModuleConfig `yaml:"kernelModule" json:"kernelModule"` Telemetry TelemetryConfig `yaml:"telemetry" json:"telemetry"` DefaultFilter string `yaml:"defaultFilter" json:"defaultFilter"` - ReplayDisabled bool `yaml:"replayDisabled" json:"replayDisabled" default:"false"` ScriptingDisabled bool `yaml:"scriptingDisabled" json:"scriptingDisabled" default:"false"` TargetedPodsUpdateDisabled bool `yaml:"targetedPodsUpdateDisabled" json:"targetedPodsUpdateDisabled" default:"false"` RecordingDisabled bool `yaml:"recordingDisabled" json:"recordingDisabled" default:"false"` diff --git a/helm-chart/README.md b/helm-chart/README.md index 709ca0a17..fb203fe46 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -157,7 +157,7 @@ Please refer to [metrics](./metrics.md) documentation for details. | `tap.auth.saml.x509crt` | A self-signed X.509 `.cert` contents
(effective, if `tap.auth.type = saml`) | `` | | `tap.auth.saml.x509key` | A self-signed X.509 `.key` contents
(effective, if `tap.auth.type = saml`) | `` | | `tap.auth.saml.roleAttribute` | A SAML attribute name corresponding to user's authorization role
(effective, if `tap.auth.type = saml`) | `role` | -| `tap.auth.saml.roles` | A list of SAML authorization roles and their permissions
(effective, if `tap.auth.type = saml`) | `{"admin":{"canDownloadPCAP":true,"canReplayTraffic":true,"canUpdateTargetedPods":true,"canUseScripting":true,"filter":"","showAdminConsoleLink":true}}` | +| `tap.auth.saml.roles` | A list of SAML authorization roles and their permissions
(effective, if `tap.auth.type = saml`) | `{"admin":{"canDownloadPCAP":true,"canUpdateTargetedPods":true,"canUseScripting":true,"filter":"","showAdminConsoleLink":true}}` | | `tap.ingress.enabled` | Enable `Ingress` | `false` | | `tap.ingress.className` | Ingress class name | `""` | | `tap.ingress.host` | Host of the `Ingress` | `ks.svc.cluster.local` | diff --git a/helm-chart/templates/06-front-deployment.yaml b/helm-chart/templates/06-front-deployment.yaml index 91dac0771..24168c19f 100644 --- a/helm-chart/templates/06-front-deployment.yaml +++ b/helm-chart/templates/06-front-deployment.yaml @@ -38,8 +38,6 @@ spec: value: '{{ not (eq .Values.tap.auth.saml.idpMetadataUrl "") | ternary .Values.tap.auth.saml.idpMetadataUrl " " }}' - name: REACT_APP_TIMEZONE value: '{{ not (eq .Values.timezone "") | ternary .Values.timezone " " }}' - - name: REACT_APP_REPLAY_DISABLED - value: '{{ .Values.tap.replayDisabled }}' - name: REACT_APP_SCRIPTING_DISABLED value: '{{ .Values.tap.scriptingDisabled }}' - name: REACT_APP_TARGETED_PODS_UPDATE_DISABLED diff --git a/helm-chart/templates/12-config-map.yaml b/helm-chart/templates/12-config-map.yaml index 27a7e6539..f78c72c7d 100644 --- a/helm-chart/templates/12-config-map.yaml +++ b/helm-chart/templates/12-config-map.yaml @@ -25,7 +25,6 @@ data: AUTH_SAML_ROLE_ATTRIBUTE: '{{ .Values.tap.auth.saml.roleAttribute }}' AUTH_SAML_ROLES: '{{ .Values.tap.auth.saml.roles | toJson }}' TELEMETRY_DISABLED: '{{ not .Values.tap.telemetry.enabled | ternary "true" "" }}' - REPLAY_DISABLED: '{{ .Values.tap.replayDisabled | ternary "true" "" }}' SCRIPTING_DISABLED: '{{ .Values.tap.scriptingDisabled | ternary "true" "" }}' TARGETED_PODS_UPDATE_DISABLED: '{{ .Values.tap.targetedPodsUpdateDisabled | ternary "true" "" }}' RECORDING_DISABLED: '{{ .Values.tap.recordingDisabled | ternary "true" "" }}' diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 1ab98d3e6..875518257 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -75,7 +75,6 @@ tap: roles: admin: filter: "" - canReplayTraffic: true canDownloadPCAP: true canUseScripting: true canUpdateTargetedPods: true @@ -95,7 +94,6 @@ tap: telemetry: enabled: true defaultFilter: "" - replayDisabled: false scriptingDisabled: false targetedPodsUpdateDisabled: false recordingDisabled: false diff --git a/manifests/complete.yaml b/manifests/complete.yaml index e7cf67ff6..a1b29363a 100644 --- a/manifests/complete.yaml +++ b/manifests/complete.yaml @@ -234,9 +234,8 @@ data: AUTH_TYPE: 'oidc' AUTH_SAML_IDP_METADATA_URL: '' AUTH_SAML_ROLE_ATTRIBUTE: 'role' - AUTH_SAML_ROLES: '{"admin":{"canDownloadPCAP":true,"canReplayTraffic":true,"canUpdateTargetedPods":true,"canUseScripting":true,"filter":"","showAdminConsoleLink":true}}' + AUTH_SAML_ROLES: '{"admin":{"canDownloadPCAP":true,"canUpdateTargetedPods":true,"canUseScripting":true,"filter":"","showAdminConsoleLink":true}}' TELEMETRY_DISABLED: '' - REPLAY_DISABLED: '' SCRIPTING_DISABLED: '' TARGETED_PODS_UPDATE_DISABLED: '' RECORDING_DISABLED: '' @@ -765,8 +764,6 @@ spec: value: ' ' - name: REACT_APP_TIMEZONE value: ' ' - - name: REACT_APP_REPLAY_DISABLED - value: 'false' - name: REACT_APP_SCRIPTING_DISABLED value: 'false' - name: REACT_APP_TARGETED_PODS_UPDATE_DISABLED