Mitigation Strategy: Input Validation and Rate Limiting (Receiver Level - Collector Config)
-
Description:
- Receiver Configuration: Within your
config.yaml
(or equivalent), locate the configuration for each active receiver (e.g.,otlp
,jaeger
,zipkin
). - Data Size Limits:
otlp
Receiver: Use themax_allowed_size
setting (if available) within theprotocols
section (e.g.,grpc
orhttp
) to limit the size of individual spans and log entries in bytes.- Other Receivers: Consult the documentation for each receiver to find equivalent settings for limiting message sizes.
- Attribute Count Limits: Within the receiver configuration, if supported, set limits on the number of attributes per span, metric, or log entry. Look for settings like
max_attributes
or similar. - Data Type Validation: Most receivers perform basic data type validation against the OpenTelemetry specification by default. Confirm this in the receiver's documentation.
- Rate Limiting (Collector-Side): Check if your receivers have built-in rate limiting options (e.g.,
max_requests_per_second
,rate_limiting
configurations). If available, configure limits per client IP address or other identifying information within the receiver's configuration. - Custom Receiver (If Necessary): If a built-in receiver lacks crucial validation or rate limiting, and external solutions are not feasible, consider developing a custom receiver that implements these features. This is an advanced option.
- Testing: Use a load-testing tool to send high volumes of data and oversized/malformed payloads to the collector. Verify that the configured limits are enforced and the collector remains stable.
- Receiver Configuration: Within your
-
Threats Mitigated:
- Denial of Service (DoS) - High Severity: Prevents attackers from overwhelming the collector with excessive data.
- Resource Exhaustion - High Severity: Limits resource consumption.
- Data Injection (Partial) - Medium Severity: Provides some protection against large malicious payloads.
-
Impact:
- DoS: Significantly reduces risk (if rate limiting and size limits are properly configured).
- Resource Exhaustion: Significantly reduces risk.
- Data Injection: Provides partial mitigation.
-
Currently Implemented (Example):
max_allowed_size
is set for theotlp/grpc
receiver.- No attribute count limits are configured.
- No collector-side rate limiting is configured.
-
Missing Implementation (Example):
- Attribute count limits are missing for all receivers.
- Collector-side rate limiting is missing (where supported by the receiver).
Mitigation Strategy: Authentication and Authorization (Receiver Level - Collector Config & Extensions)
-
Description:
- Receiver Configuration: Within your
config.yaml
, examine each receiver's configuration for authentication options. - mTLS (Recommended):
- If the receiver supports mTLS (e.g.,
otlp
withgrpc
orhttp
), configure it:- Specify the path to the collector's server certificate and key (
cert_file
,key_file
). - Specify the path to the CA certificate used to verify client certificates (
ca_file
). - Enable client authentication (e.g.,
client_auth: require
).
- Specify the path to the collector's server certificate and key (
- If the receiver supports mTLS (e.g.,
- API Keys/Tokens (Less Secure):
- If the receiver supports API key/token authentication, configure it:
- Define a mechanism for validating API keys (e.g., a static list in the configuration, or a custom authenticator extension).
- Specify the expected header containing the API key (e.g.,
X-API-Key
).
- If the receiver supports API key/token authentication, configure it:
- Custom Authenticator Extension: If built-in authentication mechanisms are insufficient, develop a custom authenticator extension. This extension would:
- Implement the
configauth.Authenticator
interface. - Authenticate incoming requests based on your chosen method (mTLS, API keys, custom logic).
- Be referenced in the receiver's configuration.
- Implement the
- Custom Authorizer Extension (Optional): For fine-grained authorization, develop a custom extension that:
- Implements an appropriate interface (likely a custom one you define).
- Receives authentication information (from the authenticator) and the incoming data.
- Makes authorization decisions (allow/deny) based on your policies.
- Integrates with the collector's pipeline (potentially as a processor).
- Testing: Send requests with valid, invalid, and expired credentials. Verify that only authenticated and authorized requests are processed.
- Receiver Configuration: Within your
-
Threats Mitigated:
- Data Injection - High Severity: Prevents unauthorized data submission.
- Data Tampering - High Severity: Ensures data integrity.
- Unauthorized Access - High Severity: Prevents unauthorized connections.
-
Impact:
- Data Injection: Significantly reduces risk.
- Data Tampering: Significantly reduces risk.
- Unauthorized Access: Significantly reduces risk.
-
Currently Implemented (Example):
- No authentication is configured on any receivers.
-
Missing Implementation (Example):
- Critical Gap: No authentication mechanism is implemented.
- No custom authenticator or authorizer extensions are developed.
Mitigation Strategy: Data Masking/Redaction (Processor Level - Collector Config & Extensions)
-
Description:
- Identify Sensitive Data: Analyze your telemetry data to identify sensitive fields.
- Processor Configuration: Within your
config.yaml
, configure processors in the pipeline:attributes
Processor: Use this to modify or remove attributes:insert
,update
,upsert
: Use these actions with regular expressions or other logic to replace sensitive data with masked values (e.g.,***
).delete
: Remove entire attributes containing sensitive data.
resource
Processor: Similar toattributes
, but for resource attributes.filter
Processor: Use this to drop entire spans, metrics, or logs based on the presence of sensitive data (less precise).
- Custom Processor (Recommended for Complex Logic): Develop a custom processor that:
- Implements the appropriate processor interface (e.g.,
component.TracesProcessor
,component.MetricsProcessor
,component.LogsProcessor
). - Contains your specific redaction logic (regular expressions, hashing, encryption, custom rules).
- Is referenced in the
pipelines
section of yourconfig.yaml
.
- Implements the appropriate processor interface (e.g.,
- Testing: Send test data containing sensitive information. Verify that the processors correctly mask or remove the sensitive data before it is exported.
-
Threats Mitigated:
- Data Leakage - High Severity: Prevents sensitive data exposure.
- Compliance Violations - High Severity: Helps meet compliance requirements.
-
Impact:
- Data Leakage: Significantly reduces risk.
- Compliance Violations: Significantly reduces risk.
-
Currently Implemented (Example):
- No data masking/redaction is implemented.
-
Missing Implementation (Example):
- Critical Gap: No data masking/redaction is in place.
- No custom processors for redaction are developed.
Mitigation Strategy: Secure Communication (Exporter Level - Collector Config)
-
Description:
- Exporter Configuration: Within your
config.yaml
, locate the configuration for each active exporter. - TLS:
- For each exporter, configure TLS encryption:
- Specify the path to the CA certificate (or the server certificate) used to verify the backend's identity (
ca_file
or equivalent). - Enable TLS (e.g.,
tls: { enabled: true }
or equivalent). The exact configuration depends on the exporter.
- Specify the path to the CA certificate (or the server certificate) used to verify the backend's identity (
- For each exporter, configure TLS encryption:
- mTLS (If Supported):
- If the backend and exporter support mTLS, configure it:
- Specify the path to the collector's client certificate and key (
cert_file
,key_file
). - Enable client authentication on the backend (if you control it).
- Specify the path to the collector's client certificate and key (
- If the backend and exporter support mTLS, configure it:
- Testing: Use network analysis tools (e.g.,
tcpdump
, Wireshark) to verify that communication between the collector and backends is encrypted.
- Exporter Configuration: Within your
-
Threats Mitigated:
- Man-in-the-Middle (MitM) Attacks - High Severity: Prevents data interception.
- Data Tampering (in transit) - High Severity: Ensures data integrity.
-
Impact:
- MitM Attacks: Significantly reduces risk.
- Data Tampering (in transit): Significantly reduces risk.
-
Currently Implemented (Example):
- TLS is enabled for the
otlp
exporter. - No mTLS is configured.
- TLS is enabled for the
-
Missing Implementation (Example):
- mTLS is not used, even where supported.
Mitigation Strategy: Configuration Hardening (Collector Config)
-
Description:
- Least Privilege: In your
config.yaml
, disable any receivers, processors, exporters, and extensions that are not absolutely required. - Configuration Review: Regularly review the entire
config.yaml
for any unnecessary or insecure settings. - Disable Debugging in Production: Ensure that debugging features (e.g.,
service::telemetry::logs::level: debug
) are disabled in production. Set the log level toinfo
orwarn
. - Secure Configuration Storage: Do not store sensitive information (API keys, credentials) directly in
config.yaml
. Use environment variables or a secrets management system, and reference them in the configuration. - Testing: After making configuration changes, thoroughly test the collector in a non-production environment.
- Least Privilege: In your
-
Threats Mitigated:
- Configuration Errors - Medium Severity: Reduces the risk of misconfigurations.
- Information Disclosure - Medium Severity: Prevents sensitive data leaks.
-
Impact:
- Configuration Errors: Reduces risk.
- Information Disclosure: Reduces risk.
-
Currently Implemented (Example):
- Some unused receivers are disabled.
- Debugging is enabled in production.
- API keys are stored directly in
config.yaml
.
-
Missing Implementation (Example):
- A comprehensive configuration review is needed.
- Debugging needs to be disabled in production.
- Critical: Sensitive information needs to be removed from
config.yaml
.
Mitigation Strategy: Extension Security (Collector Extensions)
-
Description:
- Inventory: List all custom or third-party extensions used by your collector.
- Source Verification:
- Prefer extensions from the official OpenTelemetry project or reputable vendors.
- For community extensions, carefully review the source code for potential security issues (input validation, error handling, secure coding practices).
- Least Privilege (Within Extension Code): If you are developing custom extensions, ensure they only access the necessary resources and data. Avoid granting broad permissions.
- Regular Updates: Keep extensions up-to-date. Monitor for security advisories.
- Testing (For Custom Extensions): Thoroughly test custom extensions, focusing on security aspects:
- Input validation: Test with invalid and malicious inputs.
- Error handling: Ensure errors are handled gracefully and do not expose sensitive information.
- Resource usage: Monitor resource consumption to prevent DoS vulnerabilities.
-
Threats Mitigated:
- Vulnerabilities in Extensions - Medium to High Severity: Reduces the risk of exploiting vulnerabilities in extensions.
- Malicious Extensions - High Severity: Helps prevent the use of malicious code.
-
Impact:
- Vulnerabilities in Extensions: Reduces risk.
- Malicious Extensions: Reduces risk.
-
Currently Implemented (Example):
- Only official OpenTelemetry extensions are used.
- No formal code review process for extensions is in place.
-
Missing Implementation (Example):
- A documented process for managing and vetting extensions is needed.
- Code review of custom extensions (if any) is essential.
Mitigation Strategy: Observability of the Collector (Collector Config)
-
Description:
- Metrics: In your
config.yaml
, ensure the collector is configured to expose its internal metrics. The most common way is to use theprometheus
exporter:exporters: prometheus: endpoint: "0.0.0.0:8889" # Or a specific interface/port # ... other prometheus exporter settings ... service: pipelines: metrics: receivers: [ ... ] processors: [ ... ] exporters: [prometheus, ... ] # Include prometheus in your metrics pipeline
- Logging: Configure the collector's logging within the
service::telemetry::logs
section ofconfig.yaml
:service: telemetry: logs: level: info # Or warn, error - avoid debug in production # ... other logging settings ...
- Testing: Verify that metrics are being exposed correctly (e.g., by querying the Prometheus endpoint) and that logs are being generated at the configured level.
- Metrics: In your
-
Threats Mitigated:
- Undetected Issues - Medium Severity: Allows for early detection of problems.
- Delayed Response to Incidents - Medium Severity: Facilitates faster response.
-
Impact:
- Undetected Issues: Significantly reduces risk.
- Delayed Response to Incidents: Significantly reduces risk.
-
Currently Implemented (Example):
- Metrics are exposed via the
prometheus
exporter. - Logging is enabled, but the log level is set to
debug
in production.
- Metrics are exposed via the
-
Missing Implementation (Example):
- The log level should be changed to
info
orwarn
in production.
- The log level should be changed to