KubeArmor icon indicating copy to clipboard operation
KubeArmor copied to clipboard

Remove kernel security path dependecy for kubearmor-controller

Open rksharma95 opened this issue 1 year ago • 4 comments

Feature Request

Short Description

KubeArmor Controller make use of kernel security path /sys/kernel/security/lsm to detect the enforcer and this dependency can be removed safely now with KubeArmor Operator, as it deploys snitch on the cluster which detects the enforcer and attach this information to node using the labels. KubeArmor Controller can make use of this therefore it's no longer will required kernel security path to be mounted.

Is your feature request related to a problem? Please describe the use case.

It will remove the dependency of a hostpath to be mounted and will improve the securityContext of the deployment.

remove dependency of kernel security path for KubeArmor Controller, get information of the enforcer using:

  • node labels, or
  • Add label to the KubeArmor Controller itself with the operator and use that.

rksharma95 avatar Aug 24 '23 07:08 rksharma95

hi @rksharma95 as far as looked it up I assume the snitch also uses this dependency to detect enforcer https://github.com/kubearmor/KubeArmor/blob/d350b0e9d269940596af7ec28d12c3408b4754ec/pkg/KubeArmorOperator/cmd/snitch-cmd/main.go#L100 , correct me if I am wrong

swastik959 avatar Nov 05 '23 03:11 swastik959

@swastik959 yes you're right! Snitch make use of security path to detect the enforcer and adds that information to the node labels.

Now Controller no longer needed access to the kernel security path to get the same information, instead it can look for the enforcer detail using node labels.

rksharma95 avatar Nov 05 '23 03:11 rksharma95

Hey @swastik959 , are you still working on this issue?

RipulHandoo avatar Dec 23 '23 15:12 RipulHandoo

Hey @swastik959 , are you still working on this issue?

Actually it will be implemented later on you can see the reviews in the pr

swastik959 avatar Dec 23 '23 15:12 swastik959

Resolved in PR #1335

Aryan-sharma11 avatar Aug 05 '24 11:08 Aryan-sharma11