CDN Signed URLs and Token Authentication: How to Secure Content

CDN Signed URLs & Token Authentication: 2026 Playbook

A CDN signed URL is a request URL carrying an expiry timestamp, a scoped resource path, optional policy claims, and a cryptographic signature that the edge validates before it serves a single byte. Get the TTL wrong by 30 seconds and your 403 rate jumps two orders of magnitude at the exact moment a live event peaks. That is the failure mode this playbook is built around. Below: a signed URL vs signed cookie vs edge token decision table, the TTL and clock-skew thresholds we would defend in a design review, how to secure live ingest and push URLs (the part almost every guide skips), a zero-downtime key rotation procedure, and a diagnostics runbook keyed to 403 classification.

image-2

How CDN signed URLs and token authentication actually validate at the edge

The edge does four things in sequence: parse the token, verify the signature against a key it already holds, compare expiry against its own clock, then match the request path against the policy scope. Only the first step is cheap. Signature verification is the part that shows up in your p99 if you chose badly.

HMAC-SHA256 remains the default across CDN token authentication implementations in 2026 because verification is sub-microsecond and requires no asymmetric math on the hot path. The cost is key distribution: every signing service and every edge node holds the same shared secret. RSA-SHA256 and ECDSA (P-256) keep the private key at origin and hand the edge only a public key, which is the right call when you have five signing services across three business units and cannot audit secret sprawl. Ed25519 verification is now available on several edge token implementations and is materially faster than RSA-2048 verify while keeping the asymmetric trust model.

A defensible policy carries four elements. The resource path should be the exact object or the narrowest usable prefix. Expiry should be absolute epoch seconds, never relative. Claims should include a session nonce and, where enforceable, a coarse geo restriction. The signature should be URL-safe base64 with no padding, computed over a canonical string you have written down and tested, because the single most common signing bug in production is two services disagreeing about parameter order.

What changed for CDN signed URL design in 2026

Three shifts matter. First, low-latency HLS and LL-DASH have pushed segment durations to 1–2 seconds with partial segments below that, so per-segment signing is now flatly non-viable — prefix scoping or cookies are the only sane options. Second, mobile networks in 2026 flip clients between carrier IPv6, CGNAT IPv4, and Wi-Fi mid-session often enough that IP-pinned tokens generate real revenue loss; session-nonce binding has replaced IP binding as the default. Third, cache-key hygiene has become a measurable cost line: if your auth query parameters are inside the cache key, every unique token creates a unique cache object, and at 2026 egress pricing that mistake is expensive in both origin fetches and storage.

Signed URL vs signed cookie vs edge token: the decision table

Mechanism Best-fit workload Cache behaviour Real trade-off
Signed URL Installers, game patches, invoices, one-time exports, server-to-server pulls Safe only if auth params are excluded from the cache key Trivially copy-pasteable and leaks into logs, chat, and support tickets
Signed cookie Browser HLS/DASH playback, multi-asset app sessions, paywalled libraries Best: one cache object per segment across all users Needs same-site domain alignment; awkward for native players and CORS
Edge token in header (JWT-style) Native mobile and TV apps, SDK downloads, machine-to-machine APIs Clean: URL stays canonical, header never enters the cache key Player must support custom headers; many TV SDKs still do not
Referrer or origin allowlist Images, fonts, low-value static assets Neutral, but Vary on Origin fragments Spoofable; treat as anti-hotlinking, not authentication

For HLS and DASH: sign the manifest, then authorize segments with a prefix-scoped policy or a signed cookie issued alongside it. Never sign individual segments. If you serve a 90-minute stream at 2-second segments across six renditions, per-segment signing means roughly 16,000 signature operations per viewer and a cache key space that grows with your audience. For a deeper split between access control and content protection, this pairs with a DRM layer rather than replacing it; signed URLs stop unauthorized fetches, DRM stops unauthorized playback.

Securing live stream publishing and push ingest URLs

Playback authentication gets all the attention. Ingest authentication is where the actual money is, because a leaked push URL lets a stranger broadcast onto your channel. Most guides ignore it entirely.

