Graylog2 / Graylog2/graylog2-server
Restrict identifying and non-identifying Collector attributes
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
We should restrict Collector-submitted identifying and non-identifying attributes. Limit the number of attributes and truncate keys, string values, and byte values before persisting them.
The extractor should skip blank keys, de-duplicate keys after truncation, and emit one summary warning instead of logging each rejected attribute.
`CollectorInstancesResource#attributesToMap` should also handle duplicate keys defensively because `Collectors.toMap` currently fails on duplicates.
Additionally, avoid logging complete untrusted OpAMP messages and health trees, since the persisted data may be bounded while log output remains large.
Contributor guide
Research direction
Start by tracing Collector-submitted attributes and the CollectorInstancesResource#attributesToMap entry point. Check how attributes are persisted and how OpAMP messages and health trees are logged. Done means bounded and de-duplicated attributes, one summary warning for rejected values, defensive duplicate-key handling, and no complete untrusted messages or health trees in logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100