Deploy App-Embedded Defender in GCR
Deploy an App-Embedded Defender in GCR to provide runtime protection to App-Embedded applications installed in GCR.
The App-Embedded Defender enforces runtime policy on the application entrypoint and any child processes created by this entrypoint. To learn when to use App-Embedded Defenders, see Defender types.
To learn more about App-Embedded Defender’s capabilities, see:
Protecting front-end containers at runtime with WAAS
System Requirements
GCR supports Linux (X86) containers
Any Docker image with Prisma Cloud App-Embedded Defender binary
Google Cloud Registry (recommended)
Prerequisites
You can connect to GCR and DockerHub
Configure GCP to authenticate Prisma Cloud
Sign in to your Google Cloud account.
Log in to Google Cloud Registry.
In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.
Set "private" visibility for your GCP container registry host under GCP project > Home > Container Registry > Settings.
Configure GCloud authentication using any of the following options:
Authenticate using GCP user credentials:
$ gcloud auth login ### Type the User GCP credentials $ cat ~/.docker/config.json ### Check that GCP has gcloud users configuredAuthenticate using GCP Service Account:
$ gcloud auth activate-service-account ACCOUNT --key-file=KEY-FILE ### KEY-FILE is the Service Account key file under *GCP > Service Accounts > Actions > Manage keys*
Configure Docker for GCP in your localhost
Configure App-Embedded Defender in Prisma Console UI
Prisma Console provides you with an App-Embedded Defender bundle that contains the Dockerfile with App-Embedded configurations and the Defender installation binary file.
You can select one of the Deployment types: Dockerfile or Manual.
Dockerfile: Creates a new Dockerfile based on your Dockerfile and embeds the App-Embedded parameters.
Manual: Select the manual method to customize the required Dockerfile parameters in the Console UI and directly download the App-Embedded Defender binary file.
Embed App-Embedded Defender with Dockerfile
Upload your Dockerfile and Prisma Cloud creates a new Dockerfile with App-Embedded Defender parameters and the Defender binary file.
Log in to Prisma Cloud Console.
Go to Manage > Defenders > Defenders: Deployed > Manual deploy.

