Repository navigation
feat(api): add ENABLE_INGESTION_API_KEY to honor INGESTION_API_KEY on the app image #3633
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
Merged
kodiakhq
merged 3 commits into
ClickHouse:main
from
andrewdunndev:ai/app-image-ingestion-key
Nov 21, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,10 @@ | ||
| --- | ||
| '@hyperdx/api': patch | ||
| --- | ||
|
|
||
| feat: add `ENABLE_INGESTION_API_KEY` to honor `INGESTION_API_KEY` on the app image | ||
|
|
||
| The app image ignores `INGESTION_API_KEY`, so an external collector has to use | ||
| the team's generated key, which changes whenever the team is recreated. Set | ||
| `ENABLE_INGESTION_API_KEY=true` on the API to accept a preset key alongside the | ||
| team key. Behavior is unchanged when unset. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
🟡 P2 — With ENABLE_INGESTION_API_KEY on and no team yet, the app image opens an OTLP receiver with no auth
buildOtelCollectorConfiggetsteamsfromgetAllTeams(line 604). When that list is empty (fresh install, or a rebuilt DB before anyone registers, which is the case this PR targets),apiKeysends up as[INGESTION_API_KEY]. That passes theapiKeys.length > 0check at line 348, sootlp/hyperdxgets wired into every pipeline. ButcollectorAuthenticationEnforcedcomes fromteams[0]?.collectorAuthenticationEnforced, which isundefinedhere, so the bearertokenauth block at line 379 is skipped and the receiver accepts anything. Onmainthe same state leavesapiKeysempty on the app image, so no receiver opens..github/workflows/release.yml:1117-1142relies on the collector never opening a keyless receiver. Fix: when the preset key is what makesapiKeysnon-empty, enforce auth with it, for examplecollectorAuthenticationEnforced = teams[0]?.collectorAuthenticationEnforced ?? (teams.length === 0 && pushedPresetKey). Add a test that callsbuildOtelCollectorConfig([])with the flag set and asserts either thatotlp/hyperdxhasauthor that it is not attached.Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
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.
#3633 merged before the fix reached its branch, so the fix is in #3760. With no team, an opted-in
INGESTION_API_KEYnow turns authentication on. A new test covers the no-team case.