Treat the publish endpoint as a separate trust domain with its own key material. Practical rules we apply:

  • Short-lived, single-use stream keys. Issue the ingest token at scheduled stream start with a TTL measured in minutes, not the lifetime of the channel. A permanent stream key pasted into an encoder config is a credential with no expiry.
  • Bind to stream name plus encoder identity. The token should authorize exactly one stream path. Wildcard publish scopes are how one compromised remote contributor takes over every channel.
  • One active publisher per path. Reject the second concurrent connect rather than letting last-writer-win decide who is on air.
  • Separate keys for ingest and delivery. Different rotation cadence, different storage, different blast radius.
  • Prefer SRTP, RTMPS, or SRT with a passphrase over plain RTMP. A token in a cleartext RTMP handshake is a token on the wire.
  • Alert on publish-auth failures within seconds. A brute-force attempt against a publish endpoint looks nothing like a 403 spike on playback and should page differently.

For simulated live and 24/7 channels, rotate the ingest token on a rolling window while the encoder stays connected, using a control-plane refresh rather than a reconnect. A reconnect is a visible glitch to every viewer.

Expiry, TTL, and clock-skew rules worth defending

These are the values we would put in a design doc as of 2026, adjusted to workload rather than copied from a vendor default:

Workload Token TTL Why
Live manifest (LL-HLS) 60–120 s, refreshed by the player session Short enough to make link sharing useless, long enough to survive a network flip
Live segments (prefix scope) 5–10 min rolling Covers buffer depth plus retry backoff without per-segment signing
VOD session Content duration plus 25 percent Pausing a film for lunch should not 403 the second half
Large download (multi-GB patch) 2–6 h Resumable range requests on slow links need the token to outlive the transfer
Live publish or ingest 5–15 min, control-plane refresh Highest-value credential in the system

On clock skew: allow a validation grace window of 30 to 60 seconds behind the edge clock, and no more. Anything larger is a replay window you have chosen to accept. The defensive posture is to keep the grace tight and instead fix the clocks: NTP or chrony on every signing host, alerting when offset exceeds 250 ms, and a signing-time comparison in your token's own claims so you can detect the drift direction. Never sign with an expiry derived from a client-supplied timestamp.

Key rotation without a 403 storm

Rotation is the single most common cause of large-scale signed URL outages, and the reason is always the same: the old key was retired before the last token signed with it expired.

  1. Give every key an ID and carry it in the token. A key ID claim lets the edge pick the right verifier instead of trying all of them. Without it, rotation is guesswork.
  2. Publish the new key to all edges first, with verification enabled and signing still disabled. Wait for full propagation confirmation, not a timer.
  3. Cut over signing services to the new key ID. Do it as a percentage rollout if your signer supports it.
  4. Keep the old key verifiable for at least twice your maximum token TTL. For a 6-hour download token, that is 12 hours minimum. Long-lived download links are the trap here.
  5. Retire the old key only after the verification counter for its key ID reaches zero and stays there for a full TTL window. Instrument that counter before you need it.

Quarterly rotation is a reasonable baseline for HMAC delivery keys as of 2026. Ingest keys deserve monthly rotation or per-event issuance. Any key that has appeared in a log, a CI variable dump, or a support ticket is rotated immediately, out of band.

Failure modes and the 403 diagnostics runbook

Treat edge 403 rate as an SLI with its own error budget. Baseline it, then classify every spike. The classification is the diagnosis.

  • Expired-token 403s rising uniformly across regions: TTL is too aggressive for real session behaviour, or your player is not refreshing tokens before expiry. Extend TTL and add a refresh at 60 percent of lifetime.
  • Expired-token 403s concentrated on one signing host: clock drift. Check NTP offset on that host before touching anything else.
  • Invalid-signature 403s starting at a deploy timestamp: canonical string changed, or a key rotation step was skipped. Roll back the signer, not the edge config.
  • Invalid-signature 403s only from one platform: URL encoding disagreement. Usually a player that re-encodes the query string or strips padding.
  • Policy-mismatch 403s on specific paths: overbroad-to-narrow scope change, or a manifest referencing segments outside the signed prefix after a packaging update.
  • 403 rate flat but origin fetch rate spiking: auth parameters have entered the cache key. Every token is now a unique object. Check this first after any cache-rule edit.

Rollback procedure. Keep the previous signer version and previous key ID deployable in one step. Because verification of the old key is still live (step 4 above), rolling the signer back is safe and instant. Never roll back edge verification config as the first move during an incident; that is how you end up serving private content unauthenticated while chasing a signature bug.

