Skip to content

Commit

Permalink
fix(Orchestrator): permission names and structure in the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoprow committed May 6, 2024
1 parent afd30c7 commit e601e42
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
}


Expand Down
27 changes: 10 additions & 17 deletions bpdm-orchestrator/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e601e42

Please sign in to comment.