docs(webhooks): publish signature public key and clarify verification#69
docs(webhooks): publish signature public key and clarify verification#69tristantelleb wants to merge 1 commit into
Conversation
Replaces the "ask Eden AI support for the public key" tip with the actual RSA public key inline (PEM), so integrators can verify webhook signatures without contacting support. Save it as edenai_webhook_rsa.pub.pem, the file the Python/JS examples already load. Also: - Sharpen the signature steps to match the V3 signer exactly (orjson OPT_INDENT_2 | OPT_SORT_KEYS: sorted keys, 2-space indent, raw UTF-8, non-ASCII not escaped), and note the delivered body is compact so it must be re-serialized into canonical form before hashing. - Fix the X-EdenAI-Webhook header casing to match what the service sends. - Add a caveat about cross-language number formatting (whole-number floats serialize as 1.0 vs JS 1), which silently breaks verification. Verified end-to-end: signing with the V3 algorithm and verifying with both the Python and JS example code passes for ASCII and non-ASCII payloads, and the embedded key loads in pycryptodome, Node crypto, and openssl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
What
Improves the Webhooks page (
v3/expert-models/webhooks.mdx) so integrators can actually verify webhook signatures on their own.Publish the public key
The page told users to "ask Eden AI support for the public key." This inlines the actual RSA public key (PEM,
BEGIN PUBLIC KEY), saved asedenai_webhook_rsa.pub.pem— the same filename the Python/JS examples already load.Sharpen the "how it works" steps
Rewritten to match the V3 signer (
aifeatures/app/core/utils/crypto.py) exactly: canonical JSON =orjson.dumps(payload, option=OPT_INDENT_2 | OPT_SORT_KEYS)(keys sorted, 2-space indent, raw UTF-8 with non-ASCII not\u-escaped). Also clarifies that the delivered body is compact, so it must be re-serialized into canonical form before hashing.Header casing fix
X-Edenai-Webhook→X-EdenAI-Webhook, matching the exact casing the service sends (WEBHOOK_BASE_HEADERS).Number-formatting caveat
Adds a warning that a whole-number float (e.g. a
1.0score) serializes as1.0on Eden AI's side but1via JavaScript'sJSON.stringify, which silently breaks verification.Verification done
café 中文 🚀) payloads.orjsonoutput hash == the JS sorted-JSON.stringifyhash (byte-identical).crypto, andopenssl(3072-bit, e=65537); fingerprint matches the source key.🤖 Generated with Claude Code