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

New component: Community ID processor #34661

Open
6 tasks
mashhurs opened this issue Aug 13, 2024 · 5 comments
Open
6 tasks

New component: Community ID processor #34661

mashhurs opened this issue Aug 13, 2024 · 5 comments
Labels
Sponsor Needed New component seeking sponsor Stale

Comments

@mashhurs
Copy link
Contributor

mashhurs commented Aug 13, 2024

The purpose and use-cases of the new component

(Please see the discussion for details and decided to make it with processor: #34062)

When monitoring/analyzing network flow, for example threat hunting security use cases, it's often required to make "joins" on network source and destination info where community ID simplifies and gives a better user experience when analyzing the data (aggregate by community ID to collect statistics, etc.)

Community ID is a single unique ID based on the network flow info. It is an additional flow identifier and doesn't replace existing flow identification mechanisms already supported by the monitors. See the specification.

Elastic (it is not a vendor specific) best practise examples

Initial implementation

Initial implementation will be minimum configurable with KISS logic.

Mapping fields:

  • [IN] source ip: source.address
  • [IN]source port: source.port
  • [IN]destination ip: destination.address
  • [IN]destination port: destination.port
  • [IN]transport protocol: network.transport
  • [OUT] target: defaults to network.community_id - discussion/investigation required
    • (todo-1) double check naming convention
    • (todo-2) add sub-field to network field by default
    • (todo-3) best practise when adding fields

Validation:

  • Parse IP against IPv4|IPv6, error if invalid IP
  • If network.type is available, error if IP mismatches
  • Error if port is not in range of 1 ~ 65535
  • Error if transport protocol is not TCP|UDP|SCTP

Future enhancement

  • configurable source and destination attributes which useful when using after DNS resolver processor
  • IANA number: need a field specification
  • ICMP type: to support ICMP, need a field specification
  • ICMP code: to support ICMP, need a field specification

Example configuration for the component

processors:
  communityid:
    # super simple stupid config, by default uses `source.address`, `source.port`, `destination.address`, `destination.port` and `network.transport` to calculate the flow

    # a target field to be assigned with calculated community ID, defaults to `network.community_id`
    target: network.community_id

    # a seed value to prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme. Defaults to 0 (zero).
    seed: 0

    # Defines how the processor handles errors. Accepts `log` or `silent`
    # - `log`: Processor logs errors and continues to the next processor (default).
    # - `silent`: Processor ignores errors without logging and continues to the next processor.
    error_mode: log

Telemetry data types supported

traces, metrics and logs

Is this a vendor-specific component?

  • This is a vendor-specific component
  • If this is a vendor-specific component, I am a member of the OpenTelemetry organization.
  • If this is a vendor-specific component, I am proposing to contribute and support it as a representative of the vendor.

Not a vendor specific.

Code Owner(s)

evan-bradley

Sponsor (optional)

No response

Additional context

No response

@kentquirk
Copy link
Member

The description above tells how a community ID is calculated, but it doesn't explain how the payload is transformed. Please add that information to the description.

@atoulme
Copy link
Contributor

atoulme commented Oct 12, 2024

Is @evan-bradley quoted here as a potential sponsor?

@atoulme atoulme removed the needs triage New item requiring triage label Oct 12, 2024
@mashhurs
Copy link
Contributor Author

Is @evan-bradley quoted here as a potential sponsor?

Initially I had a proposal to make this functionality with ottl. After discussing (here) with @evan-bradley, we decided to move to processor.

@mashhurs
Copy link
Contributor Author

The description above tells how a community ID is calculated, but it doesn't explain how the payload is transformed. Please add that information to the description.

The way I was thinking is, the flow calculation will be based on source and destination attributes. The result will be included network (configurable) attribute. Sample configuration is attached in the description but I don't know yet the implementation details (since I didn't actively start the implementation). My knowledge/experience on oTel is so limited, so please let me know if you need more info or it needs to be designed in a specific way or your thoughts for this feature/implementation.
Thanks.

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsor Needed New component seeking sponsor Stale
Projects
None yet
Development

No branches or pull requests

3 participants