Skip to content
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

Update cardinality field in schema for threshold rules #1349

Merged
merged 13 commits into from
Jul 21, 2021

Conversation

brokensound77
Copy link
Contributor

Issues

No issue for schema update
rules related to elastic/security-team#944

Summary

When the schema was updated to include cardinality, it was not added as an array field, which should have been. From the Kibana change:

The cardinality field has been normalized to be an array to avoid a future migration when we support multiple cardinality fields.

This also limits it to a max of 3 strings to reflect the client side validation enforced within Kibana.

This also adds a couple of rules which depended on the field.

@brokensound77 brokensound77 added bug Something isn't working python Internal python for the repository schema labels Jul 16, 2021
@brokensound77 brokensound77 force-pushed the host-masquerading-rule branch from fec8a23 to 9ba3c3b Compare July 19, 2021 19:51
Copy link
Contributor

@rw-access rw-access left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:soclose1:
:soclose2:

@brokensound77
Copy link
Contributor Author

:soclose1:
:soclose2:

should be good to go now

Copy link
Contributor

@rw-access rw-access left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just rebuild and inspect the JSON, then LGTM.

@brokensound77 brokensound77 merged commit 163d9e3 into elastic:main Jul 21, 2021
@brokensound77 brokensound77 deleted the host-masquerading-rule branch July 21, 2021 16:32
protectionsmachine pushed a commit that referenced this pull request Jul 21, 2021
* Make cardinality array in schema for threshold rules
* update master, 7.12, 7.13, and 7.14 schemas with cardinality fix
* fix 7.12 downgrade to handle cardinality as an array

* Add two new rules to detect agent spoofing

Co-authored-by: Ross Wolf <[email protected]>

(cherry picked from commit 163d9e3)
protectionsmachine pushed a commit that referenced this pull request Jul 21, 2021
* Make cardinality array in schema for threshold rules
* update master, 7.12, 7.13, and 7.14 schemas with cardinality fix
* fix 7.12 downgrade to handle cardinality as an array

* Add two new rules to detect agent spoofing

Co-authored-by: Ross Wolf <[email protected]>

(cherry picked from commit 163d9e3)
"""
false_positives = [
"""
This is meant to run only on datasources using agents v7.14+ since versions prior to that will be missing the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One reason the security app never used host.id for identifying hosts is that it wasn't reliably unique (for beats) in environments where VM images are cloned without resetting /etc/machine-id. I would recommend mentioning this as a false positive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: auto bug Something isn't working python Internal python for the repository schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants