From a45d36f664260bb727d23fd91572631e162ea7a4 Mon Sep 17 00:00:00 2001
From: Hutomo Saleh <hutomo.saleh@iem.fraunhofer.de>
Date: Wed, 31 Jul 2024 08:49:58 +0200
Subject: [PATCH] fix: revert tool api auth config

---
 .../src/main/resources/application.properties    |  2 ++
 app/backend/src/main/resources/dev.properties    | 12 ++++++++----
 app/backend/src/main/resources/local.properties  | 16 +++++++++++++---
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/app/backend/src/main/resources/application.properties b/app/backend/src/main/resources/application.properties
index 15fa5f3e..693118a0 100644
--- a/app/backend/src/main/resources/application.properties
+++ b/app/backend/src/main/resources/application.properties
@@ -19,6 +19,8 @@ security.hmac-key=${HMAC_KEY}
 # Tool APIs
 opencode.api.base-path=https://software.opencode.de/api/v1/project/
 opencode.api.ort=/cve-result
+opencode.api.auth=https://sl.dev.o4oe.de/api/
+opencode.api.auth-api-key=${AUTH_API_KEY}
 
 # OCCMD specific settings
 # path to the occmd tool executable
diff --git a/app/backend/src/main/resources/dev.properties b/app/backend/src/main/resources/dev.properties
index 258d84f9..297bd070 100644
--- a/app/backend/src/main/resources/dev.properties
+++ b/app/backend/src/main/resources/dev.properties
@@ -1,7 +1,11 @@
-spring.datasource.url=jdbc:postgresql://${host}:${DB_PORT}/${DB_NAME}?sslmode=disable&user=root
-spring.jpa.hibernate.ddl-auto=update
+# Config for the OpencoDE platform
 opencode.host=https://gitlab.dev.o4oe.de/
+opencode.analyze-private-repos=true
+
+# Tool APIs
 opencode.api.base-path=https://sl.dev.o4oe.de/api/v1/project/
 opencode.api.auth=https://sl.dev.o4oe.de/api/
-opencode.api.auth-api-key=${AUTH_API_KEY}
-opencode.analyze-private-repos=true
+
+# Database Settings
+spring.datasource.url=jdbc:postgresql://${host}:${DB_PORT}/${DB_NAME}?sslmode=disable&user=root
+spring.jpa.hibernate.ddl-auto=update
diff --git a/app/backend/src/main/resources/local.properties b/app/backend/src/main/resources/local.properties
index 776b2561..22be05e0 100644
--- a/app/backend/src/main/resources/local.properties
+++ b/app/backend/src/main/resources/local.properties
@@ -1,5 +1,15 @@
-spring.config.import=optional:classpath:.env[.properties]
-spring.datasource.url=jdbc:postgresql://${host}:${DB_PORT}/${DB_NAME}?sslmode=disable&user=root
-spring.jpa.hibernate.ddl-auto=create-drop
+# Config for the OpencoDE platform
 opencode.host=https://gitlab.opencode.de/
 opencode.analyze-private-repos=true
+
+# Tool APIs
+opencode.api.base-path=https://sl.dev.o4oe.de/api/v1/project/
+opencode.api.auth=https://sl.dev.o4oe.de/api/receive-session/
+
+# Database Settings
+spring.datasource.url=jdbc:postgresql://${host}:${DB_PORT}/${DB_NAME}?sslmode=disable&user=root
+spring.jpa.hibernate.ddl-auto=create-drop
+
+# Import local .env
+spring.config.import=optional:classpath:.env[.properties]
+
-- 
GitLab