Repository navigation
feat(http): gate v2 auth on authenticationEnabled - #5769
shekhar-rudder merged 9 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
👋 I'm rudder-devbox. I opened this PR from task Mention |
|
Sandbox became unreachable (its file API was unavailable too long). |
2 similar comments
|
Sandbox became unreachable (its file API was unavailable too long). |
|
Sandbox became unreachable (its file API was unavailable too long). |
- Revert the HTTP-specific secret-path generator branch: the manifest already masks all of HTTP `headers`, and the check derives the same manifest without it. - Resolve auth headers inline instead of caching them per instance. - Drop router cases that duplicate the unit tests for each account type; the v2 bearer case now reuses the existing masked secret. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
CI failed during Validation: |
|
Knowledge distillation completed |
|
The Code Coverage run used commit I already pushed the source fix in the newer commit below. On that commit, |
|
Both Docker image builds used the older commit On the newer commit, the exact Docker compile step, |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5769 +/- ##
===========================================
- Coverage 92.45% 92.45% -0.01%
===========================================
Files 741 741
Lines 41174 41172 -2
Branches 9610 9610
===========================================
- Hits 38068 38065 -3
- Misses 2923 2924 +1
Partials 183 183 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This run checked older commit |
|
Both amd64 image builds used older commit |
|
This coverage run checked older commit I already pushed the source fix. |
|
The run checked older commit |
|
This run checked older commit I already pushed the source fix, and |
|
Both image builds checked older commit |
|
This run checked older commit |
|
This coverage run checked older commit I already pushed the source fix, and |
|
The live test This branch has no Everflow changes. The expected-valid transaction ID comes from the external live-test secret, and Everflow supplied no rejection detail. I could not correct that partner/test-account state from this workspace without a valid transaction ID or the Everflow conversion report. No source change was made, and I did not weaken the test. |
Config-backend inlines non-OAuth linked-account fields into the destination config, so v2 needs no deliveryAccount handling. Only the removed `auth` selector needs replacing: gate on authenticationEnabled and pick the header from the account type's required field. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Validation now checks username, then bearerToken, then apiKeyName, matching makeAuthHeaders, so a config that sends Basic auth is no longer rejected for a missing API key value. Drops the dead auth field from the v2 controller fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
The live test The expected-valid transaction ID is supplied by the external live-test secret. I cannot determine or repair Everflow's rejection from this workspace without its conversion report or a valid test transaction. I made no source change and did not weaken the assertion. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the HTTP v2 authentication configuration update.
No open issues 🎉
What changed in this PR
Updates HTTP v2 authentication to use authenticationEnabled instead of the removed auth selector, matching the new destination configuration. Credentials remain sourced from Config; HTTP v1 behavior is unchanged.
Changes:
- Gate generated authentication headers on
authenticationEnabledand infer the authentication type from available credentials. - Require credentials when authentication is enabled and an API key value when API key authentication is selected.
- Update fixtures and tests for authentication validation, credential precedence, and disabled authentication.
| File | Description |
|---|---|
test/integrations/destinations/http/common.ts |
Migrates the v2 fixture to authenticationEnabled. |
src/v0/destinations/http/utils.ts |
Gates authentication headers and selects their type from credentials. |
src/v0/destinations/http/types.ts |
Replaces the selector and updates credential validation. |
src/v0/destinations/http/routerTransform.test.ts |
Tests the new authentication configuration and behavior. |
src/controllers/__tests__/destination.test.ts |
Removes the obsolete v2 noAuth setting. |
Review effort: Balanced
# Conflicts: # src/v0/destinations/http/routerTransform.test.ts
|
The live test The expected-valid transaction ID comes from the external live-test secret. A valid test transaction or Everflow conversion report is needed to identify and correct the partner-side rejection. I made no source change and did not weaken the assertion. |
|
|
The user-transformer image build failed before source compilation. Its |



What are the changes introduced in this PR?
HTTP v2 replaces the inline
authselector withauthenticationEnabled(rudder-integrations-config#2891). Config-backend inlines a linked non-OAuth account's fields (username/password,bearerToken,apiKeyName/apiKeyValue) into the destination config, so the transformer keeps reading credentials fromConfig. Only the selector changes: auth headers are built whenauthenticationEnabledis true, and the header type is picked from the account type's required field.What is the related Linear task?
Resolves INT-7519
Please explain the objectives of your changes below
Without this,
makeAuthHeadersswitches onConfig.auth, which v2 configs no longer carry, so every v2 destination with authentication enabled would send no auth header.Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
HTTP v2 only:
authis replaced byauthenticationEnabled. Validation requiresapiKeyValuewithapiKeyName, and at least one credential when authentication is enabled. HTTP v1 is unchanged.Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
The secret-path manifest is unchanged (HTTP already masks all
headers).Validation
npx tsc --noEmit -p tsconfig.test.json, eslint on changed files: pass.npm run test:ts -- component --destination=http: 18 passed.npm run check:secret-pathsagainst integrations-configmain: manifest matches.Developer checklist
Reviewer checklist
🔭 Live preview
Resumable while this task is open.