From 73730fd93bad65cec5ceb4fd8c8bc08ae82118b3 Mon Sep 17 00:00:00 2001 From: Nico Koprowski Date: Mon, 6 May 2024 15:05:36 +0800 Subject: [PATCH] fix(Orchestrator): permission names and structure in the configuration --- .../config/PermissionConfigProperties.kt | 8 +++--- .../src/main/resources/application.yml | 27 +++++++------------ pom.xml | 2 +- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/bpdm-orchestrator/src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/config/PermissionConfigProperties.kt b/bpdm-orchestrator/src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/config/PermissionConfigProperties.kt index 8cded8fcb..fe7e2fa5d 100644 --- a/bpdm-orchestrator/src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/config/PermissionConfigProperties.kt +++ b/bpdm-orchestrator/src/main/kotlin/org/eclipse/tractusx/bpdm/orchestrator/config/PermissionConfigProperties.kt @@ -28,12 +28,12 @@ import org.springframework.boot.context.properties.ConfigurationProperties data class PermissionConfigProperties( val createTask: String = "create_task", val readTask: String = "read_task", - val reservations: TaskStepProperties = TaskStepProperties( + val reservation: TaskStepProperties = TaskStepProperties( clean = "create_reservation_clean", cleanAndSync = "create_reservation_cleanAndSync", poolSync = "create_reservation_poolSync" ), - val results: TaskStepProperties = TaskStepProperties( + val result: TaskStepProperties = TaskStepProperties( clean = "create_result_clean", cleanAndSync = "create_result_cleanAndSync", poolSync = "create_result_poolSync" @@ -54,12 +54,12 @@ data class PermissionConfigProperties( @Suppress("unused") fun createReservation(step: TaskStep): String{ - return fetchStepPermission(step, reservations) + return fetchStepPermission(step, reservation) } @Suppress("unused") fun createResult(step: TaskStep): String{ - return fetchStepPermission(step, results) + return fetchStepPermission(step, result) } diff --git a/bpdm-orchestrator/src/main/resources/application.yml b/bpdm-orchestrator/src/main/resources/application.yml index 51be8b3bc..ff9806afe 100644 --- a/bpdm-orchestrator/src/main/resources/application.yml +++ b/bpdm-orchestrator/src/main/resources/application.yml @@ -56,31 +56,24 @@ bpdm: # URL to the token validation endpoint of the Keycloak server token-url: ${bpdm.security.auth-server-url}/realms/${bpdm.security.realm}/protocol/openid-connect/token permissions: - task: - # Name of permission to create golden record tasks - create: create_task - # Name of permission to read task status and overall results - read: read_task + # Name of permission to create golden record tasks + createTask: create_task + # Name of permission to read task status and overall results + readTask: read_task reservation: - clean: # Name of permission to create reservations for tasks in step 'Clean' - create: create_reservation_clean - cleanAndSync: + clean: create_reservation_clean # Name of permission to create reservations for tasks in step 'CleanAndSync' - create: create_reservation_cleanAndSync - poolSync: + cleanAndSync: create_reservation_cleanAndSync # Name of permission to create reservations for tasks in step 'PoolSync' - create: create_reservation_poolSync + poolSync: create_reservation_poolSync result: - clean: # Name of permission to post results for tasks in step 'Clean' - create: create_result_clean - cleanAndSync: + clean: create_result_clean # Name of permission to post results for tasks in step 'CleanAndSync' - create: create_result_cleanAndSync - poolSync: + cleanAndSync: create_result_cleanAndSync # Name of permission to post results for tasks in step 'PoolSync' - create: create_result_poolSync + poolSync: create_result_poolSync server: # Change default port to avoid clash with other BPDM applications diff --git a/pom.xml b/pom.xml index 6e46bdc0d..b9ae22c00 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 3.0.5 2.35.2 4.0.2 - 3.25.3 + 3.24.2 3.0.4 catenax-ng https://sonarcloud.io