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

cdp: added resources and verbs for the cluster role #614

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

Conversation

JonBruchim
Copy link

No description provided.

@JonBruchim JonBruchim force-pushed the main branch 2 times, most recently from daf792b to b8443fc Compare December 25, 2024 17:05
deploy/falcon-operator.yaml Outdated Show resolved Hide resolved
deploy/falcon-operator.yaml Outdated Show resolved Hide resolved
Resources: []string{"pods", "services", "nodes", "daemonsets", "replicasets", "deployments", "jobs", "ingresses", "cronjobs", "persistentvolumes"},
}
)

Copy link
Contributor

@redhatrises redhatrises Dec 25, 2024

Choose a reason for hiding this comment

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

These permissions need to be added to https://github.com/CrowdStrike/falcon-operator/blob/main/config/rbac/falconnodesensor_role.yaml and https://github.com/CrowdStrike/falcon-operator/blob/main/config/non-olm/patches/falconnodesensor_role.yaml and are autogenerated through kustomize. Use make manifest && make generate && make non-olm

@@ -790,6 +802,11 @@ func (r *FalconNodeSensorReconciler) handlePermissions(ctx context.Context, node
return created, err
}

created, err = r.handleClusterRole(ctx, nodesensor, logger)
Copy link
Contributor

@redhatrises redhatrises Dec 25, 2024

Choose a reason for hiding this comment

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

Clusterroles for operators should not reconcile permissions. The cluster roles are required to be auditable BEFORE install by cluster admins, security architects, and auditors. For operator security design and best practices, these permissions need to be added to https://github.com/CrowdStrike/falcon-operator/blob/main/config/rbac/falconnodesensor_role.yaml and https://github.com/CrowdStrike/falcon-operator/blob/main/config/non-olm/patches/falconnodesensor_role.yaml and are autogenerated through kustomize. Use make manifest && make generate && make non-olm

// Enable cluster roles for Cloud Data Protection module
// +kubebuilder:default=true
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=13
CdpRolesEnabled *bool `json:"cdpRolesEnabled,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be added because clusterroles should NOT be reconciled because of the auditablity and permission visibility requirement and best practices of operator permissions that many review before install.

@@ -68,6 +68,10 @@ spec:
| node.backend | (optional) Configure the backend mode for Falcon Sensor (allowed values: kernel, bpf) |
| node.disableCleanup | (optional) Cleans up `/opt/CrowdStrike` on the nodes by deleting the files and directory. |
| node.version | (optional) Enforce particular Falcon Sensor version to be installed (example: "6.35", "6.35.0-13207") |
| node.cdpRolesEnabled | (optional) Enable cluster roles for Cloud Data Protection module |

> [!IMPORTANT]
Copy link
Author

Choose a reason for hiding this comment

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

make docs generated this

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.

2 participants