Skip to content

Commit 81b9336

Browse files
committed
Merge branch 'main' into 3-24-features
2 parents bc53de1 + 0a6050c commit 81b9336

File tree

15 files changed

+331
-55
lines changed

15 files changed

+331
-55
lines changed

.github/workflows/format.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Run Format"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
# Check formatting with rustfmt
10+
jobs:
11+
format:
12+
name: cargo fmt
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Cache cargo dependencies
18+
uses: actions/cache@v4
19+
with:
20+
path: |
21+
~/.cargo/bin/
22+
~/.cargo/registry/index/
23+
~/.cargo/registry/cache/
24+
~/.cargo/git/db/
25+
target/
26+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
27+
28+
- name: Set up rust toolchain
29+
uses: actions-rust-lang/setup-rust-toolchain@v1
30+
with:
31+
components: "clippy, rustfmt"
32+
toolchain: 1.83
33+
34+
- name: Add wasm32-wasi target
35+
run: rustup target add wasm32-wasip1
36+
37+
- name: Run cargo fmt
38+
uses: actions-rust-lang/rustfmt@v1
39+
40+
- name: Run cargo clipply
41+
run: cargo clippy --all-targets --all-features
42+

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Run Tests"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: cargo test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Cache Cargo dependencies
17+
uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.cargo/bin/
21+
~/.cargo/registry/index/
22+
~/.cargo/registry/cache/
23+
~/.cargo/git/db/
24+
target/
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
26+
27+
- name: Set up Rust tool chain
28+
uses: actions-rust-lang/setup-rust-toolchain@v1
29+
with:
30+
toolchain: 1.83
31+
32+
- name: Add wasm32-wasi target
33+
run: rustup target add wasm32-wasip1
34+
35+
- name: Setup Viceroy
36+
run: cargo install viceroy
37+
38+
- name: Run tests
39+
run: cargo test

Cargo.lock

Lines changed: 110 additions & 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2021"
77
# Otherwise, `publish = false` prevents an accidental `cargo publish` from revealing private source.
88
publish = false
99
license = "Apache-2.0"
10-
license-file = "LICENSE"
1110

1211
[profile.release]
1312
debug = 1
@@ -26,4 +25,5 @@ futures = "0.3"
2625
tokio = { version = "1.0", features = ["sync", "macros", "io-util", "rt", "time"] }
2726
url = "2.4.1"
2827
config = "0.15.11"
28+
handlebars = "6.3.2"
2929
chrono = "0.4"

FAQ_POC.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
**What is Trusted Server POC?**
2+
The POC or proof of concept is to prove the technical feasibility of managing advertising for publishers on the server. It uses the edge cloud like Fastly, Akamai etc. to initiate ad requests, integrate prebid server, receive ad response and stitch the ad on the server before sending the page to the client browser. In addition it showcases the capabilities to maintain a key-value (kv) store to use critical data needed by a publisher for advertising and the capability to uniquely identify a user agent using a persistent id
3+
4+
**Is this ready for use by publishers?**
5+
NO. It is NOT a version 1.0 and is NOT ready for use by a punisher in its current form.Its a proof of concept (POC). The purpose is to showcase technical feasibility of executing publisher advertising functions server side and initiate industry effort to define and build an MVP or version 1.0 that is ready for use by publishers
6+
7+
**Why did Tech Lab build the Trusted Server POC?**
8+
Today all of the publisher advertising is managed using third party providers, telemetry and capabilities available on the browser. New privacy initiatives and proposals by all major browsers are severely restricting most third party activities and telemetry used in advertising thus making it less and less effective, for e.g. third party cookie deprecation. Moreover, ad blocking is only growing worldwide. Managing ad requests on the edge cloud offers several advantages and better controls to the publisher, for e.g. device and user identification,enabling third parties with better control, managing privacy and improving page performance.
9+
10+
**Will the Trusted Server work for mobile in app advertising?**
11+
The POC is designed for browsers and the initial trusted server focus is to support browser traffic. A second phase will focus on mobile apps.
12+
13+
**Is the Trusted Server free?**
14+
YES. The trusted server will be free and open source and offered under Apache 2.0 license terms.
15+
16+
**Does the POC integrate with my CMS?**
17+
As of today, it doesn’t. This is a simple POC where we are hosting the very basic HTML/JS content inside the Trusted Server application itself. We will begin to release modules and reference architecture as the project moves forward. We’d also love contributions from our community on this front!
18+
19+
**What is the vision for MVP or version 1.0?**
20+
Tech Lab envisions the MVP to incorporate capabilities to make a valid Open RTB ad request using a prebid server and process the response for native, display and video ads. Our current plan for MVP version is that it can support addressability (user/device signals, ID solutions, other audience and targeting solutions), privacy management (CMP execution, GPP and TCF strings), CMS integration, Publisher Ad server integration and prebid server integration. We look forward to the industry to help develop the MVP definition.
21+
22+
**Will Tech Lab build all the capabilities?**
23+
NOT all the capabilities. Tech Lab will build and support core services to enable existing publisher and adtech companies to build their own modules to support publisher advertising capabilities.
24+
25+
**Does the Trusteed Server preclude using third party tags?**
26+
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.
27+
28+
**Why are you only using two vendors in the POC?**
29+
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
30+
31+
**How will this project be managed?**
32+
Tech lab has created the ‘Trusted Server Taskforce’ to manage the requirements and roadmap for the project. We will maintain a core engineering team to build based on task force priorities and invite community contributions, especially third party providers to build their tags and modules for publishers.
33+
34+
**How will you support the publishers planning to implement?**
35+
Yes! As of today we will be providing community support on a best effort basis as we scale up the architecture and use cases. We will do our best to respond to inquiries in the Github project as quickly as we can.
36+
37+
**How will it work for medium size publishers using managed Word Press hosting (Ghost)?**
38+
Yes. As long as your managed service provider can separate the edge from the CMS, They should be able to run trusted server. Some work may be necessary and we look to the community for contributions in defining and building for it.
39+
40+
**How will this comply with Privacy regulations?**
41+
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+

