From c75c739f0119abde007d63a873c6cb7f4ad9b706 Mon Sep 17 00:00:00 2001 From: "Constantine.mirin" Date: Mon, 16 Nov 2026 11:28:59 +0100 Subject: [PATCH 1/3] Onboarding preview: say what the console sets up, and route Fastly to us --- website/src/lib/onboarding/cdn-integrations.mjs | 10 ++++++---- website/src/lib/onboarding/default-preview.test.mjs | 4 ++-- website/src/lib/onboarding/page-fallback.test.mjs | 9 ++++++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/website/src/lib/onboarding/cdn-integrations.mjs b/website/src/lib/onboarding/cdn-integrations.mjs index c32a3f7e..2c1abcb1 100644 --- a/website/src/lib/onboarding/cdn-integrations.mjs +++ b/website/src/lib/onboarding/cdn-integrations.mjs @@ -4,7 +4,8 @@ export const CDN_INTEGRATIONS = { name: 'Fastly', scheme: 'Ed25519', path: 'The FORA Edge package checks the Exchange’s signed URLs before allowing access to your licensed content.', - guidance: 'We’ll provide the package and guide you through connecting it to your Fastly service, choosing which paths to protect, and testing access before going live.', + guidance: 'The console sets up Cloudflare and CloudFront for you. For Fastly, write to us: we’ll provide the package and guide you through connecting it to your Fastly service, choosing which paths to protect, and testing access before going live.', + contact: true, }, cloudflare: { name: 'Cloudflare', @@ -26,7 +27,8 @@ export function cdnName(provider) { /** * The label of the page's links to the publisher contact address: on the CDN - * card when no network was identified, and in the note shown when no discovery + * card when no network was identified or the console does not set the network + * up (Fastly), and in the note shown when no discovery * document could be generated. The page owns the address; this module owns the * words. */ @@ -46,7 +48,7 @@ export function cdnPresentation(provider) { title: `Integration path: ${integration.scheme} signed URLs`, description: integration.path, guidance: integration.guidance ?? 'We’ll provide a CDN package and setup instructions tailored to your site. Setup includes choosing the content paths to license and checking that ordinary visitors can still browse normally.', - contact: '', + contact: integration.contact ? CONTACT_LABEL : '', }; if (provider === 'akamai') return { badge: 'Akamai detected', tone: 'ok', @@ -60,7 +62,7 @@ export function cdnPresentation(provider) { badge: 'We couldn’t identify your CDN', tone: 'none', evidenceIntro: 'We found these network signals:', title: 'We’ll help you connect your website', - description: 'CloudFront, Cloudflare, and Fastly are supported today. If you use another CDN — or no CDN — write to us and we’ll help you find the right setup.', + description: 'The console sets up CloudFront and Cloudflare for you, and we help Fastly sites connect. If you use another CDN — or no CDN — write to us and we’ll help you find the right setup.', guidance: '', contact: CONTACT_LABEL, }; diff --git a/website/src/lib/onboarding/default-preview.test.mjs b/website/src/lib/onboarding/default-preview.test.mjs index ce7fb0ce..a4355a17 100644 --- a/website/src/lib/onboarding/default-preview.test.mjs +++ b/website/src/lib/onboarding/default-preview.test.mjs @@ -90,10 +90,10 @@ const cdnCases = [ ['Cloudflare', 'cloudflare', 'edge_package', 'cf-ray', /worker/i], ['Fastly', 'fastly', 'edge_package', 'x-served-by', /FORA Edge package/], ['Akamai', 'akamai', 'contact_us', 'akamai-grn', /signed.*URLs/i], - ['unknown CDN', 'none', 'contact_us', null, /CloudFront, Cloudflare, and Fastly are supported today/], + ['unknown CDN', 'none', 'contact_us', null, /The console sets up CloudFront and Cloudflare for you, and we help Fastly sites connect/], // Controlled-origin scenario is test provenance, never a service assertion: // the same none payload cannot distinguish direct origin from an unknown CDN. - ['known direct origin', 'none', 'contact_us', null, /CloudFront, Cloudflare, and Fastly are supported today/], + ['known direct origin', 'none', 'contact_us', null, /The console sets up CloudFront and Cloudflare for you, and we help Fastly sites connect/], ]; function cdnResponse([, provider, integration, header], overrides = {}) { const data = response(overrides); diff --git a/website/src/lib/onboarding/page-fallback.test.mjs b/website/src/lib/onboarding/page-fallback.test.mjs index f40bb4e1..558f60a4 100644 --- a/website/src/lib/onboarding/page-fallback.test.mjs +++ b/website/src/lib/onboarding/page-fallback.test.mjs @@ -63,14 +63,17 @@ test('absent, unexpected, prototype and hostile provider tokens share an honest } }); -test('only an unidentified CDN offers the contact link, and the mapping carries no address', () => { - for (const provider of ['cloudfront', 'cloudflare', 'fastly', 'akamai']) { +test('Fastly and an unidentified CDN offer the contact link, and the mapping carries no address', () => { + for (const provider of ['cloudfront', 'cloudflare', 'akamai']) { assert.equal(presentation(provider).contact, '', `${provider} needs no contact link`); } + const fastly = presentation('fastly'); const unknown = presentation('none'); assert.equal(integrations.CONTACT_LABEL, 'Write to us'); + assert.equal(fastly.contact, integrations.CONTACT_LABEL, 'The console routes Fastly publishers to us'); + assert.match(fastly.guidance, /sets up Cloudflare and CloudFront/); assert.equal(unknown.contact, integrations.CONTACT_LABEL, 'One label for every contact link on the page'); - for (const value of Object.values(unknown)) { + for (const value of [...Object.values(fastly), ...Object.values(unknown)]) { assert.doesNotMatch(value, /mailto:|https?:\/\//, 'The page supplies the contact address, never the mapping'); } }); From f9a102432306bb362cf6f8818ad3bf16828dba46 Mon Sep 17 00:00:00 2001 From: "Constantine.mirin" Date: Mon, 16 Nov 2026 11:29:00 +0100 Subject: [PATCH 2/3] Edge function docs: Fastly Compute is a supported runtime --- website/src/content/docs/architecture/deployment-models.mdx | 2 +- .../src/content/docs/components/edge-function/deployment.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/content/docs/architecture/deployment-models.mdx b/website/src/content/docs/architecture/deployment-models.mdx index 603ede41..71a94a7c 100644 --- a/website/src/content/docs/architecture/deployment-models.mdx +++ b/website/src/content/docs/architecture/deployment-models.mdx @@ -81,7 +81,7 @@ The provider deploys the edge function itself, with the [reference implementatio | CloudFront | Lambda@Edge | The `aws-cloudfront-edge` Terraform module | A JSON file built into the bundle | | Cloudflare | Workers | The `cloudflare-edge` Terraform module, or Wrangler | The Worker's variables | -The edge function stores nothing of its own on either: it reads no KV store. The reference implementation also has a Fastly Compute entry point, `src/entries/fastly.ts`, which its tests run locally under Viceroy. +The edge function stores nothing of its own on either: it reads no KV store. It also runs on Fastly Compute, through its `fastly.ts` adapter, which the reference implementation tests in Node and in its Docker-based E2E stack under Viceroy ([`README.md`](https://github.com/FORA-Protocol/reference-implementation/blob/v1.1.0/src/edge/README.md)). Fastly has no row in the table: the reference implementation has no Terraform module, console package or build script for it. ### When to Use diff --git a/website/src/content/docs/components/edge-function/deployment.mdx b/website/src/content/docs/components/edge-function/deployment.mdx index 7ae2f14b..91ad9fff 100644 --- a/website/src/content/docs/components/edge-function/deployment.mdx +++ b/website/src/content/docs/components/edge-function/deployment.mdx @@ -45,7 +45,7 @@ The absolute minimum a provider needs to do: ## Distribution Formats -The edge function is the edge worker in the reference implementation, [`src/edge`](https://github.com/FORA-Protocol/reference-implementation/tree/v1.1.0/src/edge). It runs on Cloudflare Workers and AWS Lambda@Edge. The reference implementation also has a Fastly Compute entry point, `src/entries/fastly.ts`, which its tests run locally under Viceroy. The edge worker reaches a provider's CDN in one of two formats. +The edge function is the edge worker in the reference implementation, [`src/edge`](https://github.com/FORA-Protocol/reference-implementation/tree/v1.1.0/src/edge). It runs on Cloudflare Workers, Fastly Compute and AWS Lambda@Edge, each through its own adapter in `src/entries/`: `cloudflare.ts`, `fastly.ts` and `aws-lambda.ts` ([`README.md`](https://github.com/FORA-Protocol/reference-implementation/blob/v1.1.0/src/edge/README.md)). Fastly's WebCrypto has no Ed25519, so `fastly.ts` checks signatures with `@noble/ed25519`. Fastly and Lambda@Edge are tested in Node harnesses, and both get a full Agent → Broker → Exchange → Edge → Origin run in the Docker-based E2E stack, where the Fastly build runs under Viceroy, Fastly's local runtime. The publisher console's automated setup covers Cloudflare and CloudFront, and so do the Terraform modules below. For Fastly, the reference implementation has no console package, no Terraform module and no build script. On Cloudflare and CloudFront, the edge worker reaches a provider's CDN in one of two formats. ### Format 1: Console Package From 12a18e1a2e0ac60efe289bf69f4e842d51e515a3 Mon Sep 17 00:00:00 2001 From: "Constantine.mirin" Date: Mon, 16 Nov 2026 12:28:47 +0100 Subject: [PATCH 3/3] Onboarding preview: Akamai is not supported today, so route it to us --- .../src/lib/onboarding/cdn-integrations.mjs | 10 +++++----- .../lib/onboarding/default-preview.test.mjs | 2 +- .../src/lib/onboarding/page-fallback.test.mjs | 20 +++++++++++-------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/website/src/lib/onboarding/cdn-integrations.mjs b/website/src/lib/onboarding/cdn-integrations.mjs index 2c1abcb1..97ee548c 100644 --- a/website/src/lib/onboarding/cdn-integrations.mjs +++ b/website/src/lib/onboarding/cdn-integrations.mjs @@ -28,7 +28,7 @@ export function cdnName(provider) { /** * The label of the page's links to the publisher contact address: on the CDN * card when no network was identified or the console does not set the network - * up (Fastly), and in the note shown when no discovery + * up (Fastly, Akamai), and in the note shown when no discovery * document could be generated. The page owns the address; this module owns the * words. */ @@ -53,10 +53,10 @@ export function cdnPresentation(provider) { if (provider === 'akamai') return { badge: 'Akamai detected', tone: 'ok', evidenceIntro: 'We recognized Akamai-specific patterns:', - title: 'Integration path: Signed delivery URLs', - description: 'We’ll configure your Akamai integration to check the Exchange’s signed URLs before allowing access to your licensed content.', - guidance: 'We’ll provide the package and guide you through connecting it to your Akamai service, choosing which paths to protect, and testing access before going live.', - contact: '', + title: 'Akamai isn’t supported today', + description: 'The console sets up Cloudflare and CloudFront for you. FORA’s edge function doesn’t run on Akamai today, so write to us and we’ll help you find the right setup.', + guidance: '', + contact: CONTACT_LABEL, }; return { badge: 'We couldn’t identify your CDN', tone: 'none', diff --git a/website/src/lib/onboarding/default-preview.test.mjs b/website/src/lib/onboarding/default-preview.test.mjs index a4355a17..7e78fde1 100644 --- a/website/src/lib/onboarding/default-preview.test.mjs +++ b/website/src/lib/onboarding/default-preview.test.mjs @@ -89,7 +89,7 @@ const cdnCases = [ ['CloudFront', 'cloudfront', 'edge_package', 'x-amz-cf-id', /Lambda@Edge/], ['Cloudflare', 'cloudflare', 'edge_package', 'cf-ray', /worker/i], ['Fastly', 'fastly', 'edge_package', 'x-served-by', /FORA Edge package/], - ['Akamai', 'akamai', 'contact_us', 'akamai-grn', /signed.*URLs/i], + ['Akamai', 'akamai', 'contact_us', 'akamai-grn', /doesn’t run on Akamai today/], ['unknown CDN', 'none', 'contact_us', null, /The console sets up CloudFront and Cloudflare for you, and we help Fastly sites connect/], // Controlled-origin scenario is test provenance, never a service assertion: // the same none payload cannot distinguish direct origin from an unknown CDN. diff --git a/website/src/lib/onboarding/page-fallback.test.mjs b/website/src/lib/onboarding/page-fallback.test.mjs index 558f60a4..fdee750f 100644 --- a/website/src/lib/onboarding/page-fallback.test.mjs +++ b/website/src/lib/onboarding/page-fallback.test.mjs @@ -40,15 +40,17 @@ test('CloudFront preserves both verification choices without selecting a default assert.doesNotMatch(result.guidance, /default|recommend.*RSA|use RSA/i); }); -test('Akamai uses the same detected styling and promises setup guidance', () => { +test('Akamai is named as detected, said to be unsupported, and promised no integration', () => { const result = presentation('akamai'); assert.match(result.badge, /Akamai/); assert.equal(result.tone, 'ok'); - assert.match(result.title, /^Integration path:/); - assert.match(result.guidance, /We’ll provide the package/); - assert.doesNotMatch(`${result.title} ${result.description}`, /not yet supported|no integration package/i); + assert.equal(result.title, 'Akamai isn’t supported today'); + assert.match(result.description, /sets up Cloudflare and CloudFront/); + assert.match(result.description, /doesn’t run on Akamai today/); + assert.equal(result.guidance, ''); + assert.doesNotMatch(`${result.title} ${result.description}`, /integration path|we’ll (?:provide|configure)|\bpackage\b/i); assert.notEqual(result.badge, presentation('none').badge); - assert.doesNotMatch(`${result.description} ${result.guidance}`, /\bdownload\b|\bdeploy\b|start registration/i); + assert.doesNotMatch(result.description, /\bdownload\b|\bdeploy\b|start registration/i); }); test('absent, unexpected, prototype and hostile provider tokens share an honest unknown outcome', () => { @@ -63,8 +65,8 @@ test('absent, unexpected, prototype and hostile provider tokens share an honest } }); -test('Fastly and an unidentified CDN offer the contact link, and the mapping carries no address', () => { - for (const provider of ['cloudfront', 'cloudflare', 'akamai']) { +test('Fastly, Akamai and an unidentified CDN offer the contact link, and the mapping carries no address', () => { + for (const provider of ['cloudfront', 'cloudflare']) { assert.equal(presentation(provider).contact, '', `${provider} needs no contact link`); } const fastly = presentation('fastly'); @@ -72,8 +74,10 @@ test('Fastly and an unidentified CDN offer the contact link, and the mapping car assert.equal(integrations.CONTACT_LABEL, 'Write to us'); assert.equal(fastly.contact, integrations.CONTACT_LABEL, 'The console routes Fastly publishers to us'); assert.match(fastly.guidance, /sets up Cloudflare and CloudFront/); + const akamai = presentation('akamai'); + assert.equal(akamai.contact, integrations.CONTACT_LABEL, 'The console routes Akamai publishers to us'); assert.equal(unknown.contact, integrations.CONTACT_LABEL, 'One label for every contact link on the page'); - for (const value of [...Object.values(fastly), ...Object.values(unknown)]) { + for (const value of [...Object.values(fastly), ...Object.values(akamai), ...Object.values(unknown)]) { assert.doesNotMatch(value, /mailto:|https?:\/\//, 'The page supplies the contact address, never the mapping'); } });