Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8f34db7
Add domain allowlist to block SSRF via first-party proxy redirects
prk-Jr Mar 16, 2026
bd88f8d
Normalize proxy allowed_domains and harden redirect allowlist enforce…
prk-Jr Mar 17, 2026
53f251f
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 17, 2026
043db9d
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 18, 2026
0514c1e
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 18, 2026
d5227de
Document proxy.allowed_domains in proxy and configuration guides
prk-Jr Mar 18, 2026
84be147
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 18, 2026
c771d3b
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 19, 2026
320ab6c
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 20, 2026
47936e5
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 21, 2026
a04b0e9
Enforce proxy allowlist on initial target and redirect hops
prk-Jr Mar 21, 2026
fbb3b6d
Fix format ci failure
prk-Jr Mar 21, 2026
cbbadc6
Merge branch 'main' into harden/ssrf-proxy-allowlist
aram356 Mar 23, 2026
ef74501
Addressed pr findings
prk-Jr Mar 25, 2026
30d0d4a
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 25, 2026
e02d126
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 26, 2026
83ea1dc
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 30, 2026
bd416b0
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 30, 2026
8408a30
Resolve pr review findings
prk-Jr Mar 30, 2026
9d2d2b6
Merge branch 'main' into harden/ssrf-proxy-allowlist
prk-Jr Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ TRUSTED_SERVER__SYNTHETIC__OPID_STORE=opid_store
# [proxy]
# Disable TLS certificate verification for local dev with self-signed certs
# TRUSTED_SERVER__PROXY__CERTIFICATE_CHECK=false
#
# Restrict first-party proxy redirect targets to an allowlist (JSON array or indexed form).
# Leave unset in local dev; configure in production to prevent SSRF via redirect chains
# initiated by signed first-party proxy URLs.
# TRUSTED_SERVER__PROXY__ALLOWED_DOMAINS='["*.doubleclick.net","*.googlesyndication.com"]'
# Or using indexed form:
# TRUSTED_SERVER__PROXY__ALLOWED_DOMAINS__0='*.doubleclick.net'
# TRUSTED_SERVER__PROXY__ALLOWED_DOMAINS__1='*.googlesyndication.com'
5 changes: 5 additions & 0 deletions crates/trusted-server-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ pub enum TrustedServerError {
#[display("Proxy error: {message}")]
Proxy { message: String },

/// A redirect destination was blocked by the proxy allowlist.
#[display("Redirect to `{host}` blocked: host not in proxy allowed_domains")]
AllowlistViolation { host: String },

/// Settings parsing or validation failed.
#[display("Settings error: {message}")]
Settings { message: String },
Expand Down Expand Up @@ -99,6 +103,7 @@ impl IntoHttpResponse for TrustedServerError {
Self::Prebid { .. } => StatusCode::BAD_GATEWAY,
Self::Integration { .. } => StatusCode::BAD_GATEWAY,
Self::Proxy { .. } => StatusCode::BAD_GATEWAY,
Self::AllowlistViolation { .. } => StatusCode::FORBIDDEN,
Self::SyntheticId { .. } => StatusCode::INTERNAL_SERVER_ERROR,
Self::Template { .. } => StatusCode::INTERNAL_SERVER_ERROR,
}
Expand Down
Loading
Loading