Skip to content

Commit 2481099

Browse files
committed
Proposal to standardize integrations
1 parent ffbdd85 commit 2481099

File tree

26 files changed

+1139
-215
lines changed

26 files changed

+1139
-215
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ brotli = "8.0"
2121
bytes = "1.10"
2222
chacha20poly1305 = "0.10"
2323
chrono = "0.4.42"
24+
async-trait = "0.1"
2425
config = "0.15.18"
2526
cookie = "0.18.1"
2627
derive_more = { version = "2.0", features = ["display", "error"] }

FAQ_POC.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ NOT all the capabilities. Tech Lab will build and support core services to enabl
2525
**Does the Trusteed Server preclude using third party tags?**
2626
No, it does not. You should be able to begin migrating certain modules and parts of your content and experience as you go, without a forklift upgrade. We plan to support server side tagging capabilities to enable third party support.
2727

28-
**Why are you only using two vendors in the POC?**
28+
**Why are you only using two partners in the POC?**
2929
Fastly and Equativ volunteered time and resources to us and they fit the technical needs and requirements for Trusted Server. For the sake of getting to market ASAP, we chose to double down on these two partners. We do not play favorites or have any financial incentive with these two companies and will begin implementing on other partners in the near future. Any ad exchange supporting prebid server requests should already find support. We will prioritize modules for other edge cloud providers based on industry priorities
3030

3131
**How will this project be managed?**
@@ -39,4 +39,3 @@ Yes. As long as your managed service provider can separate the edge from the CMS
3939

4040
**How will this comply with Privacy regulations?**
4141
The trusted server will have modules to support Consent Management Providers (CMP) and send the GPP or TCF string as required in the ad request.
42-

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ At this time, Trusted Server is designed to work with Fastly Compute. Follow the
2121
- Click Compute and Create Service
2222
- Click “Create Empty Service” (below main options)
2323
- Add your domain of the website you’ll be testing or using and click update
24-
- Click on “Origins” section and add your ad-server / ssp partner information as hostnames (note after you save this information you can select port numbers and TLS on/off)
25-
- IMPORTANT: when you enter the FQDN or IP ADDR information and click Add you need to enter a “Name” in the first field that will be referenced in your code so something like “my_ad_partner_1
24+
- Click on “Origins” section and add your ad-server / SSP integration information as hostnames (note after you save this information you can select port numbers and TLS on/off)
25+
- IMPORTANT: when you enter the FQDN or IP ADDR information and click Add you need to enter a “Name” in the first field that will be referenced in your code so something like “my_ad_integration_1
2626
-
2727

2828
:warning: With a dev account, Fastly gives you a test domain by default, but you’re also able to create a CNAME to your own domain when you’re ready, along with 2 free TLS certs (non-wildcard). Note that Fastly Compute ONLY accepts client traffic via TLS, though origins and backends can be non-TLS.
@@ -226,4 +226,8 @@ Once configured, the following endpoints are available:
226226
Notes
227227
- Rewriting uses `lol_html`. Only absolute and protocol‑relative URLs are rewritten; relative URLs are left unchanged.
228228
- For the proxy endpoint, the base URL is carried in `tsurl`, the original query parameters are preserved individually, and `tstoken` authenticates the reconstructed full URL.
229-
- Synthetic identifiers are generated by `crates/common/src/synthetic.rs` and are surfaced in three places: publisher responses (headers + cookie), creative proxy target URLs (`synthetic_id` query param), and click redirect URLs. This ensures downstream partners can correlate impressions and clicks without direct third-party cookies.
229+
- Synthetic identifiers are generated by `crates/common/src/synthetic.rs` and are surfaced in three places: publisher responses (headers + cookie), creative proxy target URLs (`synthetic_id` query param), and click redirect URLs. This ensures downstream integrations can correlate impressions and clicks without direct third-party cookies.
230+
231+
## Integration Modules
232+
233+
- See [`docs/integration_guide.md`](docs/integration_guide.md) for the full integration module guide, covering configuration, proxy routing, HTML shim hooks, and the `starlight` example implementation.

crates/common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ brotli = { workspace = true }
1414
bytes = { workspace = true }
1515
chacha20poly1305 = { workspace = true }
1616
chrono = { workspace = true }
17+
async-trait = { workspace = true }
1718
config = { workspace = true }
1819
cookie = { workspace = true }
1920
derive_more = { workspace = true }

crates/common/src/error.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ pub enum TrustedServerError {
5050
#[display("Prebid error: {message}")]
5151
Prebid { message: String },
5252

53+
/// Integration module error.
54+
#[display("Integration error ({integration}): {message}")]
55+
Integration {
56+
integration: String,
57+
message: String,
58+
},
59+
5360
/// Proxy error.
5461
#[display("Proxy error: {message}")]
5562
Proxy { message: String },
@@ -91,6 +98,7 @@ impl IntoHttpResponse for TrustedServerError {
9198
Self::InvalidUtf8 { .. } => StatusCode::BAD_REQUEST,
9299
Self::KvStore { .. } => StatusCode::SERVICE_UNAVAILABLE,
93100
Self::Prebid { .. } => StatusCode::BAD_GATEWAY,
101+
Self::Integration { .. } => StatusCode::BAD_GATEWAY,
94102
Self::Proxy { .. } => StatusCode::BAD_GATEWAY,
95103
Self::SyntheticId { .. } => StatusCode::INTERNAL_SERVER_ERROR,
96104
Self::Template { .. } => StatusCode::INTERNAL_SERVER_ERROR,

0 commit comments

Comments
 (0)