-
Notifications
You must be signed in to change notification settings - Fork 514
Cis k8s name migration #3113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Cis k8s name migration #3113
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Empty file.
This file contains hidden or 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,6 @@ | ||
| # newer versions go on top | ||
| - version: "0.0.1" | ||
| changes: | ||
| - description: Initial draft of the package | ||
| type: enhancement | ||
| link: https://github.com/elastic/integrations/pull/3113 |
2 changes: 2 additions & 0 deletions
2
packages/cloud_security_posture/data_stream/findings/agent/stream/stream.yml.hbs
This file contains hidden or 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,2 @@ | ||
| processors: | ||
| - add_cluster_id: ~ |
12 changes: 12 additions & 0 deletions
12
packages/cloud_security_posture/data_stream/findings/fields/base-fields.yml
This file contains hidden or 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,12 @@ | ||
| - name: data_stream.type | ||
| type: constant_keyword | ||
| description: Data stream type. | ||
| - name: data_stream.dataset | ||
| type: constant_keyword | ||
| description: Data stream dataset. | ||
| - name: data_stream.namespace | ||
| type: constant_keyword | ||
| description: Data stream namespace. | ||
| - name: '@timestamp' | ||
| type: date | ||
| description: Event timestamp. |
81 changes: 81 additions & 0 deletions
81
packages/cloud_security_posture/data_stream/findings/fields/findings.yml
This file contains hidden or 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,81 @@ | ||
| - name: cycle_id | ||
| type: text | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: type | ||
| type: text | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: resource_id | ||
| type: text | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: cluster_id | ||
| type: text | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: agent | ||
| type: group | ||
| fields: | ||
| - name: id | ||
| type: text | ||
| description: Agent ID | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: resource | ||
| type: group | ||
| fields: | ||
| - name: type | ||
| type: text | ||
| description: Source type of the resource | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: filename | ||
| type: text | ||
| description: Resource filename | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: rule | ||
| type: group | ||
| fields: | ||
| - name: name | ||
| type: keyword | ||
| description: Rule name | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: benchmark | ||
| type: group | ||
| fields: | ||
| - name: name | ||
| type: text | ||
| description: Benchmark name | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| - name: result | ||
| type: group | ||
| fields: | ||
| - name: evaluation | ||
| type: text | ||
| description: Rule result | ||
| multi_fields: | ||
| - name: keyword | ||
| type: keyword | ||
| ignore_above: 1024 |
6 changes: 6 additions & 0 deletions
6
packages/cloud_security_posture/data_stream/findings/manifest.yml
This file contains hidden or 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,6 @@ | ||
| title: "Findings" | ||
| type: logs | ||
| streams: | ||
| - input: cloudbeat | ||
| title: K8s CIS Compliance | ||
| description: Check CIS Benchmark compliance |
This file contains hidden or 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,28 @@ | ||
| # CIS Kubernetes Benchmark | ||
|
|
||
| This integration compares [Kubernetes](https://kubernetes.io/) configuration against CIS benchmark checks. It computes a score that ranges between 0 - 100. This integration requires access to node files, node processes, and the Kuberenetes api-server therefore it assumes the agent will be installed as a [DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) with the proper [Roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) and [RoleBindings](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) attached. | ||
|
|
||
| See agent [installation instructions](https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html). | ||
|
|
||
| Additionally, In order for the integration to be installed, The Cloud Security Posture Kibana plugin must be enabled. | ||
|
|
||
| This could be done by adding the following configuration line to `kibana.yml`: | ||
| ``` | ||
| xpack.cloudSecurityPosture.enabled: true | ||
| ``` | ||
|
|
||
| ## Leader election | ||
|
|
||
| To collect cluster level data (compared to node level information) the integration makes use of the [leader election](https://www.elastic.co/guide/en/fleet/master/kubernetes_leaderelection-provider.html) mechanism. | ||
| This mechanism assures that the cluster level data is collected by only one of the agents running as aprt of the DeamonSet and not by all of them. | ||
|
|
||
| Cluster level data example: List of the running pods. | ||
| Node level data examle: kubelet configuration. | ||
|
|
||
| ## Compatibility | ||
|
|
||
| The Kubernetes package is tested with Kubernetes 1.21.x | ||
|
|
||
| ## Dashboard | ||
|
|
||
| CIS Kubernetes Benchmark integration is shipped including default dashboards and screens to manage the benchmark rules and inspect the compliance score and findings. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
packages/cloud_security_posture/img/cis-kubernetes-benchmark-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
...ure/kibana/index_pattern/cloud_security_posture-9129a080-7f48-11ec-8249-431333f83c5f.json
This file contains hidden or 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,14 @@ | ||
| { | ||
| "attributes": { | ||
| "description": "", | ||
| "title": "logs-cloud_security_posture.findings-*" | ||
| }, | ||
| "coreMigrationVersion": "8.1.0", | ||
| "id": "cloud_security_posture-9129a080-7f48-11ec-8249-431333f83c5f", | ||
| "migrationVersion": { | ||
| "index-pattern": "8.0.0" | ||
| }, | ||
| "type": "index-pattern", | ||
| "updated_at": "2022-01-27T08:10:19.277Z", | ||
| "version": "WzMwNDY5LDFd" | ||
| } | ||
This file contains hidden or 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,57 @@ | ||
| format_version: 1.0.0 | ||
| name: cloud_security_posture | ||
| title: "CIS Kubernetes Benchmark" | ||
| version: 0.0.1 | ||
| license: basic | ||
| description: "Check Kubernetes cluster compliance with the Kubernetes CIS benchmark." | ||
| type: integration | ||
| categories: | ||
| - containers | ||
| - kubernetes | ||
| release: experimental | ||
| conditions: | ||
| kibana.version: "^8.3.0" | ||
| screenshots: | ||
| - src: /img/dashboard.png | ||
| title: Dashboard page | ||
| size: 1293x718 | ||
| type: image/png | ||
| - src: /img/findings.png | ||
| title: Findings page | ||
| size: 3134x1740 | ||
| type: image/png | ||
| - src: /img/findings-flyout.png | ||
| title: Detailed view of a single finding | ||
| size: 3176x1748 | ||
| type: image/png | ||
| - src: /img/benchmarks.png | ||
| title: Benchmarks page | ||
| size: 3168x1752 | ||
| type: image/png | ||
| - src: /img/rules.png | ||
| title: Rules page | ||
| size: 3160x1708 | ||
| type: image/png | ||
| icons: | ||
| - src: /img/cis-kubernetes-benchmark-logo.svg | ||
| title: CIS Kubernetes Benchmark logo | ||
| size: 32x32 | ||
| type: image/svg+xml | ||
| policy_templates: | ||
| - name: kspm | ||
| title: CIS Kubernetes Benchmark | ||
| description: Check Kubernetes cluster compliance with the Kubernetes CIS benchmark. | ||
| multiple: false | ||
| inputs: | ||
| - type: cloudbeat | ||
| title: Enable CIS Kubernetes Benchmark | ||
| description: Collecting findings | ||
| vars: | ||
| - name: dataYaml | ||
| type: yaml | ||
| title: Rules Activation Yaml | ||
| multi: false | ||
| required: false | ||
| show_user: false | ||
| owner: | ||
| github: elastic/cloud-security-posture |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kfirpeled I know it's already merged, but since the current findings index is
logs-cloud_security_posture.findings_latest-defaultthis data view didn't catch it 😢There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oren-zohar This is on purpose, we'll move the
findings_latestindex in a different PR