Skip to content

Add feature toggle for security policies policy scope

Sashi Kumar Kumaresan requested to merge sk/435501-add-toggle into master

What does this MR do and why?

This MR adds a new toggle to enable/disable the Security Policies Policy Scope experimental setting as a group level setting using the cascading settings framework.

We want to release this feature as an experiment.

The toggle itself is behind the security_policies_policy_scope feature flag, before this toggle is visible to users the feature flag needs to be enabled.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image Kapture_2023-12-18_at_07.04.07

How to set up and validate locally

  1. Enable security_policies_policy_scope feature flag
  2. Create new root Group
  3. In Settings -> General -> Permissions and group features find toggle added in this MR
  4. Create new Compliance Framework
  5. Create new Project in that group and assign created Compliance Framework to this project and select second project without framework selected
  6. Create new Scan Execution Policy for the Group and select Policy Scope to be applied only when project has Compliance Framework (ie. add Container Scanning scan for all branches)
  7. Try to save policy - this should work without any problems
  8. Run pipeline in both created projects and if scans is properly enforced
  9. Disable the toggle in Group Setting and run pipelines again; now no scans should be enforced from Scan Execution Policy

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Addresses #435501 (closed)

Edited by Alan (Maciej) Paruszewski

Merge request reports