https://github.com/crowdstrike/gcp-gke-protection

https://github.com/crowdstrike/gcp-gke-protection

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.7%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: CrowdStrike
  • License: unlicense
  • Language: Python
  • Default Branch: main
  • Size: 99.6 KB
Statistics
  • Stars: 1
  • Watchers: 4
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Support

README.md

CrowdStrike logo

GCP GKE Protection

GCP GKE Protection is a solution that can be used to deploy the Falcon Operator, Falcon Admission Controller, and Falcon Node Sensors on all applicable GKE clusters in an automated fashion.

Table of Contents

Architecture

Deployed Resources

The solution resources are built and managed through Terraform. The terraform templates create the following resources:

Asset Feed Resources

[!NOTE] Only one of the following resources will be deployed depending on scope you choose.

  • crowdstrike-gke-protection-organization-feed - Monitors GKE cluster events at organization level
  • crowdstrike-gke-protection-project-feed - Monitors GKE cluster events at project level
  • crowdstrike-gke-protection-folder-feed - Monitors GKE cluster events at folder level

Cloud Functions

  • gke-protection-cluster-protection-function-[random-hex] - Cloud Function that discovers and installs Falcon sensor on Kubernetes clusters
  • gke-protection-discover-existing-function-[random-hex] - Cloud Function that discovers existing GKE clusters

Storage Resources

  • [random-hex]-gke-protection-source - Cloud Storage bucket that stores function source code

Pub/Sub Resources

  • crowdstrike-gke-protection-feed-topic - Pub/Sub topic that receives asset change notifications

IAM Bindings

  • Cloud Run Invoker role (roles/run.invoker) - Granted to allUsers for both Cloud Functions
  • Pub/Sub Publisher role (roles/pubsub.publisher) - Granted to specified service account

Automation Workflow

The automation is broken into two parts; Cluster Discovery and Cluster Protection.

Cluster Discovery

This function can be triggered after the initial deployment, or on demand by sending a message to the function endpoint. The automation discovers existing clusters within a given scope, and send a payload with the cluster name to the pub/sub topic the Cluster Protection function is subscribed to.

Cluster Protection

This function is triggered when a new gke cluster is created and a en event from the asset feed is sent to the pub/sub topic the function is subscribed to. The automation first tries to find an retrieve the cluster metadata. Once the metadata is retrieved, the automation waits until the cluster is in a ready state, and creates a kubeconfig and connects to the cluster. The automation first checks to see if the kubernetes operator namespace is already created and there are pods actively running, if this is the case it skips deploying the operator, otherwise the operator is deployed. It then checks to see if there is FalconDeployment resource deployed, if not, it deployed the FalconDeployment CRD configured with your Falcon ClientID and ClientSecret.

Prerequisites

CrowdStrike

Provision Credentials

API credentials with the following scopes need to be created

  • Falcon Container Image (Read)
  • Falcon Images Download (Read)

GCP

Enable APIs

The following APIs need to be enabled.

  • Cloud Functions
  • Cloud Asset
  • Pub Sub

[!Tip] Enable all APIs by clicking this URL

Provision Service Account

A service account needs to be created. The service account must have the following roles at the Scope you want to be protected.

  • Cloud Asset Viewer
  • Kubernetes Engine Admin
  • Cloud Run Jobs Executor

Deployment

Deployment Scopes

Identify at what scope you want to protect your GKE clusters

  • Organization: Will discover and protect clusters for all projects within a given organization
  • Folder: Will discover and protect clusters for all projects within a given folder
  • Project: Will discover and protect clusters for a given project

Execution

Start the deployment process by executing the following command in the root directory of this repository

shell ./install.sh

The script will ask you for a series of values:

  • DEPLOYMENTPROJECTID - Account solution should be deployed in
  • FALCONCLIENTID - Client ID for falcon api
  • FALCONCLIENTSECRET - Client Secret for falcon api
  • LOCATION - GCP location to deploy to
  • SERVICEACCOUNTEMAIL - Email of the service account that has required roles
  • SCOPE - Chose deployment scope. Must be one of projects, folders, organizations
  • SCOPE_IDENTIFIER - you will need to supply one of the following values depending on the scope selected
    • organizations: organization id
    • folders: folder id
    • projects: project id, or project name

The script will validate that the required APIs have been enabled and then deploy the terraform template to build out the resources required fro cluster protection. If everything is successful, you should see a message at the end similar to this.

Execution result

Post Execution

The install script will ask you if you want to discover and protect existing clusters. If you select yes, it will scan all projects within the scope chose to find clusters that were created prior to deploying te solution, and initiate cluster protection.

Triggering Existing Cluster Discovery Post Deployment

If you choose not to protect existing clusters, you can trigger it by executing

shell ./protect_existing.sh <deployment-region> <deployment-project>

Contributing

Contributions are welcome! Please read our Contributing Guide for details on how to submit pull requests.

Support

For additional support, please see the SUPPORT.md file.

License

This project is licensed under the MIT License.

Owner

  • Name: CrowdStrike
  • Login: CrowdStrike
  • Kind: organization
  • Email: github@crowdstrike.com
  • Location: United States of America

GitHub Events

Total
  • Watch event: 1
  • Push event: 1
Last Year
  • Watch event: 1
  • Push event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 23
  • Total Committers: 2
  • Avg Commits per committer: 11.5
  • Development Distribution Score (DDS): 0.043
Past Year
  • Commits: 23
  • Committers: 2
  • Avg Commits per committer: 11.5
  • Development Distribution Score (DDS): 0.043
Top Committers
Name Email Commits
Gax g****o@c****m 22
Carlos Matos c****s@c****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 9
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 9
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • gtheodorio (8)
  • carlosmmatos (1)
Top Labels
Issue Labels
Pull Request Labels
documentation (1)

Dependencies

terraform/functions/cluster_protection/requirements.txt pypi
  • functions-framework ==3.
  • google-api-python-client *
  • google-cloud-container *
  • google-cloud-logging *
  • kubernetes *
  • pyyaml *
terraform/functions/discover_existing/requirements.txt pypi
  • functions-framework ==3.
  • google-api-python-client *
  • google-cloud-container *
  • google-cloud-logging *
  • google-cloud-pubsub *
  • google-cloud-resource-manager *
  • kubernetes *
  • pyyaml *