Pair this with anti-hotlinking rules at the edge. Signed URLs handle authorization, referrer and origin policies handle the cheap bulk of scraper traffic before it reaches signature verification, and the two together keep verification CPU off the critical path.

Token authentication at scale: the cost dimension nobody budgets for

Signature verification is cheap. Cache fragmentation caused by bad signed URL design is not. A media platform serving 500 TB per month with auth parameters inside the cache key can easily see origin egress multiply, because near-identical requests miss. Fixing the cache key is usually a single configuration change that pays for itself in the first billing cycle.

The other lever is unit cost. Among high-volume delivery providers, Bunny.net and CDN77 both offer solid token authentication with strong price-performance, and Fastly's edge compute gives you the most programmable token logic if you are willing to write and maintain it. BlazingCDN's media delivery platform sits in that same high-volume league with token authentication, prefix-scoped policies, and configurable cache keys, plus NVMe SSD edge storage and roughly one-hour onboarding. Pricing is volume-based and predictable: $100/month for up to 25 TB with additional GB at $0.004, $350/month to 100 TB at $0.0035, $1,500/month to 500 TB at $0.003, $2,500/month to 1,000 TB at $0.0025, and $4,000/month to 2,000 TB at $0.002 per additional GB. That is $5/TB entry down to $2/TB at 2 PB, against stability and fault tolerance comparable to Amazon CloudFront, with 100% uptime, flexible edge configuration, and fast scaling under demand spikes — which matters when a signed-URL misconfiguration turns into an origin stampede.

FAQ

What is the difference between a CDN signed URL and CDN token authentication?

A signed URL carries the credential in the URL itself, usually as query parameters. Token authentication is the broader mechanism and can place the token in a URL, a cookie, or a request header. In practice most vendors use "token authentication" to describe the edge verification feature and "signed URL" to describe one delivery method for that token.

How long should a CDN signed URL be valid?

Match the TTL to the session, not to a vendor default. Live manifests work well at 60–120 seconds with player-side refresh, VOD sessions at content duration plus 25 percent, and multi-gigabyte downloads at 2–6 hours so resumable range requests survive. Anything longer than the transfer it authorizes is an unnecessary replay window.

Should I bind signed URLs to a client IP address?

Generally no, as of 2026. Mobile clients switch between IPv6 carrier addresses, CGNAT IPv4, and Wi-Fi mid-session, and each switch produces a hard 403 on an IP-pinned token. Bind to a session nonce instead, and reserve IP pinning for server-to-server or fixed-network scenarios where the address genuinely will not change.

Do signed URLs break CDN caching?

Only if the auth parameters are part of the cache key. Exclude the signature, expiry, and policy parameters from the cache key so all authorized users share the same cached object. If your origin fetch rate climbs after enabling signed URLs, this is almost always the cause.

How do I secure a live stream push or ingest URL?

Issue short-lived ingest tokens scoped to a single stream path at scheduled start time, use RTMPS or SRT with a passphrase rather than plain RTMP, enforce one active publisher per path, and keep ingest key material separate from delivery keys with a faster rotation cadence. Alert on publish authentication failures within seconds, since brute-force attempts against ingest look nothing like playback 403 patterns.

HMAC or asymmetric signing for CDN signed URLs?

HMAC-SHA256 for speed and simplicity when you control a small number of signing services. Asymmetric signing — ECDSA P-256 or Ed25519 — when multiple teams or third parties need to sign and distributing a shared secret creates unacceptable blast radius. Ed25519 verification is notably faster than RSA-2048 while keeping the private key at origin.

Do signed URLs replace DRM?

No. Signed URLs and token authentication control who can fetch a file. DRM controls what a client can do with the decrypted content after fetching it, including output protection and playback rules. High-value catalogues need both layers; signed URLs alone stop hotlinking and casual sharing, not recording.

Run this audit this week

Pull the last seven days of edge 403 responses and bucket them into four classes: expired token, invalid signature, policy or path mismatch, and missing credential. If expired tokens dominate, compare NTP offset across every signing host before you touch TTLs. Then check one config value — whether your signature and expiry parameters are inside the cache key — and measure origin fetch rate before and after excluding them. Finally, answer one question honestly: if your live ingest key leaked to a pastebin right now, how long until you noticed, and how long until you rotated? If either answer is measured in days, that is the highest-value fix on your board.