-
Notifications
You must be signed in to change notification settings - Fork 174
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
add new namespace "rule.*" #903
Open
trisch-me
wants to merge
44
commits into
open-telemetry:main
Choose a base branch
from
trisch-me:rule_new
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
36792a1
add new namespace rule
trisch-me 12dea45
Merge branch 'main' into rule_new
trisch-me ede2cfb
Merge branch 'main' into rule_new
trisch-me 4dc213c
Merge branch 'main' into rule_new
trisch-me f775ba5
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me ca5b8ea
updated for the weaver
trisch-me 5400212
Merge branch 'main' into rule_new
trisch-me c9f9e98
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me d8ce7fa
remove author until further discussion
trisch-me 84f54a6
Merge branch 'rule_new' of github.com:trisch-me/semantic-conventions …
trisch-me 6c9c593
fix registry
trisch-me b7f73f3
Merge branch 'main' into rule_new
trisch-me 5c948f7
Merge branch 'main' into rule_new
trisch-me 749e3ea
Merge branch 'main' into rule_new
trisch-me 24bfc5a
Merge branch 'main' into rule_new
trisch-me fef0e7c
Merge branch 'main' into rule_new
trisch-me 6fcc7ce
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me bb8bd05
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me eedc6d0
update rule sub namespace to be security
trisch-me 1404699
Merge branch 'main' into rule_new
trisch-me 6c370f9
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me 8560c69
Merge branch 'rule_new' of github.com:trisch-me/semantic-conventions …
trisch-me 7b90fc8
rename rule.security to security_rule
trisch-me ffc315a
update templates for the new name
trisch-me 1ba6d43
Merge branch 'main' into rule_new
joaopgrassi e57150c
Merge branch 'main' into rule_new
trisch-me 908b0f2
remove prefix
trisch-me dc29cad
Merge branch 'rule_new' of github.com:trisch-me/semantic-conventions …
trisch-me cdf1286
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me 95afc21
Merge branch 'main' into rule_new
trisch-me dd320a9
Merge branch 'main' into rule_new
trisch-me 9ea87ba
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me 962a1e7
remove rule.id from namespace
trisch-me 0c5e4b9
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me 14ae893
update to the new structure
trisch-me 5409311
Merge branch 'main' into rule_new
trisch-me 1de85cb
Merge branch 'main' into rule_new
trisch-me 31e4ff4
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me 1a057d6
Merge branch 'main' into rule_new
trisch-me a8a7f67
Merge branch 'main' into rule_new
trisch-me 3209ed0
Merge branch 'main' into rule_new
trisch-me 0dcddd5
Merge branch 'rule_new' of github.com:trisch-me/semantic-conventions …
trisch-me ad27236
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me 177e10d
update markdown
trisch-me 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 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,22 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
# | ||
# If your change doesn't affect end users you should instead start | ||
# your pull request title with [chore] or use the "Skip Changelog" label. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: new_component | ||
|
||
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) | ||
component: security-rule | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Introducing a new security rule namespace | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
# The values here must be integers. | ||
issues: [903] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
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
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
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
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
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,24 @@ | ||
<!--- Hugo front matter used to generate the website version of this page: | ||
---> | ||
|
||
<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. --> | ||
<!-- see templates/registry/markdown/attribute_namespace.md.j2 --> | ||
|
||
# Security Rule | ||
|
||
## Security Rule | ||
|
||
Describes security rule attributes. Rule fields are used to capture the specifics of any observer or agent rules that generate alerts or other notable events. | ||
|
||
| Attribute | Type | Description | Examples | Stability | | ||
|---|---|---|---|---| | ||
| <a id="security-rule-category" href="#security-rule-category">`security_rule.category`</a> | string | A categorization value keyword used by the entity using the rule for detection of this event | `Attempted Information Leak` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-description" href="#security-rule-description">`security_rule.description`</a> | string | The description of the rule generating the event. | `Block requests to public DNS over HTTPS / TLS protocols` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-license" href="#security-rule-license">`security_rule.license`</a> | string | Name of the license under which the rule used to generate this event is made available. | `Apache 2.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-name" href="#security-rule-name">`security_rule.name`</a> | string | The name of the rule or signature generating the event. | `BLOCK_DNS_over_TLS` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-reference" href="#security-rule-reference">`security_rule.reference`</a> | string | Reference URL to additional information about the rule used to generate this event. [1] | `https://en.wikipedia.org/wiki/DNS_over_TLS` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-ruleset" href="#security-rule-ruleset">`security_rule.ruleset`</a> | string | Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. | `Standard_Protocol_Filters` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-uuid" href="#security-rule-uuid">`security_rule.uuid`</a> | string | A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event. | `550e8400-e29b-41d4-a716-446655440000`; `1100110011` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
| <a id="security-rule-version" href="#security-rule-version">`security_rule.version`</a> | string | The version / revision of the rule being used for analysis. | `1.0.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | ||
|
||
**[1]:** The URL can point to the vendor’s documentation about the rule. If that’s not available, it can also be a link to a more general page describing this type of alert. |
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,60 @@ | ||
groups: | ||
- id: registry.security_rule | ||
display_name: Security Rule | ||
type: attribute_group | ||
brief: > | ||
Describes security rule attributes. Rule fields are used to capture the specifics of any observer or agent rules | ||
that generate alerts or other notable events. | ||
attributes: | ||
- id: security_rule.category | ||
type: string | ||
stability: experimental | ||
brief: > | ||
A categorization value keyword used by the entity using the rule for detection of this event | ||
examples: ['Attempted Information Leak'] | ||
- id: security_rule.description | ||
type: string | ||
stability: experimental | ||
brief: > | ||
The description of the rule generating the event. | ||
examples: ['Block requests to public DNS over HTTPS / TLS protocols'] | ||
- id: security_rule.license | ||
type: string | ||
stability: experimental | ||
brief: > | ||
Name of the license under which the rule used to generate this event is made available. | ||
examples: ['Apache 2.0'] | ||
- id: security_rule.name | ||
type: string | ||
stability: experimental | ||
brief: > | ||
The name of the rule or signature generating the event. | ||
examples: ['BLOCK_DNS_over_TLS'] | ||
- id: security_rule.reference | ||
type: string | ||
stability: experimental | ||
brief: > | ||
Reference URL to additional information about the rule used to generate this event. | ||
note: > | ||
The URL can point to the vendor’s documentation about the rule. | ||
If that’s not available, it can also be a link to a more general page describing this type of alert. | ||
examples: ['https://en.wikipedia.org/wiki/DNS_over_TLS'] | ||
- id: security_rule.ruleset | ||
type: string | ||
stability: experimental | ||
brief: > | ||
Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. | ||
examples: ['Standard_Protocol_Filters'] | ||
- id: security_rule.uuid | ||
type: string | ||
stability: experimental | ||
brief: > | ||
A rule ID that is unique within the scope of a set or group of agents, observers, or other entities | ||
using the rule for detection of this event. | ||
examples: ['550e8400-e29b-41d4-a716-446655440000', '1100110011'] | ||
- id: security_rule.version | ||
type: string | ||
stability: experimental | ||
brief: > | ||
The version / revision of the rule being used for analysis. | ||
examples: ['1.0.0'] |
Oops, something went wrong.
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.
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.
I know I'm a bit late here, I've been following this.
To some extent, it's unclear to me who will be generating this data, so if you can speak to how it's used in Elastic Common Schema and instances of logs that generate this data that could help.
Some major comments:
Rule
vsSecurity Rule
vs.Policy
- it's hard to understand what the name/scope should be here, as it's very broad. E.g. the way this is phrased now, this could apply to OPA, which has a very clear definition of what is a policy and a rule (and I'd argue, a good foundation we can align with ECS as a way forward). I'm not in the details, but I think what you have aligns with rule there, sopolicy.rule
may be a good namespace here, not that I want to litigate all that right now.embed
sufficiently AND I feel like if we did, there'd be a LOT less contention on this PR.license
being something that I don't understand yet (I'm not a domain expert here, so don't take this as a blocker, just something I think would need to be justified).In the description, you call out several examples of who would use these attributes. Do you have example events that are produced by those things we could look at or point to? Until we unblock Events effectively and/or make progress on
embed
I think this could do a lot for "general" reviewers to be able to evaluate this.TL;DR; I don't feel capable to approve this PR right now. I suggest one of two options:
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.
I can try to address some of these, @trisch-me might know more or have more feedback
The usual security use case of these rule fields would be in alert event logs. A security product would run on endpoints monitoring/protecting systems by evaluating sets of rules loaded into the product. When a rule evaluates to true, the endpoint generates an alert event that includes information on what rule triggered the alert. SIEM products can also run detection rules on the data they have already ingested, which is an important use case, but less relevant to open telemetry, since the data is staying within the backend.
Examples of security rules:
The Falco documentation has some easy to understand documentation of what a security rule is: https://falco.org/docs/rules/basic-elements/
I think within security, the differences of rule vs. policy isn't always consistent or clear. Sometimes "rule" is only the detection condition, and sometimes the conditional and response action combined, so more like a OPA policy. Falco rules define the detection condition and response, by defining the priority and output content of the resulting alert. Elastic and Sigma rules only define the detection condition, and the response action is defined separately.
I'm unsure if it's common for OPA rules, or other non-security rules to be published in the same way security rules are, so I don't know if things like version, license, etc apply to them. If they do, I agree this namespace could be made more broad to cover other use cases too.
I could provide a raw alert event with ECS if you want, but it could be hard to understand and might not be too useful. Instead here's a screenshot of the alert UI, which is generated with the ECS event fields:
For the license, the rules are usually published as code, so the license is just the normal code copyright license that applies to it.