-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from bottlerocket-os/main
Move to Production: cis-k8s and autoscaling settings reference
- Loading branch information
Showing
6 changed files
with
139 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
+++ | ||
title = "Reporting" | ||
type = "docs" | ||
description = "Using the Report API to automate operating system-level reporting." | ||
+++ | ||
|
||
Operating systems are complicated; inspecting and reporting data about the OS is a common but tedious task that needs repeating as configurations change. | ||
Manually gathering this data for Bottlerocket has additional complications due to API abstracted settings and indirect access to the host. | ||
|
||
The Bottlerocket report API provides a mechanism to automate operating system-level reporting. | ||
You can run reports that self-evaluate the OS based on the current state of the system compared to known standards. | ||
|
||
## Center for Internet Security (CIS) Benchmark | ||
|
||
You can currently generate reports on your Bottlerocket nodes against two different CIS benchmarks: | ||
|
||
- [Bottlerocket CIS Benchmark](./cis/) | ||
- [Kubernetes CIS Benchmark](./cis-k8s) | ||
|
||
## Running a report | ||
|
||
You will need to be running the [control container](../../concepts/shell-less-host/#control-container) or, alternately, mount the `apiclient` binary and the Bottlerocket API unix socket into a container as well as have the appropriate SELinux permissions. | ||
|
||
First, create an interactive shell session on the control container or container with `apiclient`. | ||
From the shell run: | ||
|
||
```shell | ||
apiclient report <report identifier> | ||
``` | ||
|
||
This will evaluate the current node to a particular report and return the results in a human-readable format. | ||
|
||
If you intend to process the report with some other piece of software, add the flag `-f` with the value of `json` for a JSON representation of the report: | ||
|
||
```shell | ||
# Returns evaluation of the report in JSON format | ||
apiclient report <report identifier> -f json | ||
``` | ||
|
||
## Evaluation Results | ||
|
||
Evaluation of each item on the report will result in one of three outcomes: | ||
|
||
* `PASS`: Evaluated item is in compliance with the benchmark. | ||
* `FAIL`: Evaluated item is not in compliance with the benchmark. | ||
* `SKIP`: The item could not be automatically evaluated. | ||
|
||
## All Available Reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
+++ | ||
title = "K8s CIS Benchmark" | ||
type = "docs" | ||
description = "Generating a Kubernetes CIS Benchmark report" | ||
toc_hide=true | ||
+++ | ||
|
||
The [Kubernetes CIS Benchmark](https://www.cisecurity.org/benchmark/kubernetes) contains a number of security best practices to harden Kubernetes worker nodes. | ||
|
||
{{% alert title="Note" color="success" %}} | ||
The Kubernetes CIS Benchmark contains two levels, however, currently, level 2 only adds one additional check (4.2.8) for worker nodes. The Bottlerocket reporting API cannot automatically evaluate this additional check and therefore the two levels are functionally identical for automatic evaluation purposes. | ||
{{% /alert %}} | ||
|
||
## Examples | ||
|
||
Expanding upon the general instructions to [run a report](../#running-a-report), for the Bottlerocket CIS benchmark use the identifier `cis-k8s`: | ||
|
||
```shell | ||
apiclient report cis-k8s | ||
``` | ||
|
||
Adding the flag `-l` with the value of `2` will evaluate to the Level 2 benchmark. For example: | ||
|
||
```shell | ||
# Returns evaluation of CIS Benchmark Level 2 | ||
apiclient report cis-k8s -l 2 | ||
``` | ||
|
||
## Audit and Remediation | ||
|
||
Refer to the [Kubernetes CIS Benchmark](https://www.cisecurity.org/benchmark/kubernetes) for detailed audit and remediation steps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
+++ | ||
title = "Bottlerocket CIS Benchmark" | ||
type = "docs" | ||
description = "Generating a Bottlerocket CIS Benchmark report" | ||
toc_hide=true | ||
+++ | ||
|
||
The [Bottlerocket CIS Benchmark](https://www.cisecurity.org/benchmark/bottlerocket) contains a number of security best practices to harden Bottlerocket worker nodes. | ||
The benchmark contains two levels: | ||
|
||
* **Level 1:** basic guidelines with clear security benefits that do not inhibit the node. | ||
Bottlerocket’s default settings are compliant with level 1. | ||
* **Level 2:** detailed, specific guidance that provide more defence to the node. | ||
This level introduces some trade-offs between functionality and security. | ||
|
||
The report API has built-in tests that allow you to evaluate the state of the node to both Level 1 and Level 2. | ||
|
||
## Examples | ||
|
||
Expanding upon the general instructions to [run a report](../#running-a-report), for the Bottlerocket CIS benchmark use the identifier `cis`: | ||
|
||
```shell | ||
apiclient report cis | ||
``` | ||
|
||
Adding the flag `-l` with the value of `2` will evaluate to the Level 2 benchmark. For example: | ||
|
||
```shell | ||
# Returns evaluation of CIS Benchmark Level 2 | ||
apiclient report cis -l 2 | ||
``` | ||
|
||
## Audit and Remediation | ||
|
||
Refer to the [Bottlerocket CIS Benchmark](https://www.cisecurity.org/benchmark/bottlerocket) for detailed audit and remediation steps. |
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
content/en/os/1.15.x/api/settings/autoscaling/_index.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
+++ | ||
title="autoscaling" | ||
type="docs" | ||
toc_hide=true | ||
description="Settings related to auto scaling groups (`settings.autoscaling.*`)" | ||
+++ | ||
|
||
[Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html) settings for `aws-*` variants. | ||
|
||
{{< settings >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[[docs.ref.should-wait]] | ||
description = """ | ||
If set to `true`, the node waits until the instance reaches the [`InService` state](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-inservice) to join the cluster. | ||
""" | ||
accepted_values = [ | ||
"`true`", | ||
"`false`" | ||
] | ||
note = """ | ||
Only set this value to `true` if the instance is currently (or will be) in an auto scaling group. | ||
""" | ||
default = "`false`" | ||
|
||
[[docs.ref.should-wait.example]] | ||
value = "true" |