Skip to content
This documentation is also available as markdown. For a complete index of all pages, see llms.txt at /llms.txt

CDN Embedder with CDNetworks Edge Application

The CDN Embedder leverages CDNetworks Edge Application to deliver forensically watermarked content through a content delivery network. This guide walks you through configuring and deploying the embedder for your Doverunner Forensic Watermarking implementation.

Sample code is available on GitHub. CDNetworks Embedder sample

The CDN Embedder is responsible for:

  • Validating watermark tokens issued by the Session Manager
  • Resolving the correct watermark file path (based on user/session/variant)
  • Fetching files from the origin of your CDN domain and serving them through the domain

Configuration is primarily done through:

  • config.js – Watermark token and folder structure configuration

Begin by updating your config.js file with the appropriate settings for your deployment:

export const config = {
"aesKey": "YOUR_DOVERUNER_SITE_KEY",
"type": "unlabeled_a_variant",
"availableInterval": 60,
"prefixFolder": ["folder1", "folder2"],
"wmtPublicKey": "YOUR_PUBLIC_KEY", // PEM format public key for Akamai WMT
"wmtPassword": "YOUR_PASSWORD" // Password for WMT token generation/verification
}
ParameterToken TypeDescription
aesKeyAESThe Site Key issued by Doverunner ContentSecurity Service
typeAES, JWTWatermark token request specification type. Default: unlabeled_a_variant
availableIntervalAESToken validity period in minutes (set to 0 for unlimited validity)
prefixFolderAESArray of top-level folders containing watermarked files. Corresponds to prefix_folder in the watermark token request specification
wmtPublicKeyJWTPEM-formatted public key for Akamai WMT integration
wmtPasswordJWTPassword credential for WMT token generation and verification

The wmt_type parameter determines whether your watermark tokens use AES encryption or JWT format. This must align with the specification provided when requesting watermark tokens from Doverunner.

Before proceeding with deployment, ensure you have:

  • An active CDNetworks account with Edge Application enabled
  • A CDN domain whose origin stores the watermarked content
  • Node.js and npm installed on your development machine

Edge Application takes the function as a single index.js file. Build it in the sample directory:

Terminal window
npm install
npm run bundle

This command writes the bundled function to dist/index.js. The same bundle is also attached to each GitHub release as a zip file. If you use it, set your values in the config object at the top of its index.js.

  1. In Edge Application > Function List, create a function without a template.
  2. In CloudIDE, replace index.js with the bundled index.js.
  3. Click save and test to commit the code.
  1. Deploy the function from Grayscale Deployment, and check that the version in the deployment record has changed.
  2. In Trigger List > Add, select your domain, add a path condition for your watermark folders (e.g. /wm-contents/*), and select the function.

Organize your watermarked content on the origin of your CDN domain according to the folder structure specified in the prefixFolder configuration parameter. The top-level folders should correspond to the prefix_folder values defined in your watermark token request specification.

For additional assistance with CDN Embedder configuration or deployment, please contact Doverunner support or consult the comprehensive Forensic Watermarking documentation.