ProjectGovernance.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Project Governance for The Trusted Server
2+
3+
The Trusted Server project will be governed as an open-source initiative, in accordance with the established guidelines of the IAB Tech Lab Open Source initiative. However, certain key distinctions apply:
4+
5+
* The Trusted Server Task Force shall be responsible for the definition of requirements and the project roadmap.
6+
* The Task Force shall adhere to the working group rules and procedures of the Tech Lab.
7+
* The Trusted Server Development Team shall oversee engineering development and releases.
8+
9+
## The Trusted Server Task Force
10+
11+
A dedicated Task Force has been constituted by the Tech Lab to oversee the requirements and roadmap for the Trusted Server initiative. The core mandate of the Task Force is to review, approve, and prioritize proposals, issues, and pull requests submitted by the community for the Trusted Server.
12+
13+
The Task Force shall adhere to the working group rules and procedures of the Tech Lab for decision-making and management of the Trusted Server roadmap, with one exception: in recognition of the project's open-source nature, a formal public comment release period will not be instituted. Software releases will be conducted on a continuous basis.
14+
15+
The Task Force will convene biweekly, and detailed meeting minutes will be meticulously maintained within the Trusted Server GitHub repository.
16+
17+
## The Trusted Server Development Team
18+
19+
The Development Team shall be responsible for the evaluation of technical feasibility of requirements, the definition of system architecture, and the construction of the Trusted Server in alignment with the roadmap established by the Task Force. The team composition is as follows:
20+
21+
* **Project Release Manager:** This individual holds ultimate responsibility for project development and possesses 'write' access to the repository.
22+
* **Committer:** This developer possesses 'write' access to the repository and is responsible for implementing final changes.
23+
* **Developer:** This contributor contributes to the project through code or documentation and may assume further project management responsibilities.
24+
25+
The Development Team shall be responsible for the development and release of the Trusted Server and will establish its own sprint and meeting schedule.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ brew install fastly/tap/fastly
4646
fastly version
4747
```
4848

49+
:warning: fastly cli version should be at least v11.1.0
50+
4951
#### Create profile and follow interactive prompt for pasting your API Token created earlier:
5052
```sh
5153
fastly profile create
@@ -91,7 +93,7 @@ git clone [email protected]:IABTechLab/trusted-server.git
9193
:information_source: Note that you’ll have to edit the following files for your setup:
9294

9395
- fastly.toml (service ID, author, description)
94-
- Potsi.toml (KV store ID names)
96+
- potsi.toml (KV store ID names)
9597

9698
### Build
9799

fastly.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ service_id = "q9waEnTgJfqQV1a0cYOuo3"
1212
[scripts]
1313
build = """
1414
cargo build --bin potsi --release --target wasm32-wasip1 --color always &&
15-
ln -fs wasm32-wasip1 target/wasm32-wasi
1615
"""
1716

18-
1917
[local_server]
2018
[local_server.backends]
2119
[local_server.backends.equativ_ad_api_2] # FIX ME: must match config

potsi.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ server_url = "http://68.183.113.79:8000/openrtb2/auction"
99
counter_store = "jevans_synth_id_counter"
1010
opid_store = "jevans_synth_id_opid"
1111
secret_key = "potsi"
12+
# Possible values
13+
# - "client_ip"
14+
# - "user_agent"
15+
# - "first_party_id"
16+
# - "auth_user_id"
17+
# - "publisher_domain"
18+
# - "accept_language"
19+
template = "{{ client_ip }}:{{ user_agent }}:{{ first_party_id }}:{{ auth_user_id }}:{{ publisher_domain }}:{{ accept_language }}"

src/constants.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
pub const SYNTH_HEADER_FRESH: &str = "X-Synthetic-Fresh";
2-
pub const SYNTH_HEADER_POTSI: &str = "X-Synthetic-Potsi";
1+
pub const SYNTHETIC_HEADER_FRESH: &str = "X-Synthetic-Fresh";
2+
pub const SYNTHETIC_HEADER_POTSI: &str = "X-Synthetic-Potsi";
3+
pub const SYNTHETIC_HEADER_PUB_USER_ID: &str = "X-Pub-User-ID";

0 commit comments

Comments
 (0)