In Deployment method, select Single Defender.
Select the Defender type as Container Defender - App-Embedded.
Select the DNS name configured in Manage > Defenders > Names (SAN) or public IP address that Defender will use to connect to Prisma Console.
Enable file system runtime protection to allow the sensors to monitor file system events regardless of how your runtime policy is configured, and could impact the underlying workload’s performance.
Select Deployment type as Dockerfile.
In App ID, enter a unique identifier for the App-Embedded Defender. All vulnerability, compliance, and runtime findings for the container will be aggregated under this App ID. In Console, the App ID is presented as the image name. Be sure to specify an App ID that lets you easily trace findings back to the image.
In Data folder, enter the path that the Defender will use to write files and store information.
Dockerfile: Upload the Dockerfile for your container image. Set up the task’s entrypoint in the Dockerfile. The embed process modifies the container’s entrypoint to run the App-Embedded Defender first, which in turn starts the original entrypoint process. The Defender starts defending the app from the entrypoint and the thread/child process created by this entrypoint.
Download the App-embedded bundle that contains the Dockerfile with Defender deployment configurations appended to your Dockerfile and the App-Embedded Defender binary file.
Rebuild the image and embed the Defender in GCR.
Embed App-Embedded Defender Manually
Embed App-Embedded Defender into a container image manually. Modify your Dockerfile with the given configurations, download the App-Embedded Defender binaries into the image’s build context, then rebuild the image.
Prerequisites
At runtime, the container where you’re embedding App-Embedded Defender can reach Console over the network. For Enterprise Edition, Defender talks to Console on port 443. For Compute Edition, Defender talks to Console on port 8084.
The host where you are rebuilding your container image with App-Embedded Defender can reach Console over the network on port 8083.
You have the Dockerfile for your image.
Log in to Prisma Cloud Console.
Go to Manage > Defenders > Defenders: Deployed > Manual deploy.
In Deployment method, select Single Defender.
Select the Defender type as Container Defender - App-Embedded.
Select the DNS name (configured in Manage > Defenders > Names (SAN) or public IP address that Defender will use to connect to Prisma Console.
Enable file system runtime protection to allow the sensors to monitor file system events regardless of how your runtime policy is configured, and could impact the underlying workload’s performance.
Select Deployment type as Manual
Follow the instructions for embedding App-Embedded Defender into your image.
Download the App-Embedded bundle using the command or download the file directly.
Configure your Dockerfile and set the following environment variables:
Add the App-Embedded Defender to Dockerfile.
Modify the entrypoint so that your app starts under the control of App-Embedded Defender.
Rebuild your image and embed the Defender in Cloud instance.
Embed App-Embedded Defender in GCR
Prisma Cloud uses the updated Dockerfile to deploy the Defender in your containers running in GCR. Use the updated Dockerfile to build the image for App-Embedded Defender, push it to Google Container Registry, and then run the Google Container instance.
Prerequisite:
Create a new GCR repository, if not already exists.
Log in to Docker
Copy the App-Embedded zipped bundle and unzip it to get the Dockerfile and App-Embedded Defender binary.
Build the Dockerfile:
If your Dockerfile is in the current directory, use . for <local_path_host-Dockerfile>
Push the docker image to GCR:
Verify the docker image exists in your GCP project > Container Registry > Images under your relevant repository.
Deploy Docker image in Google Cloud Run using Google Console:
Select your Container Registry > Images, and select Actions > Deploy to Cloud Run.
Enter a Service name or select the default value.
Set the CPU allocation and pricing to CPU is always allocated.
Select the Ingress traffic to allow All requests, including requests directly from the internet to the run.
In the Container, Networking, Security section, enter the Container port as 8080.
Select CREATE.
Go to Cloud Run and verify the Docker Container service running in GCP.
This App-Embedded Defender running in GCR is now recognized in Prisma Console under Manage > Defenders > Defenders: Deployed.
Embed App-Embedded Defender with twistcli
Use the twistcli command line tool to embed an App-Embedded Defender in your Cloud Container Registries.
Prerequisites:
Running tasks can connect to Prisma Cloud Console over the network.
Prisma Cloud Defender connects to Console to retrieve runtime policies and send audits.
The container where you’re embedding App-Embedded Defender can reach Console’s port 8084 over the network.
You have Dockerfile for you image.
Cloud CLI, such as Azure CLI, or Google Cloud CLI.
Log in to Prisma Cloud Console.
Download
twistcliRun
twistclito embed Defender in your Cloud Registry (such as Azure, or Google Run).A file named app_embedded_embed<app_id>.zip_ is created, that has the Dockerfile for App-Embedded Defender and App-Embedded Defender binary file.
<user> — Name of a Prisma Cloud user with a minimum role of Defender Manager.
<password> — For Prisma Cloud Enterprise Edition, you can also specify the secret key that you configured under Prisma > Settings > Access Control > Access Keys.
<token> — API Token for authenticating with Prisma Cloud Console. (For Enterprise Edition only)
<CONSOLE> — DNS name or IP address for Console.
<APP-ID> — Unique identifier.
When setting
<APP-ID>, specify a value that lets you easily trace findings back to the image. All vulnerability, compliance, and runtime findings for the container will be aggregated under this App ID.In Console, the App ID is presented as the image name.
<DATA-FOLDER> — Readable and writable directory in the container’s filesystem.
To enable file system protection, add the
--filesystem-monitoringflag to thetwistclicommand.
Unpack app_embedded_embed_help.zip.
Create and push the docker image to GCR
Authenticate using GCP credentials:
Or, Authenticate using GCP Service Account key (KEY-FILE): (Get the KEY-FILE from GCP > Service Accounts > Actions > Manage keys)
Configure Docker for GCP in your localhost
Build the Dockerfile
Push the image to GCR
Check the image exists in GCR repo under GCP project > Container Registry > Images
Deploy Docker image in Google Cloud Run using
gcloudIf there is no port exposed in Dockerfile, GCP Cloud Run will use 8080 port as the default.
Delete a Container Instance
Trigger Events for App-Embedded
Refer to Runtime defense for App-Embedded.
To trigger the App Server logs, get the GCP URL from GCP Docker Container service.
Monitor App-Embedded Events
You can view the App-Embedded runtime events by app ID under Monitor > Events > App-Embedded audits, and view the App-Embedded incidents under Monitor > Runtime > Incident Explorer.
You can also deploy WAAS for Containers Protected By App-Embedded Defender, create a WAAS rule policy, add an app, enable protections, run WAAS sanity tests, and monitor the events under Monitor > Events > WAAS for App-Embedded.
Last updated
Was this helpful?

