Skip to content

Add generic per-bidder static param overrides for PBS#618

Open
prk-Jr wants to merge 5 commits intomainfrom
feature/generic-prebid-bidder-param-overrides
Open

Add generic per-bidder static param overrides for PBS#618
prk-Jr wants to merge 5 commits intomainfrom
feature/generic-prebid-bidder-param-overrides

Conversation

@prk-Jr
Copy link
Copy Markdown
Collaborator

@prk-Jr prk-Jr commented Apr 6, 2026

Summary

  • Adds bid_param_overrides to PrebidIntegrationConfig — a HashMap<String, Json> that lets operators enforce static per-bidder parameters on every outgoing Prebid Server request, regardless of zone context.
  • These overrides are applied before the existing zone-specific bid_param_zone_overrides, giving operators a reliable way to inject server-side bidder IDs that client-side Prebid config cannot override.
  • Refactors the duplicated inline merge logic (previously copy-pasted in the zone-override path) into a shared merge_bidder_param_object helper.

Changes

File Change
crates/trusted-server-core/src/integrations/prebid.rs New bid_param_overrides field on PrebidIntegrationConfig; merge_bidder_param_object helper; apply static overrides before zone overrides in OpenRTB construction; tests
crates/trusted-server-core/src/settings.rs Env var override test for TRUSTED_SERVER__INTEGRATIONS__PREBID__BID_PARAM_OVERRIDES
trusted-server.toml Commented example for the new field
.env.example Example env var usage

Closes

Closes #617

Related: #339, #383, #384

Test plan

  • cargo test --workspace
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • JS tests: cd crates/js/lib && npx vitest run
  • JS format: cd crates/js/lib && npm run format
  • Docs format: cd docs && npm run format

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses tracing macros (not println!)
  • New code has tests
  • No secrets or credentials committed

@prk-Jr prk-Jr self-assigned this Apr 6, 2026
Renames the new field to match the existing `bid_param_zone_overrides`
naming convention. Updates all references: struct field, env var key,
doc comments, TOML example, tests, and .env.example.

Also replaces production IDs in test fixtures and examples with
generic placeholder values.
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.

Add generic per-bidder static param overrides for PBS

1 participant