ROX-30578: Configure process baseline auto locking via helm#16462
Conversation
|
Skipping CI for Draft Pull Request. |
|
Caution There are some errors in your PipelineRun template.
|
|
Images are ready for the commit at 2917cf7. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16462 +/- ##
==========================================
- Coverage 48.79% 48.78% -0.01%
==========================================
Files 2712 2712
Lines 202332 202335 +3
==========================================
- Hits 98731 98717 -14
- Misses 95817 95830 +13
- Partials 7784 7788 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
27908d7 to
27e1369
Compare
faba628 to
37f5da3
Compare
ajheflin
left a comment
There was a problem hiding this comment.
LGTM from the CWF side. Would like to get an install approval as well, though
image/templates/helm/stackrox-secured-cluster/internal/cluster-config.yaml.tpl
Outdated
Show resolved
Hide resolved
a6ee31c to
3e60e4a
Compare
…INES in two locations
…d feature flag protection there.
6cb6343 to
2917cf7
Compare
Khusboo messaged me "If Moritz approves please feel free to dismiss my review to unblock your merge."
|
/test gke-nongroovy-e2e-tests |
Description
Previously it was made possible to control process baseline auto-locking via the cluster API. This PR makes it so that it can be managed via helm and so that if it is managed by helm, it cannot be managed via API.
Also makes it possible to use the internal scripts to configure helm to enable auto-locking process baselines when the environment variable
SECURED_CLUSTER_AUTO_LOCK_PROCESS_BASELINEis set to true.This PR is built on top of #16669
Add process baseline autolocking to cluster config
#16427
User-facing documentation
Testing and quality
Automated testing
How I validated my change
Set the following environment variables
Deployed using
deploy/deploy-local.sh.Checked the cluster config via API.
Created a deployment, entered it, and ran a command in it.
Waited five minutes and checked "Risk"
The process baseline is locked. Other deployments were also locked.
Ran another command in the pod
There is an alert for the process baseline violation.
Upgrade test
Used the following scripts to deploy ACS using helm on an openshift-4 cluster.
The following files were used to specify the helm settings for central and secured cluster.
The helm charts were created
The deploy script was run
After more than three minutes. Checked "Risk" in the UI.
The process baselines are locked.
An upgrade was then done which disabled process baseline auto-locking.
The following script was run
The input file was
To do the upgrade the following command was run
The state of the pods was checked
Sensor had restarted, but no other components had restarted.
The API was checked and process baseline auto-locking was disabled.
A pod was created for testing.
The UI was checked a little more than three minutes later.
The baseline was still unlocked as expected.
Checking helm templates and files
Ran
Took a look at the output
internal/defaults/30-base-config.yamlwas missingautoLockProcessBaselines, as expected../internal/cluster-config.yaml.tplwas also missing
autoLockProcessBaselinesas expectedThe secured cluster was deployed without setting
--set autoLockProcessBaselines.enabled.The helm-cluster-config secret was checked
The base64 encoded secret was decoded.
autoLockProcessBaselinesis missing as expected.The test was repeated with
--set autoLockProcessBaselines.enabled=true.The secret was checked again
As expected
autoLockProcessBaselinesis missing.Testing with the feature flag enabled
make-helm-charts.shwas altered to the followingThus enabling the feature flag during the instantiation of the helm charts.
The helm chart templates were checked
internal/defaults/30-base-config.yamlhadautoLockProcessBaselinesinternal/cluster-config.yaml.tplhadautoLockProcessBaselinesThe secured cluster was deployed with
--set autoLockProcessBaselines.enabled=true.The helm-cluster-config shows that the feature is enabled