* rename Trust Engine to System Trust
* Revert "rename Trust Engine to System Trust"
This reverts commit 66d4680324310790d41b70eed7421d121aac0e03.
* rename Trust Engine to System Trust in logs and docs
* update go version
* fix go vet errors
* replaces stringutils with slices std package
* added slices package
* 1.22.4 to 1.23.4
---------
Co-authored-by: Valentin <valentin.uchkunev@sap.com>
* move to old package
* go mod
* remove old
* refactor done
* Update pkg/vault/oidc.go
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* commit suggestions
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* commit suggestions
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* commit suggestions
---------
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* trust engine config and handelling for vault
* add function for resolving trust engine reference
* refactor
* add basic test
* adapt to new trust engine response format
* remove accidental cyclic dependency
* move trust engine hook config
* refactor by separating code from vault
* move trust engine files to own pkg
* adapt to changes of previous commit
* log full error response of trust engine API
* enable getting multiple tokens from trustengine
* remove comment
* incorporate review comments
* go generate
* update unit tests
* apply suggested changes from code review
* fix unit tests
* add unit tests for config pkg
* make changes based on review comments
* make trust engine token available in GeneralConfig and minor fixes
* fix error logic when reading trust engine hook
* make getResponse more flexible and update logging
* update resource reference format
* improve URL handling
* improve logging
* use errors.Wrap() instead of errors.Join()
* update log messages based on suggestions
* remove trustengine resource ref from Sonar step
---------
Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: jliempt <>
* support trustedCerts for cloneGitRepo
* some more steps
* Update sap_com_0948.go
* remove warning for config value type
* updated description for certificateNames
* go generate artifacts
* variable order and space in "[]interface {}"
* feat(configs): vaultCredentialEnvPrefix to support several prefixes
* minor refactoring
* docs
---------
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
* fix sidecar conditionals
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
* Fix unit tests
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
* Consider parameter used in conditions of sidecars
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
---------
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
* Add support for volume mounts
* Adatpt unit test to include VolumeMounts
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
* Only accept volumeMounts with the name volume
---------
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
* implement deactivation logic
* add step condition field
* add unit test and fix evaluateConditions
* add unit test for v1 and fix evaluateConditionsV1
* rollback old evaluator
* rollback v1 evaluator
* move into notActiveCondition and fix unit tests
* add a comment about sapCumulusUpload step
* optimize evaluateConditionsV1 parameters and map memory allocation
* refactor unit tests and add more test cases
* evaluateConditionsV1 refactored
---------
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
* Added unit tag as argument. Added description to runTests command. Changed code generator to have unit build tag in generated unit test files.
* Added unit build tag to all unit test files.
* added to new unit test unit build tag
* Update verify-go.yml
* small fix
---------
Co-authored-by: Muhammadali Nazarov <Muhammadali.Nazarov@acronis.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* feat(cnbBuild): support Vault general purpose secrets as a binding content source
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
* fix npm project integration test
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
---------
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
with #3875 temp directory was created in current workspace.
This had negative side-effects: For example npm build packaged and published temporary files
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.
Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
is also tedious, but `t.TempDir` handles this for us nicely.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
* (fix) match regexes in sliceContains to support vaultSecretNames
* add test for regex matching in sliceContains
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
* including negative conditions
* clean up and todos
* removing debug logging
* clean up
* fix unit test name
* fixing unit tests
* negative stage test
Co-authored-by: anilkeshav27 <you@example.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
this was already used in fortifyExecuteScan, but had no effect.
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>