Uploaded image for project: 'Red Hat Advanced Cluster Security'
  1. Red Hat Advanced Cluster Security
  2. ROX-33188

Update Sensor to wire label providers for policy evaluation

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • Rox Sprint 4.11B, Rox Sprint 4.11C

      Update Sensor to create and wire label providers for policy evaluation.

      Create provider implementations that wrap Sensor's in-memory stores:

      Cluster Labels:
      - Wrap sensor/common/clusterlabels.Store (in-memory store)
      - Already populated from Helm config at sensor startup
      - Has Get() method for label lookups

      Namespace Labels:
      - Wrap sensor/kubernetes/listener/resources/namespace_store.go (in-memory store)
      - Stores map[string]*storage.NamespaceMetadata
      - Has LookupNamespaceLabels() method (added in ROX-32668)
      - Populated from K8s namespace watches

      Wire providers through:
      1. sensor/common/detector/unified/detector.go:
      - Create providers from cluster and namespace stores
      - Pass to detection.NewPolicySet() calls (5 locations)

      1. sensor/admission-control/manager/manager_impl.go:
        • Create providers from cluster and namespace stores
        • Pass to detection.NewPolicySet() calls (3 locations)

      Files:
      - NEW: sensor/common/detection/providers.go (provider implementations)
      - sensor/common/detector/unified/detector.go (wire providers)
      - sensor/admission-control/manager/manager_impl.go (wire providers)

      Tests:
      Update test files to pass nil providers where label matching isn't tested.

      Dependencies:
      - Requires ROX-32667 (Central providers) to be merged first
      - Leverages ROX-32668 (namespace label storage) and ROX-32151 (cluster label storage)

              avulaj Alex Vulaj
              avulaj Alex Vulaj
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: