Skip to content

Add temporary JA4/TLS debug endpoint#646

Draft
prk-Jr wants to merge 4 commits intomainfrom
feat/ja4-debug-endpoint
Draft

Add temporary JA4/TLS debug endpoint#646
prk-Jr wants to merge 4 commits intomainfrom
feat/ja4-debug-endpoint

Conversation

@prk-Jr
Copy link
Copy Markdown
Collaborator

@prk-Jr prk-Jr commented Apr 20, 2026

Summary

  • Adds a temporary GET /_ts/debug/ja4 endpoint to the Fastly adapter to surface JA4 TLS fingerprint, H2 fingerprint, cipher suite, TLS version, user-agent, and selected Client Hints for browser fingerprint evaluation
  • Keeps the endpoint response readable when Fastly omits individual TLS or Client Hint values by using explicit fallback text
  • Adds route-level regression coverage so the adapter test suite exercises both the response builder and the /_ts/debug/ja4 router path

Changes

File Change
crates/trusted-server-adapter-fastly/src/main.rs Added build_ja4_debug_response, registered GET /_ts/debug/ja4, and added unit coverage for fallback response fields
crates/trusted-server-adapter-fastly/src/route_tests.rs Added a route-level test covering /_ts/debug/ja4 dispatch, content type, and fallback body values

Closes

Closes #645

Test plan

  • cargo fmt --all -- --check
  • cargo test --workspace
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • GitHub Actions checks green for cargo test, vitest, integration tests, browser integration tests, format-docs, format-typescript, cargo fmt, and CodeQL
  • Manual testing via fastly compute serve

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code - use expect("should ...")
  • Uses log macros (not println!)
  • New code has tests
  • No secrets or credentials committed

@prk-Jr prk-Jr self-assigned this Apr 20, 2026
@aram356 aram356 marked this pull request as draft April 20, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JA4/TLS fingerprint debug endpoint

1 participant