Repository navigation
R2: surface the S3 secret SHA-256 derivation + signature-mismatch symptom - #33978
bozsikarmand wants to merge 1 commit into
Conversation
AI Review✅ Reviewed 👉 Fix in your agent 👈Fix the following review findings in PR #33978 (https://github.com/cloudflare/cloudflare-docs/pull/33978).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit because the next review reads PR comments.
## Style Guide
- S-1966d154 | src/content/docs/r2/api/tokens.mdx:78 | Invalid admonition type `warning`
The admonition opens with `:::warning`, but the style guide allows only `:::note`, `:::caution`, and `:::tip` as valid admonition types.
- S-0b58054e | src/content/docs/r2/api/tokens.mdx:80 | Directional word `below`
The prose contains the directional word `below`; per the style guide, directional words should be replaced with a direct reference by name or link (the link itself is already present).Style Guide
Commands
|
Review coverage🟡 1 ownership area needs approval. Suggested reviewers: @helloimalastair @vy-ton
CODEOWNERS mappings for displayed areas (1)
|
|
|
||
| :::warning[The S3 Secret Access Key is a SHA-256 hash of the token value] | ||
|
|
||
| When you use an API-created token as S3 credentials, the **Secret Access Key is the SHA-256 hex digest of the API token `value`** — not the raw `value` itself. Using the raw value authenticates the request but fails signature validation with `The request signature we calculated does not match the signature you provided`, which reads like a permissions problem and is a common debugging trap. Refer to [Get S3 API credentials from an API token](#get-s3-api-credentials-from-an-api-token) below for the exact derivation. |
There was a problem hiding this comment.
authenticates the request but fails signature validation
This wording is a bit confusing. While I do get your intention here, I think this could be reworded a tad.
Summary
Surfaces the single most-missed detail when switching from dashboard-created R2 tokens to API-created ones: the S3 Secret Access Key is the SHA-256 hex digest of the API token value, not the raw value.
Why
Verified end-to-end against a live R2 bucket while building an automated rotation flow: API-created tokens authenticate against the Cloudflare API but every S3 request fails with the signature error when the raw token value is used as the secret. The error reads like a permissions problem, so the miss costs a long debugging session. The information exists in the last bullets of this page but is skipped by everyone arriving from dashboard-created tokens.
Docs only, no behavior changes.