Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensor | clusterrole | add resources and verbs #340

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JonBruchim
Copy link

@JonBruchim JonBruchim commented Dec 4, 2024

adding resources and verbs for the cluster role for the flow sensor integration

node.cdpRolesEnabled=false output

helm install falcon . --set node.enabled=true --set falcon.cid="11111111111111111111111111111111-11" --set node.image.repository="registry/falcon-node-sensor" --set node.cdpRolesEnabled=false --dry-run

no ClusterRole
no ClusterRoleBinding

node.cdpRolesEnabled not defined (default true) output

helm install falcon . --set node.enabled=true --set falcon.cid="11111111111111111111111111111111-11" --set node.image.repository="registry/falcon-node-sensor" --dry-run

# Source: falcon-sensor/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: falcon-falcon-sensor-access-role
  labels:
    app: falcon-sensor
    app.kubernetes.io/name: falcon-sensor
    app.kubernetes.io/instance: falcon
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: "container_sensor"
    crowdstrike.com/provider: crowdstrike
    helm.sh/chart: falcon-sensor-1.29.1
rules:
- apiGroups:
  - ""
  resources:
  - secrets
  - pods
  - services
  - nodes
  - daemonsets
  - replicasets
  - deployments
  - jobs
  - ingresses
  - cronjobs
  - persistentvolumes
  verbs:
  - get
  - watch
  - list

@JonBruchim JonBruchim force-pushed the main branch 3 times, most recently from f9934c9 to 0cf3166 Compare December 4, 2024 16:31
@JonBruchim JonBruchim force-pushed the main branch 2 times, most recently from 6b971ad to 0c885b5 Compare December 12, 2024 16:00
helm-charts/falcon-sensor/README.md Outdated Show resolved Hide resolved
@@ -16,6 +16,22 @@ rules:
- ""
resources:
- secrets
{{- if and .Values.node.enabled .Values.node.cdpRolesEnabled }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked other resources that we create; all_sensor is applicable, only if we use the same resource name for multiple sensor types. In this case we create resource using the variable "falcon-sensor.fullname" and that is unique per deployment. So we should add

{{ if .Values.container.enabled }}
app.kubernetes.io/component: "container_sensor"
{{ else if (and .Values.node.enabled .Values.node.cdpRolesEnabled)}}
app.kubernetes.io/component: "kernel_sensor"
{{ end }}

@@ -16,6 +16,22 @@ rules:
- ""
resources:
- secrets

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is secrets required by cdp?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@JonBruchim JonBruchim force-pushed the main branch 2 times, most recently from 5fd73ae to ca3eb38 Compare December 25, 2024 09:15
@@ -104,6 +104,9 @@ node:
postDelete:
enabled: true

# When enabled, Cloud data protection module is enabled
cdpRolesEnabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If data protection is not a separate sku, why are we adding this boolean? Permissions should be applied by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants