Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2c41968
Report Fastly and Cloudflare platform geo through ctx.geo()
dhruv8sh Nov 13, 2026
7ef4766
Bind Axum geo from the manifest and EDGEZERO__ADAPTER__GEO settings
dhruv8sh Nov 13, 2026
8cd7af9
Merge PR #439 into PR #502 for outbound compatibility stack
aram356 Nov 16, 2026
d99d70e
Merge PR #439 into PR #502 for outbound compatibility stack
aram356 Nov 25, 2026
2313d1b
Merge PR #439 into PR #502 for outbound compatibility stack
aram356 Nov 25, 2026
0ea60a6
Merge PR #439 into PR #502 for outbound compatibility stack
aram356 Nov 26, 2026
690a8d8
Merge PR #439 into PR #502 for outbound compatibility stack
aram356 Nov 26, 2026
6fe984b
Add a CHANGELOG entry for platform Geo and Axum Geo settings
aram356 Dec 1, 2026
3a1bb15
Document the subdivision level each Geo provider reports
aram356 Dec 1, 2026
f93c283
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 1, 2026
d45c1a5
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 1, 2026
bb564d6
Place the platform Geo changelog entry after the Axum JSON section
aram356 Dec 1, 2026
9d376d6
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 1, 2026
70da4ae
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 3, 2026
1a1ae82
Merge local PR #439 fixes into PR #502
aram356 Dec 4, 2026
0292be7
Say Fastly and Cloudflare managed dispatch select platform geo in the…
aram356 Dec 4, 2026
44c026c
Correct the Native Geo changelog entry for platform geo and Axum geo …
aram356 Dec 4, 2026
0d0af81
Pass settings-supplied ALB networks to the policy validator untrimmed
aram356 Dec 4, 2026
90dbb15
Say EdgeZero, not the ALB, removes the origin credential header
aram356 Dec 4, 2026
5a30633
Reject every reserved provider ID for a supplied Axum geo provider
aram356 Dec 4, 2026
ca9917f
Name the ignored [adapters.axum.geo] table when the development runne…
aram356 Dec 4, 2026
f8444f1
Check Fastly ctx.geo() through Viceroy in the request-fidelity suite
aram356 Dec 4, 2026
7c11fda
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 4, 2026
8068f23
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 4, 2026
1d9715b
Merge PR #439 into PR #502 for the identity integration chain
aram356 Dec 4, 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
39 changes: 33 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,19 @@ settings, and request records.
`NoSelection`, or `Selected` with the provider ID and a `GeoStatus`: `Located`,
`Unavailable` (`MissingMetadata` or `UntrustedIngress`), or `Error` (`InvalidAssertion` or
`ProviderFailure`). An outcome never sets an HTTP status or grants access, and request
extensions cannot replace it. Fastly, Cloudflare, Spin and unmanaged Axum dispatch report
`NoSelection`.
extensions cannot replace it. Spin and unmanaged Axum dispatch report `NoSelection`; Fastly
and Cloudflare managed dispatch report platform geography (see Platform Geo and Axum Geo
settings below).
- Add `edgezero_core::geo` with validated `CountryCode`, `SubdivisionCode`, `GeoLocation` and
`GeoProviderId` values, and the `GeoProvider` trait for synchronous, local-only providers.
- Managed Axum hosting selects one provider with `AxumRunOptions::with_geo`. Geo is `Off` by
default, including for `from_env` and `from_vars`; there is no environment, CLI or manifest
selector. `NativeGeoSelection::CloudFront` reads `CloudFront-Viewer-Country` and
- Managed Axum hosting selects one provider with `AxumRunOptions::with_geo`,
`EDGEZERO__ADAPTER__GEO__*` settings or `[adapters.axum.geo]`. Geo is `Off` by default, and
there is no CLI selector. `NativeGeoSelection::CloudFront` reads `CloudFront-Viewer-Country` and
`CloudFront-Viewer-Country-Region` and needs the default-off `geo-cloudfront` feature;
selecting it without the feature fails at startup. `NativeGeoSelection::Supplied` plugs in an
application `GeoProvider` under its own ID, and `cloudfront` is reserved.
`AxumRunOptions::geo_capability()` validates the selection before the server listens.
`AxumRunOptions::geo_capability_for::<A>()` validates the selection the runner will use
before the server listens; `geo_capability()` validates only an explicit `with_geo` selection.
- Both selections require a `ProtectedCloudFrontAlb` policy: the ALB peer networks and the name
of a dedicated origin-credential header. Geo headers are read only when the socket peer
matches those networks; trusted-proxy settings do not admit them. EdgeZero stores only the
Expand Down Expand Up @@ -82,6 +84,31 @@ settings, and request records.
even after header or extension edits. Raw payload handoff drops the policy and preserves
exact egress ownership.

### Platform Geo and Axum Geo settings

- Fastly and Cloudflare managed dispatch now report the platform's own geography through
`ctx.geo()`, with no setting or store. Fastly looks up the client address; Cloudflare reads
`cf.country` and `cf.regionCode`. Results use provider `fastly` or `cloudflare`,
`GeoSource::Fastly` or `GeoSource::Cloudflare`, and `GeoTrustBasis::PlatformMetadata`.
A missing or unusable country, including Cloudflare's `XX` and `T1`, is `MissingMetadata`;
an unusable subdivision leaves a country-only location. For countries with several levels
of subdivision, Fastly reports the more specific one. Spin still reports `NoSelection`.
- Add `GeoOutcome::platform` for adapters that build an outcome from platform metadata.
- Axum can select Geo from `[adapters.axum.geo]` in `edgezero.toml`, with `provider`
(`cloudfront` or `off`), `alb_peer_cidrs` and `origin_credential_header_name`. Each key is a
default that the matching `EDGEZERO__ADAPTER__GEO__*` setting overrides at startup, so ALB
networks can stay out of the compiled manifest. `AxumRunOptions::with_geo` still takes
precedence over both. The development runner, `run_app` and the scaffold's `run_generated_app`
without `EDGEZERO__STORE_BINDINGS_FILE`, reads only the settings, warns that a baked table is
ignored and names it in geo startup errors; `run_production_app` applies it. Misconfiguration
fails startup instead of turning Geo off. See the
[native Geo guide](docs/guide/native-geo.md#select-from-the-manifest-and-settings).
- `AxumRunOptions::geo_capability()` now reports only an explicit `with_geo` selection. Use
`geo_capability_for::<A>()` for the selection the runner will use.
- `GeoSource` and `GeoTrustBasis` are now non-exhaustive; add wildcard arms to exhaustive
matches. `fastly` and `cloudflare` are reserved provider IDs, so rename a supplied provider
that uses either. A `geo` table under any adapter other than Axum now fails to load.

### Native celld KV on Axum

- Opt into live KV backed by celld with the default-off `celld-kv` feature. There is no celld
Expand Down
33 changes: 27 additions & 6 deletions crates/edgezero-adapter-axum/src/dev_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::diagnostics::{NativeDiagnosticsHandle, NativeSession};
use crate::outbound_executor::{AxumOutboundExecutor, AxumOutboundExecutorHandle};
pub use crate::run_options::AxumRunOptions;
use crate::run_options::{
JsonBodyLimit, config_path, failure, native_limit_setting, native_request_setting,
JsonBodyLimit, config_path, failure, geo_setting, native_limit_setting, native_request_setting,
native_settings,
};
use crate::trusted_proxy::TrustedProxyPolicy;
Expand All @@ -48,6 +48,7 @@ use edgezero_core::config_store::{ConfigStoreError, ConfigStoreHandle, ConfigSto
use edgezero_core::env_config::EnvConfig;
use edgezero_core::key_value_store::KvHandle;
use edgezero_core::logging::{BOOT_LOG_LEVEL, BOOT_LOG_TARGET, resolve_logging_level};
use edgezero_core::manifest::BakedManifest;
#[cfg(test)]
use edgezero_core::router::RouterService;
use edgezero_core::secret_store::SecretHandle;
Expand All @@ -62,7 +63,7 @@ use tokio::time::{Instant as NativeInstant, sleep_until};
use crate::config_store::AxumConfigStore;
use crate::config_store_limits::ConfigStoreLimits;
use crate::connection::{ConnectionExit, serve_http1_with_shutdown};
use crate::geo::NativeGeo;
use crate::geo::{self, NativeGeo};
use crate::ingress_config::AxumIngressConfig;
use crate::key_value_store::{KvOpenFailure, PersistentKvStore};
use crate::native_stores::{self, NativeSourcePlan, NativeStoreOverrides, NativeStoreSource};
Expand Down Expand Up @@ -1159,12 +1160,29 @@ where
A: Hooks,
F: FnOnce() -> anyhow::Result<()>,
{
let (env, json_body_limit, native) = capture_dev_environment(vars_os())?;
/// Startup error context and warning when this runner skips a baked geo table.
const IGNORED_MANIFEST_GEO: &str = "the development runner (run_app, and run_generated_app \
without EDGEZERO__STORE_BINDINGS_FILE) ignores [adapters.axum.geo]; only \
EDGEZERO__ADAPTER__GEO__* settings select geo here, and run_production_app applies \
the table";
let (env, json_body_limit, mut native) = capture_dev_environment(vars_os())?;
// The dev server ignores the manifest table: its deployment-only values are
// usually absent locally. Settings alone opt a dev run into geo.
let ignores_manifest_geo = geo::has_manifest_geo(&A::manifest());
let resolved = geo::resolve(None, &env, &BakedManifest::Absent);
native.geo = if ignores_manifest_geo {
resolved.context(IGNORED_MANIFEST_GEO)?
} else {
resolved?
};
if !A::owns_logging() {
app_logger(&env)
.init()
.context("failed to initialize application logger")?;
}
if ignores_manifest_geo {
log::warn!(target: BOOT_LOG_TARGET, "{IGNORED_MANIFEST_GEO}");
}
let ingress = AxumIngressConfig::from_env(&env)?;
let config_limits = ConfigStoreLimits::from_env(&env)?;
log::info!("[edgezero] axum HTTP/1 ingress limits: {ingress:?}");
Expand Down Expand Up @@ -1208,8 +1226,11 @@ where
"not supported by the development runner; use run_generated_app or run_production_app",
));
}
let setting = config_path(key, cfg!(windows))
.and_then(|path| native_limit_setting(&path).or_else(|| native_request_setting(&path)));
let setting = config_path(key, cfg!(windows)).and_then(|path| {
native_limit_setting(&path)
.or_else(|| native_request_setting(&path))
.or_else(|| geo_setting(&path))
});
match (os_value.to_str(), setting) {
(Some(value), _) => pairs.push((key.to_owned(), value.to_owned())),
(None, Some(category)) => {
Expand Down Expand Up @@ -1404,7 +1425,7 @@ where
&'startup PreparedStores,
) -> LocalStartupFuture<'startup>,
{
let geo = options.native_geo()?;
let geo = options.native_geo(&A::manifest())?;
let native = NativeHosting {
diagnostics: options.diagnostics(),
policy: options.trusted_proxy_policy(),
Expand Down
Loading
Loading