You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(security): prevent silent inbound auth bypass in DistHTTPAuth (v2.0.1)
Previously, configuring `DistHTTPAuth` with only `ClientSign` (no `Token`
and no `ServerVerify`) flipped the internal `configured()` predicate to
true — causing the node to sign outbound traffic — while `verify()` had
no inbound material and silently accepted every request. An operator
wiring only one side of an HMAC scheme would end up with a
signed-out / open-in node that appeared authenticated.
Changes:
- Split the single `configured()` predicate into `inboundConfigured()`
(Token or ServerVerify present) and an outbound-specific check inside
`sign()`; `wrapAuth` now gates on `inboundConfigured()` only.
- Add `DistHTTPAuth.validate()`, called in `NewDistMemory`, that returns
`sentinel.ErrInsecureAuthConfig` when `ClientSign` is set without an
inbound verifier and the operator has not opted in.
- Add `DistHTTPAuth.AllowAnonymousInbound` as an explicit opt-in for
asymmetric signed-out / open-in deployments (e.g. inbound gated by an
L4 firewall or service mesh).
- Add `sentinel.ErrInsecureAuthConfig` sentinel error.
- Bump `github.com/valyala/fasthttp` to v1.71.0.
- Add three new integration tests:
`TestDistHTTPAuth_RejectsClientSignOnlyConfig`,
`TestDistHTTPAuth_AnonymousInboundOptIn`,
`TestDistHTTPAuth_TokenWithClientSignOverride`.
- Document all changes in CHANGELOG.md under [2.0.1].
- Remove stale `//nolint:revive` directives from histogram collector test.
BREAKING CHANGE: `NewDistMemory` now returns `sentinel.ErrInsecureAuthConfig`
for the previously-accepted `ClientSign`-only config. Operators relying on
that shape must either add `Token`/`ServerVerify` for inbound enforcement
or set `AllowAnonymousInbound: true`.
0 commit comments