|
1 | 1 | # Sysdig Secure for Cloud in AWS
|
2 | 2 |
|
3 | 3 | Terraform module that deploys the [**Sysdig Secure for Cloud** stack in **AWS**](https://docs.sysdig.com/en/docs/installation/sysdig-secure-for-cloud/deploy-sysdig-secure-for-cloud-on-aws).
|
4 |
| -<br/>It provides unified threat detection, compliance, forensics and analysis. |
| 4 | +<br/> |
| 5 | + |
| 6 | +Provides unified threat-detection, compliance, forensics and analysis through these major components: |
5 | 7 |
|
6 |
| -There are three major components: |
| 8 | +* **[CSPM/Compliance](https://docs.sysdig.com/en/docs/sysdig-secure/benchmarks/)**: It evaluates periodically your cloud configuration, using Cloud Custodian, against some benchmarks and returns the results and remediation you need to fix. Managed through `cloud-bench` module. <br/> |
7 | 9 |
|
8 |
| -* **CSPM/Compliance**: It evaluates periodically your cloud configuration, using Cloud Custodian, against some benchmarks and returns the results and remediation you need to fix. Managed through [cloud-bench module](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-bench).<br/> |
| 10 | +* **[CIEM](https://docs.sysdig.com/en/docs/sysdig-secure/posture/)**: Permissions and Entitlements management. Requires BOTH modules `cloud-connector` and `cloud-bench`. <br/> |
9 | 11 |
|
10 |
| -* **Cloud Threat Detection**: Tracks abnormal and suspicious activities in your cloud environment based on Falco language. Managed through [cloud-connector module](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-connector).<br/> |
| 12 | +* **[Cloud Threat Detection](https://docs.sysdig.com/en/docs/sysdig-secure/insights/)**: Tracks abnormal and suspicious activities in your cloud environment based on Falco language. Managed through `cloud-connector` module. <br/> |
11 | 13 |
|
12 |
| -* **Cloud Scanning**: Automatically scans all container images pushed to the registry or as soon a new task which involves a container is spawned in your account. Managed through [cloud-connector module](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-connector).<br/> |
| 14 | +* **[Cloud Scanning](https://docs.sysdig.com/en/docs/sysdig-secure/scanning/)**: Automatically scans all container images pushed to the registry or as soon a new task which involves a container is spawned in your account. Managed through `cloud-connector`. <br/> |
13 | 15 |
|
14 | 16 | For other Cloud providers check: [GCP](https://github.com/sysdiglabs/terraform-google-secure-for-cloud), [Azure](https://github.com/sysdiglabs/terraform-azurerm-secure-for-cloud)
|
15 | 17 |
|
@@ -73,45 +75,55 @@ Notice that:
|
73 | 75 | * This example will create resources that cost money.<br/>Run `terraform destroy` when you don't need them anymore
|
74 | 76 | * All created resources will be created within the tags `product:sysdig-secure-for-cloud`, within the resource-group `sysdig-secure-for-cloud`
|
75 | 77 |
|
| 78 | +<br/><br/> |
| 79 | + |
| 80 | +## Forcing Events |
| 81 | + |
| 82 | +**Threat Detection** |
| 83 | + |
| 84 | +Choose one of the rules contained in the `AWS Best Practices` policy and execute it in your AWS account. |
76 | 85 |
|
| 86 | +ex.: 'Delete Bucket Public Access Block' can be easily tested going to an |
| 87 | +`S3 bucket > Permissions > Block public access (bucket settings) > edit > |
| 88 | +uncheck 'Block all public access'` |
| 89 | + |
| 90 | +Remember that in case you add new rules to the policy you need to give it time to propagate the changes. |
| 91 | + |
| 92 | +In the `cloud-connector` logs you should see similar logs to these |
| 93 | +> A public access block for a bucket has been deleted (requesting user=OrganizationAccountAccessRole, requesting IP=x.x.x.x, AWS region=eu-central-1, bucket=*** |
| 94 | +
|
| 95 | +If that's not working as expected, some other questions can be checked |
| 96 | +- are events consumed in the sqs queue, or are they pending? |
| 97 | +- are events being sent to sns topic? |
| 98 | + |
| 99 | +**Image Scanning** |
| 100 | + |
| 101 | +Upload any image to the ECR repository of AWS. |
| 102 | +<br/>You should see a log in the ECS-cloud-scanner task + CodeBuild project being launched successfully |
77 | 103 |
|
78 | 104 | <br/><br/>
|
79 | 105 | ## Troubleshooting
|
80 | 106 |
|
81 |
| -- Q: How to **validate secure-for-cloud cloud-connector (thread-detection) provisioning** is working as expected?<br/> |
82 |
| - A: Check each pipeline resource is working as expected (from high to low lvl) |
83 |
| - - select a rule to break manually, from the 'Sysdig AWS Best Practices' policies. for example, 'Delete Bucket Public Access Block'. can you see the event? |
84 |
| - - are there any errors in the ECS task logs? can also check cloudwatch logs |
85 |
| - for previous example we should see the event |
86 |
| - ``` |
87 |
| - {"level":"info","component":"console-notifier","time":"2021-07-26T12:45:25Z","message":"A pulic access block for a bucket has been deleted (requesting user=OrganizationAccountAccessRole, requesting IP=x.x.x.x, AWS region=eu-central-1, bucket=sysdig-secure-for-cloud-nnnnnn-config)"} |
88 |
| - ``` |
89 |
| - - are events consumed in the sqs queue, or are they pending? |
90 |
| - - are events being sent to sns topic? |
91 |
| -
|
92 |
| -
|
93 |
| -- Q: How to iterate **cloud-connector modification testing** |
94 |
| - <br/>A: Build a custom docker image of cloud-connector `docker build . -t <DOCKER_IMAGE> -f ./build/cloud-connector/Dockerfile` and upload it to any registry (like dockerhub). |
95 |
| - Modify the [var.image](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-connector/variables.tf) variable to point to your image and deploy |
96 |
| -
|
97 |
| -
|
98 |
| -- Q: How can I iterate **ECS testing** |
99 |
| - <br/>A: After applying your modifications (vía terraform for example) restart the service |
100 |
| - ``` |
101 |
| - $ aws ecs update-service --force-new-deployment --cluster sysdig-secure-for-cloud-ecscluster --service sysdig-secure-for-cloud-cloudconnector --profile <AWS_PROFILE> |
102 |
| - ``` |
103 |
| - For the AWS_PROFILE, set your `~/.aws/config` to impersonate |
104 |
| - ``` |
105 |
| - [profile secure-for-cloud] |
106 |
| - region=eu-central-1 |
107 |
| - role_arn=arn:aws:iam::<AWS_MANAGEMENT_ORGANIZATION_ACCOUNT>:role/OrganizationAccountAccessRole |
108 |
| - source_profile=<AWS_MANAGEMENT_ACCOUNT_PROFILE> |
109 |
| - ``` |
110 |
| -
|
111 |
| -- Q: How to test **cloud-scanner** image-scanning?<br/> |
112 |
| - A: Upload any image to the ECR repository of AWS. You should see a log in the ECS-cloud-scanner task + CodeBuild project being launched successfully |
113 |
| - <br/> |
114 |
| -
|
| 107 | +### Q: I'm not able to see Cloud Infrastructure Entitlements Management (CIEM) results |
| 108 | +A: Make sure you installed both [cloud-bench](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-bench) and [cloud-connector](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-connector) modules |
| 109 | + |
| 110 | +### Q: How to iterate cloud-connector modification testing |
| 111 | +A: Build a custom docker image of cloud-connector `docker build . -t <DOCKER_IMAGE> -f ./build/cloud-connector/Dockerfile` and upload it to any registry (like dockerhub). |
| 112 | +Modify the [var.image](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/services/cloud-connector/variables.tf) variable to point to your image and deploy |
| 113 | + |
| 114 | + |
| 115 | +### Q: How can I iterate ECS modification testing |
| 116 | +A: After applying your modifications (vía terraform for example) restart the service |
| 117 | + ``` |
| 118 | + $ aws ecs update-service --force-new-deployment --cluster sysdig-secure-for-cloud-ecscluster --service sysdig-secure-for-cloud-cloudconnector --profile <AWS_PROFILE> |
| 119 | + ``` |
| 120 | +For the AWS_PROFILE, set your `~/.aws/config` to impersonate |
| 121 | + ``` |
| 122 | + [profile secure-for-cloud] |
| 123 | + region=eu-central-1 |
| 124 | + role_arn=arn:aws:iam::<AWS_MANAGEMENT_ORGANIZATION_ACCOUNT>:role/OrganizationAccountAccessRole |
| 125 | + source_profile=<AWS_MANAGEMENT_ACCOUNT_PROFILE> |
| 126 | + ``` |
115 | 127 |
|
116 | 128 | <br/><br/>
|
117 | 129 | ## Authors
|
|
0 commit comments