Skip to content

feat(custom-audience): remove legacy inline authentication - #2855

Merged
achettyiitr merged 14 commits into
mainfrom
harness/INT-7371-feat-custom-audience-remove-leg-1a5e6aa0
Oct 23, 2026
Merged

achettyiitr merged 14 commits into
mainfrom
harness/INT-7371-feat-custom-audience-remove-leg-1a5e6aa0

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Remove Custom Activation's legacy destination-level authenticationType declaration and its per-method schema branches after the account migration.

Custom Activation follows the mirrored account-field pattern used by FB Custom Audience: Basic Auth, Bearer Token, and API-key fields remain declared in destConfig.defaultConfig/secretKeys so config-backend can copy linked-account values, while those fields are not exposed in the destination schema. The transformer continues to read credentials from deliveryAccount, which the masked preview also relies on.

What is the related Linear task?

Resolves INT-7371.

Behavior

  • Remove authenticationType from Custom Activation destination metadata and schema.
  • Remove the legacy Basic/Bearer/API-key conditional schema branches.
  • Keep authenticationEnabled: true requiring rudderAccountId.
  • Keep the root schema open so persisted stale inline keys do not block unrelated destination edits.
  • Keep the account definitions, shared account validator, and mirrored credential metadata unchanged.

Production gate — do not merge

Do not merge until production confirms that no CUSTOM_AUDIENCE destination in any region has authenticationType, and that the account-linked destinations' next scheduled syncs complete without 401/403 responses.

After the gate passes, preserve this merge order: this PR → rudder-transformer#5712 → rudder-webapp#10301.

Validation

  • python3 scripts/validate_account_definitions.py custom_audience
  • python3 scripts/validate_account_definitions.py fb_custom_audience
  • Destination definition validation tests
  • Validator tests
  • Prettier and git diff --check

Known issue

npm run check:schema:destination custom_audience still hits the pre-existing audienceDeliveryApiBuilder schema-generator incompatibility (KeyError: 'configKey'); this PR does not change that generator path.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 13:55
@coderabbitai

coderabbitai Bot commented Oct 20, 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1f614274-e0c0-4690-b5d5-0afc76200b1f

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.

@rudder-devbox

rudder-devbox Bot commented Oct 20, 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.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c4b7d58) to head (c45fdc3).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2855   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          133       133           
  Branches        26        26           
=========================================
  Hits           133       133           

☔ 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Production compatibility requires human confirmation that migration removed all retired keys, including inactive remnants.

1 open issue
What changed in this PR

Removes Custom Activation’s legacy inline authentication in favor of linked reusable accounts.

Changes:

  • Removes destination-level credentials and rejects retired authentication keys.
  • Adds an explicit account-owned credential delivery contract.
  • Updates validation coverage, CI, and documentation.
File Description
test/​test_validate_account_definitions.py Tests account delivery and legacy mirroring.
test/​data/​validation/​destinations/​custom_audience.json Updates authentication validation fixtures.
src/​schemas/​account/​account-db-config-schema.json Defines the credential delivery marker.
src/​configurations/​destinations/​custom_audience/​schema.json Replaces inline authentication validation with retired-key rejection.
src/​configurations/​destinations/​custom_audience/​db-config.json Removes root credential declarations.
src/​configurations/​destinations/​custom_audience/​accounts/​custom_audience_bearer_token/​db-config.json Marks Bearer credentials as account-delivered.
src/​configurations/​destinations/​custom_audience/​accounts/​custom_audience_basic_auth/​db-config.json Marks Basic credentials as account-delivered.
src/​configurations/​destinations/​custom_audience/​accounts/​custom_audience_api_key/​db-config.json Marks API-key credentials as account-delivered.
scripts/​validate_account_definitions.py Exempts explicitly account-delivered credentials from mirroring.
CONVENTIONS.md Documents the delivery contract.
.github/​workflows/​test.yml Runs account-validator unit tests.
.agents/​knowledge/​patterns.md Documents targeted retired-key rejection.
.agents/​knowledge/​architecture.md Documents account-owned authentication.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 14:00
@rudder-devbox

rudder-devbox Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

