Skip to content

Send the auth token to Cluster.MemberList - #127

Merged
belltoy merged 1 commit into
masterfrom
fix/member-list-token
Oct 19, 2026
Merged

belltoy merged 1 commit into
masterfrom
fix/member-list-token

Conversation

@belltoy

@belltoy belltoy commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Summary

The interceptor skipped the auth token for Cluster.MemberList. etcd 3.6 and later require it when authentication is enabled, so member_list() failed with etcdserver: user name is empty. Only Auth.Authenticate, which is how a token is obtained, is left without a token now. The server accepts the token on RPCs that do not require it.

 match (method.service(), method.method()) {
-    ("etcdserverpb.Auth", "Authenticate") | ("etcdserverpb.Cluster", "MemberList") => {}
+    ("etcdserverpb.Auth", "Authenticate") => {}
     (service, _) if service.starts_with("etcdserverpb") || .. => self.append_token(..),
     _ => {}
 }

Evidence

  • Before: member_list() with auth enabled, observed against Docker images:

    etcd result
    3.5.26 ok
    3.6.15 etcdserver: user name is empty
    3.7.2 etcdserver: user name is empty

    test_auth and test_auth_refresh_token fail on 3.6.15 and 3.7.2.

    After: test_auth* pass on 3.5.26, 3.6.15 and 3.7.2 (ETCD_AUTH_TOKEN_TTL=2, as in CI). Two new unit tests in intercept.rs check which RPCs get the token. cargo clippy --all-targets -D warnings passes.

Merge Danger

Door: two-way

Blast Radius: Cluster.MemberList on etcd with auth enabled

3.5 does not check the token on MemberList, so an expired token is not detected there and does not trigger a refresh. This is harmless for MemberList. 3.6.15 is the earliest 3.6.x I tested, so the exact 3.6 patch release that started requiring it is unknown. The full integration suite was not run on 3.6 / 3.7, only test_auth*.

🤖 Generated with Claude Code

The interceptor skipped the token for MemberList, but etcd 3.6 and
later require it when authentication is enabled and fail the request
with "etcdserver: user name is empty". Observed on 3.6.15 and 3.7.2,
while 3.5.26 accepts the call without a token. The server accepts the
token on the RPCs which do not require it, so only Authenticate, which
is how the token is obtained, is left without one.

Add unit tests for which RPCs get the token, and cover member_list with
auth enabled in the integration tests, including the token refresh.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@belltoy
belltoy merged commit fdeea13 into master Oct 19, 2026
28 checks passed
@belltoy
belltoy deleted the fix/member-list-token branch October 19, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant