diff --git a/crates/trusted-server-adapter-fastly/src/main.rs b/crates/trusted-server-adapter-fastly/src/main.rs
index e73618b9..04043d8d 100644
--- a/crates/trusted-server-adapter-fastly/src/main.rs
+++ b/crates/trusted-server-adapter-fastly/src/main.rs
@@ -111,7 +111,7 @@ async fn route_request(
// already captured in RuntimeServices at the entry point.
let geo_info = runtime_services
.geo()
- .lookup(runtime_services.client_info.client_ip)
+ .lookup(runtime_services.client_info().client_ip)
.unwrap_or_else(|e| {
log::warn!("geo lookup failed: {e}");
None
@@ -147,7 +147,7 @@ async fn route_request(
// Discovery endpoint for trusted-server capabilities and JWKS
(Method::GET, "/.well-known/trusted-server.json") => {
- handle_trusted_server_discovery(settings, req)
+ handle_trusted_server_discovery(settings, runtime_services, req)
}
// Signature verification endpoint
diff --git a/crates/trusted-server-adapter-fastly/src/platform.rs b/crates/trusted-server-adapter-fastly/src/platform.rs
index 709b5088..da32c929 100644
--- a/crates/trusted-server-adapter-fastly/src/platform.rs
+++ b/crates/trusted-server-adapter-fastly/src/platform.rs
@@ -5,6 +5,7 @@
//! constructs a [`RuntimeServices`] instance once at the entry point from the
//! incoming Fastly request.
+use core::fmt::Display;
use std::net::IpAddr;
use std::sync::Arc;
@@ -15,7 +16,6 @@ use fastly::geo::geo_lookup;
use fastly::{ConfigStore, Request, SecretStore};
use trusted_server_core::backend::BackendConfig;
-use trusted_server_core::fastly_storage::FastlyApiClient;
use trusted_server_core::geo::geo_from_fastly;
use trusted_server_core::platform::{
ClientInfo, GeoInfo, PlatformBackend, PlatformBackendSpec, PlatformConfigStore, PlatformError,
@@ -26,6 +26,114 @@ use trusted_server_core::platform::{
pub(crate) use trusted_server_core::platform::UnavailableKvStore;
+trait ConfigStoreReader: Sized {
+ type LookupError: Display;
+
+ fn try_get(&self, key: &str) -> Result