The CI failure was caused by the new Python test invocation, not the Custom Activation assertions: the log shows all 9,020 JavaScript tests passed, then Python 3.12 failed with ModuleNotFoundError: No module named 'test.test_validate_account_definitions'. python3 -m unittest test/test_validate_account_definitions.py treated the repository's test/ directory as a module name and collided with Python's standard-library test package.

I changed the workflow to execute the test file directly with python3 test/test_validate_account_definitions.py. All four tests pass, Custom Activation account validation passes, and the workflow remains Prettier-clean.

Pushed commit: ab379c6

@rudder-devbox

rudder-devbox Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Recorded knowledge from this round:

  • mistakes: Captured the Python 3.12 CI module-resolution failure and safe unittest invocation patterns for mistakes.md.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human confirmation is needed that production cleanup removed all newly forbidden keys, including inactive credentials and unauthenticated legacy settings.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human review must confirm that persisted configurations contain none of the newly forbidden keys before rollout.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 05:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Removing the legacy authentication contract requires human confirmation of the INT-7371 production migration gates and coordinated transformer/webapp merge order.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 05:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The intentional authentication-contract break requires human confirmation of the INT-7371 production migration gates and coordinated transformer/webapp rollout.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 05:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Removing the legacy credential contract requires human confirmation of the INT-7371 production migration gates and coordinated transformer/webapp rollout.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The destination-name bypass needs a general, validated account-delivery contract before the shared coverage checks are disabled.

1 open issue

Review effort: Balanced

Comment thread scripts/validate_account_definitions.py Resolved
Copilot AI balanced review requested due to automatic review settings October 23, 2026 06:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Safe removal depends on production migration gates and coordinated transformer and webapp rollout that are not verified here.

1 open issue

Review effort: Balanced

@achettyiitr
achettyiitr marked this pull request as ready for review October 23, 2026 08:35
@achettyiitr
achettyiitr requested a review from a team as a code owner October 23, 2026 08:35
Copilot AI balanced review requested due to automatic review settings October 23, 2026 08:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The remaining INT-7371 production gates and coordinated transformer/webapp rollout require human confirmation before merging.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The authentication contract removal requires human confirmation of the outstanding production gates and coordinated transformer/webapp rollout.

1 open issue

Review effort: Balanced

Comment thread .agents/knowledge/mistakes.md Resolved
…-custom-audience-remove-leg-1a5e6aa0

# Conflicts:
#	.agents/knowledge/feedback.md
Copilot AI balanced review requested due to automatic review settings October 23, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human confirmation is required that the INT-7371 production gates have passed and the config → transformer → webapp merge order is safe.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

achettyiitr added a commit to rudderlabs/rudder-transformer that referenced this pull request Oct 23, 2026
## Summary

- Remove destination-level `authenticationType` and inline credential
resolution from Custom Activation.
- Keep explicit-toggle and linked delivery-account authentication
behavior.
- Move component fixtures to account-backed authentication and retain
stale-inline-key regression coverage.
- Extend secret-path derivation to mask reusable delivery-account
secrets now that Custom Activation no longer declares root secret keys.

## Validation

- `npm test -- --testPathPattern="custom_audience" --no-coverage
--runInBand` - 171 tests passed.
- `npm run test:ts -- component --destination=custom_audience` - 13
tests passed.
- Secret-path tooling unit suite - 28 tests passed.
- Full secret-path generation - passed; 193 destinations generated and
Custom Activation masks `headers.Authorization` and
`headers.X-Account-Key`.
- `npm run lint` - passed.

Resolves INT-7371.

Do not merge until the remaining INT-7371 gate checks pass. Merge after
[rudderlabs/rudder-integrations-config#2855](rudderlabs/rudder-integrations-config#2855).

Co-authored-by: tech-infra-rudderstack <[email protected]>
Co-authored-by: Akash Chetty <[email protected]>
@achettyiitr
achettyiitr merged commit a11685b into main Oct 23, 2026
19 checks passed
@achettyiitr
achettyiitr deleted the harness/INT-7371-feat-custom-audience-remove-leg-1a5e6aa0 branch October 23, 2026 10:50
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.

3 participants