|
| 1 | +# OCI Security Health Check - Standard Edition |
| 2 | + |
| 3 | +Owner: Olaf Heimburger |
| 4 | + |
| 5 | +## When to use this asset? |
| 6 | + |
| 7 | +The OCI Security Health Check - Standard Edition checks an OCI tenancy for CIS OCI Foundation Benchmark compliance. |
| 8 | + |
| 9 | +## Usage |
| 10 | + |
| 11 | +### Prepare the OCI Tenancy |
| 12 | + |
| 13 | +You can run the assessment as a member of the OCI `Administrator` group or |
| 14 | +create a group for auditing and assign the respective user to it. |
| 15 | + |
| 16 | +Running the assessment script as an OCI `Administrator` is the easiest and |
| 17 | +quickest way. If you decide to use this option, please continue reading in |
| 18 | +[Run the OCI Security Health Check in Cloud Shell](#run-the-oci-security-health-check-in-cloud-shell). |
| 19 | + |
| 20 | +For recurring usage, setting up a group for auditing is recommended. The |
| 21 | +steps for setting this up are described in the next chapter. |
| 22 | + |
| 23 | +#### Setting up an *Auditor* group and policy |
| 24 | + |
| 25 | +Using an auditor group is the recommended way to run the assessment script. |
| 26 | +To create a group for auditing do the following steps: |
| 27 | + |
| 28 | + - Log into OCI Console as OCI administrator |
| 29 | + - Create a group `grp-auditors` |
| 30 | + - Create a policy `pcy-auditing` with these statements: |
| 31 | + ``` |
| 32 | + allow group grp-auditors to inspect all-resources in tenancy |
| 33 | + allow group grp-auditors to read instances in tenancy |
| 34 | + allow group grp-auditors to read load-balancers in tenancy |
| 35 | + allow group grp-auditors to read buckets in tenancy |
| 36 | + allow group grp-auditors to read nat-gateways in tenancy |
| 37 | + allow group grp-auditors to read public-ips in tenancy |
| 38 | + allow group grp-auditors to read file-family in tenancy |
| 39 | + allow group grp-auditors to read instance-configurations in tenancy |
| 40 | + allow group grp-auditors to read network-security-groups in tenancy |
| 41 | + allow group grp-auditors to read resource-availability in tenancy |
| 42 | + allow group grp-auditors to read audit-events in tenancy |
| 43 | + allow group grp-auditors to read users in tenancy |
| 44 | + allow group grp-auditors to read vss-family in tenancy |
| 45 | + allow group grp-auditors to read dns in tenancy |
| 46 | + allow group grp-auditors to use cloud-shell in tenancy |
| 47 | + ``` |
| 48 | + - Assign a user to the `grp-auditors` group |
| 49 | + - Log out of the OCI Console |
| 50 | +
|
| 51 | +### Run the OCI Security Health Check in OCI Cloud Shell |
| 52 | +
|
| 53 | +The recommended way is to run the *OCI Security Health Check - Standard* in the OCI Cloud Shell. It does not require any additional configuration on a local desktop machine. |
| 54 | +
|
| 55 | +#### Download and upload the release file |
| 56 | +
|
| 57 | + - Download the the latest distribution [oci-security-health-check-standard-\<version>.zip](releases/oci-security-health-check-standard-\<version>.zip). |
| 58 | + - Log into the OCI Console. |
| 59 | + - Select the *Developer Tools* icon (looks like a small window) in the header toolbar. |
| 60 | + - From the menu select the *Cloud Shell* item. |
| 61 | + - Wait until the Cloud Shell has been initialized. |
| 62 | + - ... |
| 63 | + - Upload the distribution file. |
| 64 | + - Extract it |
| 65 | + ``` |
| 66 | + $ unzip -q oci-security-health-check-standard-<version>.zip |
| 67 | + ``` |
| 68 | +
|
| 69 | +### Run the script |
| 70 | + - Change directory into `oci-security-health-check-standard-<version>`: |
| 71 | + ``` |
| 72 | + $ cd oci-security-health-check-standard-<version> |
| 73 | + ``` |
| 74 | + - In the `oci-security-health-check-standard-<version>` directory: |
| 75 | + - Enable execution of script `standard.sh`: |
| 76 | + ``` |
| 77 | + $ chmod +x standard.sh |
| 78 | + ``` |
| 79 | + - Run the script for all subscribed regions: |
| 80 | + ``` |
| 81 | + $ ./standard.sh |
| 82 | + ``` |
| 83 | + - Run the script for one subscribed region: |
| 84 | + ``` |
| 85 | + $ ./standard.sh -r <region_name> |
| 86 | + ``` |
| 87 | + - Get command line options: |
| 88 | + ``` |
| 89 | + $ ./standard.sh -h |
| 90 | + ``` |
| 91 | +
|
| 92 | +### Getting the results |
| 93 | + - In the directory `oci-security-health-check-standard-<version>` a directory will be created which |
| 94 | + holds all the output created by the scripts. This directory will be |
| 95 | + compressed in a single ZIP file and the resulting ZIP file will be moved to |
| 96 | + the parent directory of `oci-security-health-check-standard-<version>`. |
| 97 | +
|
| 98 | +# License |
| 99 | +
|
| 100 | +Copyright (c) 2022-2023 Oracle and/or its affiliates. |
| 101 | +
|
| 102 | +Licensed under the Universal Permissive License (UPL), Version 1.0. |
| 103 | +
|
| 104 | +See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/folder-structure/LICENSE) for more details. |
0 commit comments