ROX-30577: Add process baseline autolocking to cluster config#16427
Conversation
|
Skipping CI for Draft Pull Request. |
|
Caution There are some errors in your PipelineRun template.
|
622133b to
d47f009
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## jv-ROX-30135-send-baselines-to-sensor-when-deployment-leaves-observation #16427 +/- ##
==========================================================================================================
Coverage 49.13% 49.13%
==========================================================================================================
Files 2641 2641
Lines 195674 195781 +107
==========================================================================================================
+ Hits 96140 96200 +60
- Misses 91995 92037 +42
- Partials 7539 7544 +5
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:
|
|
Images are ready for the commit at 27e1369. To use with deploy scripts, first |
|
|
This conversation has me thinking. I think I'm going to spend some more time on #16077 tomorrow. This has me wondering if we can isolate the changes further than we have. I think question #1 is a very valid question that revolves around the experience and expectations of the user. Perhaps the result of that is what is locked is locked. Perhaps that has been discussed already. If it hasn't it probably should be as the user expectation matters. (Though I suspect the answer will be they can just add exclusions). If a baseline is locked with the auto feature will it show as |
The first sentence seems simple, but given the context I am not 100% sure what is meant. Locked process baselines are locked until they are unlocked. Turning off the auto lock feature does not to me imply that previously locked process base are unlocked, only that process baselines will need to be manually locked in the future, if it is desired that they be locked.
Yes. Users need to know if a process baseline is locked or unlocked, so it needs to be displayed in the UI.
I don't think we should be taking power away from users. I think there are legitimate reasons why a user might want to enable the auto locking feature in a cluster, but exempt a deployment or set of deployments. |
|
I have added a "Q&A" section to the design document with these questions and my answers to them https://docs.google.com/document/d/1t4O5sVhPt30Ikm5m7fw7XwC6NrviHktOOj8cxunsPF0/edit?usp=sharing |
237bfd8 Lifecycle manager sends baselines to sensor eee08dc Beter separation of baseline creation and inserting them into the database 30d4c46 Cleanup f8fcb4b Added a feature flag f092fcc Only setting the user lock timestamp in detection lifecycle manager if the autolock feature flag is enabled 278b1bc Creating message separate from sending it 01ac856 Not sending baselines to sensor if they already exists and are locked
This reverts commit 64c4f44.
… is passed to .updateProcessBaselineElements even if the baseline already exists
0af82d4 to
b5bc597
Compare
…loyment-leaves-observation
27908d7 to
27e1369
Compare
8575a13 to
6c97e89
Compare
Description
Adds auto locking to the cluster protobuf. Also makes it so that the cluster configuration is used to control auto locking. Thus it will be possible to control process baseline auto locking at the cluster level. The feature flag is still in place and in order to enable process baseline auto locking for a cluster the feature flag needs to be enabled and it needs to be enabled for the cluster via the cluster config.
After this change it will not be possible to control this new cluster field via helm or operator. That will be done in other PRs.
The PR to control process baseline auto-locking via helm can be found here #16462
It is possible to control the new setting via API.
This PR is built upon another PR that auto-locks process baselines and sends them to sensor #16077
User-facing documentation
Testing and quality
Automated testing
How I validated my change
Set the following environment variables
Deployed ACS.
Created a pod that could be used to run some processes and entered it.
Logged into the UI and checked "Risk".
After more than five minutes the process baseline was still unlocked.
Ran the following script to enable process baseline auto locking for the cluster
Created another pod, entered it, and ran a command
Initially the process baseline is unlocked.
After a little more than five minutes the baseline is locked.
Running a new process results in a violation