Files
seaweedfs/weed/command
f079b68f2b filer: grpc_require_token with authenticated filer-to-filer peer calls (#13011)
* filer: require bearer tokens for configured gRPC calls

* filer: authenticate owned peer RPCs with per-call admin tokens

* filer: retain scoped forwarding refusals with required authentication

* filer: preserve tokenless HTTP forwarding outside require mode

* filer: honor clock tolerance for gRPC admin fallback

* filer: preserve caller token on lock owner forwards

* filer: forward caller auth on target ping

* filer: authenticate startup peer digest checks

* filer: verify required subscription bearers independently of mTLS

* filer: assert exact caller bearer on forwarded ping

* filer: sign peer tokens with the gRPC verification key

peerContext signed filer-owned RPCs with jwt.filer_signing.key only. With
grpc_key as the only key and require-mode on, peer calls went out tokenless
and were refused. With both keys set, peers that verify with grpc_key and
lack the shared-key admin fallback refused the shared-key token even with
require-mode off. Sign with the key filesystem gRPC verifies, and keep the
shared key for metadata subscriptions, whose verifier accepts admin tokens
signed only with it.

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

* filer: keep a subscription token's scope over mTLS in require-mode

Require-mode admitted a dedicated subscription bearer without the mTLS
shortcut, but the handler re-checked it with the certificate, which
granted the full stream past the token's prefixes and expiry.

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

* filer: delete uploaded chunks when the write owner refuses authentication

A forwarded HTTP append or offset write that the owner refused as
Unauthenticated kept its new chunks as if the outcome were unknown,
orphaning them.

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

* filer: hand the admitted subscription scope to the handler

The handler re-verified a dedicated subscription token after reading the
request. If the token expired in between, an mTLS peer fell back to the
certificate and got an unrestricted stream. The interceptor now passes
the scope it admitted, and the handler refuses it once expired.

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

* filer: accept grpc_key admin tokens on metadata subscriptions

A filer with only grpc_key signs peer subscriptions with it, but the
subscription verifier checked admin tokens against the shared key only,
so with a subscribe key set the aggregator's peer streams were refused.
An unscoped grpc_key token already has full filer gRPC access.

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

* filer: delete the generated manifest when the write owner refuses authentication

A forwarded HTTP append that crossed the manifest threshold left the
manifest blob it had uploaded orphaned when the owner refused the call
as Unauthenticated. The blob alone is deleted, since the manifest also
lists committed chunks.

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

---------

Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 08:18:28 -08:00
..
2026-02-20 18:42:00 -08:00
2025-10-13 18:05:17 -07:00
2019-11-28 18:44:27 -08:00
2026-02-20 18:42:00 -08:00