You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(datadog): validate API keys at runtime to track forwarder health (#1841)
## Summary
<!-- Please provide a brief summary about what this PR does.
This should help the reviewers give feedback faster and with higher quality. -->
ADP now supports runtime API key refresh through a configurable `u64` key (which defaults to `60 minutes`).
Things to note:
- Additional endpoints added during runtime will not be accounted for since it would involve dynamically altering the topology by creating a new forwarder and related components to support the new endpoint. This _also_ mimics Core Agent behavior.
- Non-zero integer values fall back to the default (`60`)
- Fake API key is not treated as invalid
- Forwarders' health now dictated by whether at least **one** API-key is valid.
- `200` is the valid status code
- `403` is invalid
- ADP will treat unexpected status codes as errors and not invalid keys.
- Integration tests will now use the fake API key (32-char string of all 0s)
## Change Type
- [ ] Bug fix
- [x] New feature
- [ ] Non-functional (chore, refactoring, docs)
- [ ] Performance
## How did you test this PR?
<!-- Please how you tested these changes here -->
Unit tests
## References
<!-- Please list any issues closed by this PR. -->
<!--
- Closes: <issue link>
-->
- Closes#1357
<!-- Any other issues or PRs relevant to this PR? Feel free to list them here. -->
Co-authored-by: lucas.tembras <lucas.tembras@datadoghq.com>
Copy file name to clipboardExpand all lines: lib/datadog-agent/config/schema/schema_overlay.yaml
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1143,13 +1143,27 @@ inventory:
1143
1143
config_registry_filename: encoders.rs
1144
1144
1145
1145
forwarder_apikey_validation_interval:
1146
-
support: none
1147
-
severity: medium
1148
-
planned: true
1146
+
support: partial
1149
1147
pipelines: [cross_cutting]
1150
1148
description: "API key check interval (minutes)"
1151
-
documentation: "Core agent supports runtime API key refresh without restart. ADP has partial infrastructure (config-side listeners) but the forwarder does not act on updates."
1149
+
documentation: |
1150
+
ADP supports `forwarder_apikey_validation_interval` for Datadog intake forwarding. The value is in minutes,
1151
+
defaults to `60`, and falls back to that default for non-positive values.
1152
+
1153
+
ADP validates configured API keys when the forwarder starts, periodically at the configured interval, and
1154
+
after API-key-related runtime config updates. Validation controls readiness only: confirmed invalid keys can
1155
+
make the forwarder not ready, but the forwarder keeps running and transient validation failures do not prove
1156
+
that keys are invalid.
1157
+
1158
+
Support is partial because ADP only tracks `additional_endpoints` domains present at forwarder startup.
1159
+
Runtime updates can rotate keys for those domains, but brand-new domains are not added or validated until
0 commit comments