You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWS Fargate is a serverless compute engine for containers under Amazon ECS that lets you run containers without needing to provision and manage servers and hosts.
4
+
Each container is defined as part of a task and several containers can be run as part of the same task.
5
+
6
+
Prisma Cloud can scan Fargate tasks for compliance issues.
7
+
To see the scan report for your Fargate task images, go to *Monitor > Compliance > Images > Deployed* and filter the table with *Fargate:Select*.
8
+
9
+
Prisma Cloud Compute labels all containers running within the same task as if they run on the same host.
10
+
For containers that are running in Fargate, the Host column will contain the Fargate task identifier.
11
+
12
+
13
+
[.task]
14
+
=== Create compliance rules for Fargate tasks
15
+
16
+
Create a compliance rule for Fargate tasks in scope.
17
+
18
+
[.procedure]
19
+
. Login to the Console.
20
+
21
+
. Go to *Defend > Compliance > Containers and images > Deployed*.
22
+
23
+
. Click *Add rule*.
24
+
25
+
. Enter a rule name.
26
+
27
+
. Click on *Scope* to select a relevant collection, or create a new collection for your Fatgate tasks:
28
+
29
+
.. Click *Add collection*.
30
+
31
+
.. Enter collection name.
32
+
33
+
.. In the host you can type the name of the required Fargate task name or postfix wildcards.
34
+
+
35
+
For example `fargate`, `fargate-vulnerability-compliance-task`.
36
+
37
+
.. Click *Save*.
38
+
39
+
.. Select the new Fargate task collection.
40
+
41
+
.. Click *Select collection*.
42
+
43
+
. Click *Save*.
44
+
+
45
+
NOTE: The block action doesn't apply to Fargate tasks.
46
+
+
47
+
image::fargate_collection_image.png[width=600]
48
+
49
+
50
+
=== Compliance check details
51
+
52
+
The following checks are supported for Fargate tasks:
53
+
54
+
*424: Sensitive information provided in environment variables*::
55
+
Checks if images contain sensitive information in their environment variables.
56
+
57
+
*425: Private keys stored in image*::
58
+
Searches for private keys stored in an image or serverless function.
59
+
60
+
*426: Image contains binaries used for crypto mining*::
61
+
Detects when there are crypto miners in an image. Attackers have been quietly poisoning registries and injecting crypto mining tools into otherwise legitimate images.
62
+
63
+
*448: Package binaries should not be altered*::
64
+
Checks the integrity of package binaries in an image. During an image scan, every binary’s checksum is compared with its package info.
65
+
66
+
*Custom compliance*::
67
+
Custom checks capability works only for tasks that allows users with *root* privileges. Custom image checks give you a way to write and run your own compliance checks to assess, measure, and enforce security baselines in your environment. learn more in xref:../custom_compliance_checks.adoc [Custom compliance checks]
68
+
69
+
70
+
=== Deploy Fargate task
71
+
72
+
Deploy the `fargate-vulnerability-compliance-task` Fargate task (described below), following the steps in xref:..priv-docs/admin_guide/install/install_defender/install_app_embedded_defender_fargate.adoc[Embed App-Embedded Defender into Fargate tasks].
73
+
74
+
75
+
==== Example task definition
76
+
77
+
You can use the following task definition to test Prisma Cloud's App-Embedded Defender.
78
+
The task deploys a `ubuntu:18.04` container and runs the `/bin/sh -c 'cp /bin/sleep /tmp/xmrig` command that triggers the *Image contains binaries used for crypto mining* compliance check.
79
+
80
+
[source,json]
81
+
----
82
+
{
83
+
"containerDefinitions": [
84
+
{
85
+
"command": [
86
+
"/bin/sh -c 'cp /bin/sleep /tmp/xmrig && echo \"[+] Sleeping...\" && while true; do sleep 1000 ; done'"
Copy file name to clipboardExpand all lines: admin_guide/install/install_defender/install_app_embedded_defender_fargate.adoc
+98-23Lines changed: 98 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
== AppEmbedded Defender for Fargate
1
+
== App-Embedded Defender for Fargate
2
2
3
-
AppEmbedded Defenders for Fargate monitor your tasks to ensure they execute as designed, protecting tasks from suspicious processes and outbound network connections.
3
+
App-Embedded Defenders for Fargate monitor your tasks to ensure they execute as designed, protecting tasks from suspicious processes and outbound network connections.
4
4
5
-
AppEmbedded Defender policies let you define:
5
+
App-Embedded Defender policies let you define:
6
6
7
7
* Process allow or deny lists.
8
8
Enables verification of launched processes against policy.
@@ -15,16 +15,16 @@ Besides runtime policy, you can also configure the xref:../../waas/waas.adoc[WAA
15
15
16
16
=== Architecture
17
17
18
-
When you embed the AppEmbedded Defender into your Fargate task, Prisma Cloud modifies the task definition.
18
+
When you embed the App-Embedded Defender into your Fargate task, Prisma Cloud modifies the task definition.
19
19
The updated task definition includes a Prisma Cloud sidecar container.
20
20
The sidecar container handles all communication with Console, including retrieving policies and sending audits.
21
-
It also hosts the AppEmbedded Defender binaries, which are shared with the task's other containers through a shared volume.
21
+
It also hosts the App-Embedded Defender binaries, which are shared with the task's other containers through a shared volume.
22
22
The embed process modifies each containerDefinition to:
23
23
24
-
* Mount the Prisma Cloud sidecar container's shared volume to gain access to the AppEmbedded Defender binaries.
25
-
* Start the original entrypoint command under the control of AppEmbedded Defender.
24
+
* Mount the Prisma Cloud sidecar container's shared volume to gain access to the App-Embedded Defender binaries.
25
+
* Start the original entrypoint command under the control of App-Embedded Defender.
26
26
27
-
AppEmbedded Defenders do not communicate directly with Console.
27
+
App-Embedded Defenders do not communicate directly with Console.
28
28
All communication is proxied through the Prisma Cloud sidecar container.
29
29
The following diagram illustrates the setup:
30
30
@@ -48,9 +48,9 @@ To secure a Fargate task, embed the Prisma Cloud Fargate Defender into it.
48
48
The steps are:
49
49
50
50
. Define your policy in Prisma Cloud Console.
51
-
By default, there are no rules in the AppEmbedded runtime policy.
52
-
AppEmbedded Defenders dynamically retrieve policies from Console as they are updated.
53
-
You can embed the AppEmbedded Defender into a task with very simple initial policies, then refine them later as needed.
51
+
By default, there are no rules in the App-Embedded runtime policy.
52
+
App-Embedded Defenders dynamically retrieve policies from Console as they are updated.
53
+
You can embed the App-Embedded Defender into a task with very simple initial policies, then refine them later as needed.
54
54
55
55
. Embed the Fargate Defender into your task definition.
=== Embed App-Embedded Defender into Fargate tasks
74
74
75
75
Prisma Cloud cleanly separates the code developers produce from the Fargate containers we protect.
76
76
Developers don't need to change their code to accomodate Prisma Cloud.
@@ -82,21 +82,25 @@ You can call the Prisma Cloud API to embed the Fargate Defender into your task d
82
82
83
83
*Prerequisites:*
84
84
85
-
* The task where you’re embedding the App Embedded Defender can reach Console’s port 8084 over the network.
86
-
87
-
* You have the task definition.
85
+
* The task where you’re embedding the App-Embedded Defender can reach Console’s port 8084 over the network.
86
+
* You have a task definition.
87
+
* You have already created an ECS cluster.
88
+
* Cluster VPC and subnets.
89
+
* Task role.
88
90
89
91
IMPORTANT: Your task definition must include matching `entrypoint` and `cmd` parameters from the Dockerfile(s) of the image(s) in your task.
90
-
Because Prisma Cloud does not see the actual images as part of the embedding flow, it depends on having these parameter present to reliably insert the AppEmbedded Defender into the task startup flow.
92
+
Because Prisma Cloud does not see the actual images as part of the embedding flow, it depends on having these parameter present to reliably insert the App-Embedded Defender into the task startup flow.
91
93
If your Dockerfile does not include an `entrypoint` parameter, a default one, such as `/bin/sh`, must be used in the task definition.
92
94
However, because the `cmd` parameter is optional, if your Dockerfile does not include a `cmd` parameter, one is not required in the task definition.
93
95
94
96
[.procedure]
95
97
. Log into Prisma Cloud Console.
96
98
97
-
. Go to *Manage > Defenders > Deploy*.
99
+
. Go to *Manage > Defenders > Deploy > Defenders*
100
+
101
+
. Select *Single defender*
98
102
99
-
. In the first drop-down list, choose the name or IP address AppEmbedded Defender should use to connect to Console.
103
+
. In the first drop-down list, choose the name or IP address App-Embedded Defender should use to connect to Console.
100
104
+
101
105
NOTE: A list of IP addresses and hostnames are pre-populated in the drop-down list.
102
106
If none of the items are valid, select the *Names* tab and add a new subject alternative name (SAN) using *Add SAN* button.
@@ -105,9 +109,9 @@ After adding a SAN, your IP address or hostname will be available in the drop-do
105
109
NOTE: Selecting an IP address in a evaluation setup is acceptable, but using a DNS name is more resilient.
106
110
If you select Console's IP address, and Console's IP address changes, your Defenders will no longer be able to communicate with Console.
107
111
108
-
. In the second drop-down list, choose the *Defender type* of *AppEmbedded*.
112
+
. In the *Defender Type* drop-down list, choose *App-Embedded*.
109
113
110
-
. Set the *Deployment type* to *Fargate Task*.
114
+
. Set the *Deploy App-Embedded Defender* to *Fargate Task*.
111
115
112
116
. Embed the Fargate Defender into your task definition.
113
117
@@ -117,8 +121,79 @@ If you select Console's IP address, and Console's IP address changes, your Defen
117
121
118
122
.. Copy the updated task definition from the right-hand box.
119
123
120
-
. In AWS, create a new task definition using the new Prisma Cloud protected task.
124
+
125
+
[.task]
126
+
==== Creating a task definition in AWS
127
+
128
+
Create a new task definition in AWS with the output from the previous section.
121
129
If you already have an existing task definition, create a new revision.
130
+
131
+
This section is geared to creating a new task definition based on the sample task.
132
+
133
+
[.procedure]
134
+
. Log into the AWS Management Console.
135
+
136
+
. Go to *Services > ECS*.
137
+
138
+
. Click *Task Definitions*, then click *Create new Task Definition*.
139
+
140
+
.. Select *Fargate*, then click *Next step*.
141
+
142
+
.. Scroll to the bottom of the page, and click *Configure via JSON*.
143
+
144
+
.. Delete the prepopulated JSON, then paste the JSON generated for task from the previous section.
145
+
146
+
.. Click *Save*.
147
+
148
+
. Validate task content.
149
+
150
+
.. Task name should be as described in the JSON.
151
+
152
+
.. Select the *Task Role*.
153
+
154
+
.. The task should include the *TwistlockDefender* container.
155
+
156
+
.. Click *Create*.
157
+
158
+
.. Click *View task definition*.
159
+
160
+
161
+
[.task]
162
+
==== Testing the task
163
+
164
+
[.procedure]
165
+
. Log into the AWS Management Console.
166
+
167
+
. Go to *Services > ECS*.
168
+
169
+
. Click *Clusters*, then select one of your Fargate cluster.
170
+
171
+
. Click the *Services* tab, then click *Create*.
172
+
173
+
.. For *Launch type*, select *Fargate*.
174
+
175
+
.. For *Task Definition*, select your pre-defined task.
176
+
177
+
.. Enter a *Service name*.
178
+
179
+
.. For *Number of tasks*, enter *1*.
180
+
181
+
.. Click *Next step*.
182
+
183
+
.. Select a *Cluster VPC* and *Subnets*, then click *Next step*.
184
+
185
+
.. For *Service Auto Scaling*, select *Do not adjust the service’s desired count*, then click *Next step*.
186
+
187
+
.. Review your settings, then click *Create Service*.
188
+
189
+
. Validate the results.
190
+
191
+
.. Click *View Service*.
192
+
193
+
.. When Last status is Running, your Fargate task is running.
194
+
195
+
.. The containers are running.
196
+
197
+
. View the defender in the Prisma Cloud Console: Go to *Manage > Defenders > Manage > Defenders* and search the fargate task by adding the filters *Fargate* and *Status:Connected*.
122
198
+
123
-
After running your task, view audits in Prisma Cloud Console.
124
-
Go to *Monitor > Events*, and select *App Embedded Audits*.
0 commit comments