From c5201e37de1d056512a397683b9ca5f3556ef859 Mon Sep 17 00:00:00 2001
From: "Volodymyr Pienskoi [EPAM / GCP]" <volodymyr_pienskoi@epam.com>
Date: Mon, 9 Jan 2023 12:17:25 +0000
Subject: [PATCH] GONRG-6196: Remove variables that disable using policy

---
 devops/gcp/deploy/README.md                                    | 1 -
 devops/gcp/deploy/templates/configmap.yaml                     | 1 -
 devops/gcp/deploy/values.yaml                                  | 1 -
 provider/storage-gcp/src/main/resources/application.properties | 2 +-
 4 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/devops/gcp/deploy/README.md b/devops/gcp/deploy/README.md
index 25867b55f..2ca3caf16 100644
--- a/devops/gcp/deploy/README.md
+++ b/devops/gcp/deploy/README.md
@@ -41,7 +41,6 @@ First you need to set variables in **values.yaml** file using any code editor. S
 **redisGroupHost** | Redis host for groups | string | `redis-group-master` | yes
 **redisStorageHost** | Redis host for storage | string | `redis-storage-master` | yes
 **googleAudiences** | Client ID of Google Cloud Credentials, ex `123-abc123.apps.googleusercontent.com` | string | - | yes
-**opaEnabled** | whether OPA is enabled | boolean | true | yes
 **opaEndpoint** | OPA host address | string | `http://opa` | yes
 **storageHost** | Storage service host address | string | `http://storage` | only if `conf.bootstrapEnabled` is true
 **defaultLegalTag** | Name of the previously created legal tag (without partition part) | string | `default-data-tag` | only if `conf.bootstrapEnabled` is true
diff --git a/devops/gcp/deploy/templates/configmap.yaml b/devops/gcp/deploy/templates/configmap.yaml
index a317d9ccf..6f2fdf668 100644
--- a/devops/gcp/deploy/templates/configmap.yaml
+++ b/devops/gcp/deploy/templates/configmap.yaml
@@ -16,7 +16,6 @@ data:
   REDIS_STORAGE_HOST: {{ .Values.data.redisStorageHost | quote }}
   STORAGE_SERVICE_ACCOUNT_EMAIL: {{ .Values.data.storageServiceAccountEmail | quote }}
   SPRING_PROFILES_ACTIVE: {{ .Values.data.springProfilesActive | quote }}
-  OPA_ENABLED: {{ .Values.data.opaEnabled | quote }}
   OPA_ENDPOINT: {{ .Values.data.opaEndpoint | quote }}
   {{- if not .Values.conf.onPremEnabled }}
   GOOGLE_AUDIENCES: {{ .Values.data.googleAudiences | quote }}
diff --git a/devops/gcp/deploy/values.yaml b/devops/gcp/deploy/values.yaml
index a0a4fd947..b93f4b056 100644
--- a/devops/gcp/deploy/values.yaml
+++ b/devops/gcp/deploy/values.yaml
@@ -15,7 +15,6 @@ data:
   redisGroupHost: "redis-group-master"
   redisStorageHost: "redis-storage-master"
   googleAudiences: ""
-  opaEnabled: true
   opaEndpoint: "http://opa"
   storageHost: "http://storage"
   defaultLegalTag: "default-data-tag"
diff --git a/provider/storage-gcp/src/main/resources/application.properties b/provider/storage-gcp/src/main/resources/application.properties
index 11093090a..493082a75 100644
--- a/provider/storage-gcp/src/main/resources/application.properties
+++ b/provider/storage-gcp/src/main/resources/application.properties
@@ -15,7 +15,7 @@ osdu.spring.config.enableEncodedSpecialCharacters=true
 
 service.policy.enabled=true
 opa.opa-endpoint=${OPA_ENDPOINT:notused}
-opa.enabled=${OPA_ENABLED:false}
+opa.enabled=true
 legal-tags-changed-topic-name=legaltags_changed
 legal-tags-changed-subscription-name=storage-oqm-legaltags-changed
 pubsub-search-topic=records-changed
-- 
GitLab