From 822b9b93c56ca1b8b24692f24a084b67d0acdc89 Mon Sep 17 00:00:00 2001 From: Andy Dixon Date: Thu, 26 Feb 2026 12:31:11 +0000 Subject: [PATCH] docs: document cryptbin unwrap key proof requirement Update SDK security guidance/examples to note that provider cryptbin unwrap calls must include key_b64url and now fail with 403 Forbidden on key mismatch. --- README.md | 1 + docs/INTEGRATION_GUIDE.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index e9da455..6af0772 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ This wrapper now delegates to `BlackWall\Auth\AuthClient`. - Use OAuth/portal authentication endpoints for end users; provider admin login endpoints enforce separate admin scope checks. - Never place client secrets, refresh tokens, or access tokens in URL query strings. - For OIDC providers, include a per-request `nonce` in authorisation requests. +- For direct Cryptbin API usage, send `key_b64url` on unwrap calls; provider rejects key-mismatch unwrap attempts with `403 Forbidden`. - Always use HTTPS in production. - Store refresh tokens securely. - Keep access tokens out of logs and browser-visible output. diff --git a/docs/INTEGRATION_GUIDE.md b/docs/INTEGRATION_GUIDE.md index 6c163fa..ff6acba 100644 --- a/docs/INTEGRATION_GUIDE.md +++ b/docs/INTEGRATION_GUIDE.md @@ -162,3 +162,4 @@ Provider user/project assignment views may exclude disabled projects even if his - Use secure session cookies (`Secure`, `HttpOnly`, `SameSite=Lax` or stricter). - HTTPS URLs are enforced by default in `Config::fromArray()`. - For localhost-only HTTP testing, explicitly set `allowInsecureHttp => true`. +- If you call Cryptbin unwrap APIs directly, include the original share key as `key_b64url`; unwrap now returns `403 Forbidden` when key proof does not match metadata verifier.