-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Støtte for opprettelse og redigering av SOPS config + default RoS-gen…
…erering (#286) * Add endpoint for initializing risc and sops config by calling init-risc-api * WIP * En bruker kan nå komme i gang med SOPS, og sette opp default RoS * Fixing vulnerability in build-and-deploy-to-skip.yml * Fix lint error * Add clarifying comment * Bumping packages * Downgrading to kotlin 2.0.21 as ktlint does not support 2.1.0 yet
- Loading branch information
Showing
42 changed files
with
1,390 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
ISSUER_URI="http://localhost:7007/api/auth" | ||
RISC_FOLDER_PATH=".security/risc" | ||
FILENAME_PREFIX="risc" | ||
FILENAME_POSTFIX="risc" | ||
FILENAME_POSTFIX="risc" | ||
BACKEND_PUBLIC_KEY=${BACKEND_PUBLIC_KEY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ jobs: | |
echo "\"${{ needs.build.outputs.image_url }}\"" > "env/atgcp1-dev/ros-plugin-main/${{ env.ARGO_VERSION_FILE }}" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Backstage Plugin Risk Scorecard Backend CI" | ||
git commit -am "${{ github.event.head_commit.message }}" | ||
git commit -am "Update Risk Scorecard Backend" | ||
git push | ||
prod-deploy-argo: | ||
|
@@ -195,5 +195,5 @@ jobs: | |
echo "\"${{ needs.build.outputs.image_url }}\"" > "env/atgcp1-prod/ros-plugin-main/${{ env.ARGO_VERSION_FILE }}" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Backstage Plugin Risk Scorecard Backend CI" | ||
git commit -am "${{ github.event.head_commit.message }}" | ||
git commit -am "Update Risk Scorecard Backend" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package no.risc.config | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties | ||
import org.springframework.stereotype.Component | ||
|
||
@Component | ||
@ConfigurationProperties(prefix = "init-risc") | ||
class InitRiScServiceConfig { | ||
lateinit var baseUrl: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package no.risc.config | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties | ||
import org.springframework.stereotype.Component | ||
|
||
@Component | ||
@ConfigurationProperties(prefix = "sops") | ||
class SopsServiceConfig { | ||
lateinit var backendPublicKey: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/no/risc/exception/exceptions/CreateNewBranchException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.risc.ProcessRiScResultDTO | ||
|
||
data class CreateNewBranchException( | ||
override val message: String, | ||
val response: ProcessRiScResultDTO, | ||
) : Exception() |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/no/risc/exception/exceptions/GcpProjectIdFetchException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.risc.ProcessRiScResultDTO | ||
|
||
data class GcpProjectIdFetchException( | ||
override val message: String, | ||
val response: ProcessRiScResultDTO, | ||
) : Exception() |
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/no/risc/exception/exceptions/GenerateInitialRiScException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package no.risc.exception.exceptions | ||
|
||
data class GenerateInitialRiScException( | ||
override val message: String, | ||
val riScId: String, | ||
) : Exception() |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/no/risc/exception/exceptions/GitHubFetchException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.risc.ProcessRiScResultDTO | ||
|
||
data class GitHubFetchException( | ||
override val message: String, | ||
val response: ProcessRiScResultDTO, | ||
) : Exception() |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/no/risc/exception/exceptions/NoResourceIdFoundException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.risc.ProcessRiScResultDTO | ||
|
||
data class NoResourceIdFoundException( | ||
override val message: String, | ||
val response: ProcessRiScResultDTO, | ||
) : Exception() |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/no/risc/exception/exceptions/NoSopsConfigFoundException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.sops.model.GetSopsConfigResponseBody | ||
|
||
data class NoSopsConfigFoundException( | ||
override val message: String, | ||
val response: GetSopsConfigResponseBody, | ||
) : Exception() |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/no/risc/exception/exceptions/SopsConfigGenerateFetchException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.risc.ProcessRiScResultDTO | ||
import java.lang.Exception | ||
|
||
data class SopsConfigGenerateFetchException( | ||
override val message: String, | ||
val response: ProcessRiScResultDTO, | ||
) : Exception() |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/no/risc/exception/exceptions/UnableToWriteSopsConfigException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package no.risc.exception.exceptions | ||
|
||
import no.risc.risc.ProcessRiScResultDTO | ||
|
||
data class UnableToWriteSopsConfigException( | ||
override val message: String, | ||
val response: ProcessRiScResultDTO, | ||
) : Exception() |
Oops, something went wrong.