Skip to content

Protection gap when changing workload security policies #5

@holyspectral

Description

@holyspectral

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- OS: Ubuntu
- Architecture: amd64
- Cluster: kind

Issue Description

  • Expected behavior:
    • When changing workload security policies CR, there should be no protection gap.
  • Current behavior:
    • Internally, when a tracing policy is changed, Tetragon deletes the existing security policies and creates a new one. This behavior leads a protection gap when a policy is changed.
  • Steps to reproduce:
    • Modify the WorkloadSecurityPolicy CR and observe the behavior of protected containers.

Desired solution

The current flow from the Tetragon perspective:

  • Delete the existing TracingPolicyNamespaced.
  • Create a new TracingPolicyNamespaced with the updated allowed list (adding/removing the executable).

An alternative flow could be:

  • Create a new TracingPolicyNamespaced with the updated allowed list (adding/removing the executable). This policy should have the same podSelector of the existing one and actually a different name (because names must be unique in the namespace, not sure how to call it).
  • Delete the old TracingPolicyNamespaced.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions