eBPF with SCC on OpenShift
Reference for the Helm and Terraform values that configure security context constraints for the Traceable eBPF agent on OpenShift
Red Hat's OpenShift is a cloud development Platform as a Service (Paas) Kubernetes platform that helps developers to build applications. It offers automated installation, upgrades, and life cycle management throughout the container stack, that is, the operating system, Kubernetes, and cluster services, and application. The topic provides Helm and Terraform values for Traceable's eBPF agent with OpenShift's Security context constraints (SCC). SCC allows administrators to control permissions for pods. Go to Managing Security Context Constraints to learn about Security Context Constraint.
Before you proceed to configure Helm or Terraform values for SCC in OpenShift environment, make sure that Traceable's eBPF agent is already installed. Go to eBPF to learn about deployment.
The following table provides Helm and Terraform values for SCC on OpenShift.
ebpfSELinuxOptionsEnabled
ebpf_se_linux_options_enabled
bool
false
This enables SELinuxOptions in eBPF container security context.
ebpfSELinuxOptionsRole
ebpf_se_linux_options_role
string
"system_r"
Sets SELinuxOptions role.
ebpfSELinuxOptionsType
ebpf_se_linux_options_type
string
"spc_t"
Sets SELinuxOptions type.
ebpfSELinuxOptionsUser
ebpf_se_linux_options_user
string
"system_u"
Sets SELinuxOptions user.
ebpfOpenshiftSCC
-
bool
false
Creates Traceable security context constraint (recommended for OpenShift deployments).
Create Traceable security context constraint (SCC) for Terraform deployments
As mentioned in the table above, there is no option to create Traceable security context constraint if you are using Terraform for deploying eBPF solution in an OpenShift environment. In such a case, use the following yaml file to create the security context constraint.
# Source: traceable-agent-scc.yaml
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
name: traceable-agent-scc
namespace: traceableai
labels:
app.kubernetes.io/name: traceable-agent
app.kubernetes.io/instance: traceableai
allowPrivilegedContainer: false
allowPrivilegeEscalation: false
allowHostDirVolumePlugin: true
allowHostIPC: true
allowHostNetwork: true
allowHostPID: true
allowHostPorts: true
readOnlyRootFilesystem: false
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
fsGroup:
type: RunAsAny
groups:
- system:nodes
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:traceableai:traceable-agent-ebpf-service-account
volumes:
- configMap
- secret
- emptyDir
- hostPath
- projected
allowedCapabilities:
- IPC_LOCK
- SYS_ADMIN
- SYS_CHROOT
- SYS_RESOURCE
- SYS_PTRACE
- SETFCAP
requiredDropCapabilities:
- DAC_READ_SEARCH
- LINUX_IMMUTABLE
- NET_BROADCAST
- NET_ADMIN
- NET_RAW
- IPC_OWNER
- SYS_MODULE
- SYS_RAWIO
- SYS_PACCT
- SYS_BOOT
- SYS_NICE
- SYS_TIME
- SYS_TTY_CONFIG
- MKNOD
- LEASE
- AUDIT_WRITE
- AUDIT_CONTROL
- MAC_OVERRIDE
- MAC_ADMIN
- SYSLOG
- WAKE_ALARM
- BLOCK_SUSPEND
- AUDIT_READ
- PERFMON
- BPFIf you have configured ebpf_run_as_privileged=true in the Terraform variables while deploying the Traceable Platform agent, then configure the following two variables also in the YAML file:
allowPrivilegedContainer: trueallowPrivilegeEscalation: true
Enter the following command to apply the manifest:
Was this helpful?