Files
seaweedfs/seaweed-worker/crates
Martijn HoekstraandClaude Opus 5.5 411ab1d920 worker(rs): refuse short JWT keys under fips.mode strict (#13284)
* worker(rs): refuse short JWT keys under fips.mode strict

weed-worker, weed-vector and weed-vector-cli now check the JWT keys of the
security.toml they read, as every Go process does: under fips.mode strict
each exits at startup naming every key shorter than the 14 characters FIPS
140 needs for HMAC keys, with the rule and messages of
seaweed_common::jwt_keys (#13206); outside strict mode each such key but a
previous_key gets a warning. A filer signing key given on the command line
(--filer-signing-key, WEED_FILER_SIGNING_KEY) is checked the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* worker(rs): warn about a short signing key flag outside strict mode

A filer signing key given by --filer-signing-key or WEED_FILER_SIGNING_KEY
was checked only under fips.mode strict; outside it, a key strict mode
would refuse now gets the warning a short key in security.toml gets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: start the worker binaries with short keys under fips.mode strict

Integration tests start the built weed-worker, weed-vector and
weed-vector-cli under WEED_FIPS_MODE=strict with a 10-byte key in
security.toml, or a short --filer-signing-key, and check that each exits
naming the key. They run in the existing cargo test jobs and need no
cluster: the check comes before the binaries dial anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:24:14 -08:00
..