From 4e2e60a446590789a26acdbda7bc6c40258736e6 Mon Sep 17 00:00:00 2001
From: "Rustam Lotsmanenko (EPAM)" <rustam_lotsmanenko@epam.com>
Date: Tue, 29 Mar 2022 08:34:52 +0000
Subject: [PATCH] fix readme, delete unwanted properties(GONRG-4634)

---
 .../notification-gcp/docs/anthos/README.md    |  1 -
 provider/notification-gcp/docs/gcp/README.md  |  1 -
 provider/notification-gcp/pom.xml             |  2 +-
 .../gcp/util/GcpAppServiceConfig.java         | 33 -------------------
 .../resources/application-anthos.properties   |  5 ++-
 5 files changed, 5 insertions(+), 37 deletions(-)
 delete mode 100644 provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GcpAppServiceConfig.java

diff --git a/provider/notification-gcp/docs/anthos/README.md b/provider/notification-gcp/docs/anthos/README.md
index 2ab828d7f..65d3dc918 100644
--- a/provider/notification-gcp/docs/anthos/README.md
+++ b/provider/notification-gcp/docs/anthos/README.md
@@ -19,7 +19,6 @@
 | ---  | ---   | ---         | ---        | ---    |
 | `APP_ENTITLEMENTS` | ex `https://entitlements.com/entitlements/v1` | Entitlements API endpoint | no | output of infrastructure deployment |
 | `APP_REGISTER` | ex `https://register.com/api/register/v1` | Register API endpoint | no | output of infrastructure deployment |
-| `APP_PROJECT` | ex `opendes` | Google Cloud Project Id | no | output of infrastructure deployment |
 | `PARTITION_API` | ex `http://localhost:8081/api/partition/v1` | Partition service endpoint | no | - |
 
 **System Environment required to run service**
diff --git a/provider/notification-gcp/docs/gcp/README.md b/provider/notification-gcp/docs/gcp/README.md
index a40859ab1..0e193136c 100644
--- a/provider/notification-gcp/docs/gcp/README.md
+++ b/provider/notification-gcp/docs/gcp/README.md
@@ -16,7 +16,6 @@
 | ---  | ---   | ---         | ---        | ---    |
 | `APP_ENTITLEMENTS` | ex `https://entitlements.com/entitlements/v1` | Entitlements API endpoint | no | output of infrastructure deployment |
 | `APP_REGISTER` | ex `https://register.com/api/register/v1` | Storage API endpoint | no | output of infrastructure deployment |
-| `APP_PROJECT` | ex `opendes` | Google Cloud Project Id | no | output of infrastructure deployment |
 | `PARTITION_API` | ex `http://localhost:8081/api/partition/v1` | Partition service endpoint | no | - |
 | `SERVICE_TOKEN_PROVIDER` | ex `GCP` or `OPENID` | Service token provider | no | - |
 
diff --git a/provider/notification-gcp/pom.xml b/provider/notification-gcp/pom.xml
index 8cbe51e17..0a7e7d70c 100644
--- a/provider/notification-gcp/pom.xml
+++ b/provider/notification-gcp/pom.xml
@@ -44,7 +44,7 @@
         <dependency>
             <groupId>org.opengroup.osdu</groupId>
             <artifactId>core-lib-gcp</artifactId>
-            <version>0.14.0-rc2</version>
+            <version>0.14.0-rc3</version>
         </dependency>
 
         <dependency>
diff --git a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GcpAppServiceConfig.java b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GcpAppServiceConfig.java
deleted file mode 100644
index f4d35e2a5..000000000
--- a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GcpAppServiceConfig.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2017-2020, Schlumberger
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opengroup.osdu.notification.provider.gcp.util;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Primary;
-import org.springframework.stereotype.Component;
-
-@Component
-@Primary
-public class GcpAppServiceConfig {
-
-    @Value("${APP_PROJECT}")
-    private String googleCloudProject;
-
-    public String getGoogleCloudProject() {
-        return googleCloudProject;
-    }
-}
\ No newline at end of file
diff --git a/provider/notification-gcp/src/main/resources/application-anthos.properties b/provider/notification-gcp/src/main/resources/application-anthos.properties
index 9aa4ecc28..4f5988ee5 100644
--- a/provider/notification-gcp/src/main/resources/application-anthos.properties
+++ b/provider/notification-gcp/src/main/resources/application-anthos.properties
@@ -17,4 +17,7 @@
 
 service.token.provider=OPENID
 partition-auth-enabled=false
-oqmDriver=rabbitmq
\ No newline at end of file
+oqmDriver=rabbitmq
+openid.provider-url=${OPENID_PROVIDER_URL}
+openid.provider-client-id=${OPENID_PROVIDER_CLIENT_ID}
+openid.provider-client-secret=${OPENID_PROVIDER_CLIENT_SECRET}
\ No newline at end of file
-- 
GitLab