Skip to content

feat(custom_audience): support delivery account authentication - #5671

Merged
achettyiitr merged 15 commits into
developfrom
harness/INT-7365-feat-custom-audience-support-de-e927fab0
Oct 19, 2026
Merged

achettyiitr merged 15 commits into
developfrom
harness/INT-7365-feat-custom-audience-support-de-e927fab0

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Adds toggle-first authentication resolution for Custom Activation using linked delivery-account credentials. Supports Basic, Bearer, and API-key account definitions, preserves legacy inline authentication for unmigrated destinations, and returns actionable configuration errors for invalid linked accounts.

What is the related Linear task?

Resolves INT-7365

Please explain the objectives of your changes below

Allow migrated Custom Activation destinations to source credentials from their linked delivery account without breaking existing destinations that still use inline credentials. Authentication can also be explicitly disabled regardless of stored account or inline data.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

When authenticationEnabled is true, a valid linked account is now mandatory and inline credentials are not used as fallback. When false, all authentication is suppressed. If the toggle is absent, existing inline authentication remains supported unless a linked account ID is present.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A — authentication parsing and validation are destination-local.

Any technical or performance related pointers to consider with the change?

Authentication headers are resolved lazily once per integration instance. This preserves controlled per-event error handling while avoiding repeated credential parsing for a batch.


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

⚠️ Auto-review unresolved

Adversarial self-review surfaced findings that were not auto-fixed. Each carries its disposition — please evaluate before merging.

  • medium: Secret-path coverage hard-codes the generated artifact instead of exercising derivation — src/secretPaths/tooling/generate.test.ts:232 — not auto-fixed (iteration budget exhausted)
  • low: Component fixture file adds unused cast-only aliases and a redundant destination intersection type — test/integrations/destinations/custom_audience/common.ts:15 — not auto-fixed (iteration budget exhausted)

@rudder-devbox

rudder-devbox Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from a Linear ticket.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1aadc5e4-663b-4f4e-b9f0-930a5ef57949

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.13%. Comparing base (9124525) to head (bbdbff5).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5671   +/-   ##
========================================
  Coverage    92.12%   92.13%           
========================================
  Files          713      713           
  Lines        39591    39641   +50     
  Branches      9276     9290   +14     
========================================
+ Hits         36474    36524   +50     
- Misses        2852     2932   +80     
+ Partials       265      185   -80     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rudder-devbox

rudder-devbox Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

The generated-secret-path check failed because the log reported CUSTOM_AUDIENCE: committed ["headers"] -> derives ["headers.Authorization"], followed by src/secretPaths/secretPaths.json is out of date. The broad headers mask had been hand-authored, but the generator did not know that account-managed credentials come from destination.deliveryAccount.secret or that API-key header names come from deliveryAccount.options.

I updated the generator to derive delivery-account secret movements and dynamic account header names, replaced the artifact-only assertion with source-level coverage, and documented the new credential source. The final full npm run check:secret-paths run derives CUSTOM_AUDIENCE as headers, matches the committed manifest across all 189 destinations, and passes. Focused generator tests (28), ESLint, Prettier, and npm run build:test also pass.

Pushed commit: 97653b5

@rudder-devbox

rudder-devbox Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@achettyiitr
achettyiitr marked this pull request as ready for review October 15, 2026 07:35
@achettyiitr
achettyiitr requested review from a team as code owners October 15, 2026 07:35
@sonarqubecloud

Copy link
Copy Markdown

@achettyiitr
achettyiitr merged commit 469166a into develop Oct 19, 2026
49 checks passed
@achettyiitr
achettyiitr deleted the harness/INT-7365-feat-custom-audience-support-de-e927fab0 branch October 19, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants