From ac43a207200b0c8c31a1e6238be56058685e790a Mon Sep 17 00:00:00 2001 From: sudhakaropsmx Date: Thu, 20 Oct 2022 15:12:13 +0530 Subject: [PATCH] OP-18094: integrate pipeline trigger to verify fiat permissions --- build.gradle | 3 +++ .../spinnaker/gate/controllers/PipelineController.groovy | 2 +- gradle.properties | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0dad63c283..9a6f7f3876 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,9 @@ allprojects { if ([korkVersion, fiatVersion].find { it.endsWith('-SNAPSHOT') }) { repositories { mavenLocal() + maven{ + url "https://nexus.opsmx.net/repository/maven-snapshots/" + } } } diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/PipelineController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/PipelineController.groovy index 6b2c0d9bab..d80cb69b5e 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/PipelineController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/PipelineController.groovy @@ -250,7 +250,7 @@ class PipelineController { } @ApiOperation(value = "Trigger a pipeline execution", response = Map.class) - @PreAuthorize("hasPermission(#application, 'APPLICATION', 'EXECUTE')") + @PreAuthorize("hasPermission(#application, 'APPLICATION', 'EXECUTE') && hasPermission(#pipelineNameOrId, 'PIPELINE', 'EXECUTE')") @PostMapping("/v2/{application}/{pipelineNameOrId:.+}") HttpEntity invokePipelineConfigViaEcho(@PathVariable("application") String application, @PathVariable("pipelineNameOrId") String pipelineNameOrId, diff --git a/gradle.properties b/gradle.properties index 65d54158fe..d63e1622f0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ enablePublishing=false -fiatVersion=1.31.2 +fiatVersion=OP-16464-1.31.2-SNAPSHOT includeProviders=basic,iap,ldap,oauth2,saml,x509 korkVersion=7.139.0 kotlinVersion=1.4.0