mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
* volume, operation: refresh the write JWT for replica forwards and filer-proxy retries A write JWT is checked when a request arrives, but a slow chunk can take longer to stream in than the JWT lives. The volume server then forwarded the already expired JWT to its replicas, which rejected it with wrong jwt, and the client retried through the filer with its own filer JWT, which by then had expired too. Only a 401 marked as an expired volume JWT re-minted the filer JWT, so the 500 from the failed replica forward led to retries that could never succeed. The volume server holds the signing key and has already authorized the request for this file ID, so it signs a fresh JWT for the forward; without a signing key it forwards the incoming one as before. A filer-proxy upload re-mints its filer JWT before every retry, whatever the previous failure was. Refs #6220 * volume: mint the replica forward JWT right before each forward A JWT minted before the uncached master lookup spends part of its lifetime on that lookup, so the replica can still see it expire; minting inside the forward path gives each replica request its full lifetime. Minting stays unconditional rather than forwarding a still-valid incoming JWT, which could expire in flight and reintroduce the failure. The cost is a key rotation constraint: a new write signing key must be verify-only on every volume server before any server makes it current. The base file ID trim moves into one helper so the authorization check, the expiry classification and the mint cannot disagree on which file ID a write JWT covers.