53 lines
1.9 KiB
Markdown
53 lines
1.9 KiB
Markdown
---
|
|
id: "bug-1959"
|
|
status: "open"
|
|
status_updated: "2026-10-10"
|
|
status_note: "newly logged"
|
|
component: "xcecli"
|
|
severity: "security"
|
|
timestamp: "2026-10-10T10:15:59Z"
|
|
last_seen: "2026-10-10T10:15:59Z"
|
|
occurrences: 1
|
|
files: ["src/frontend/xcecli/cmd/auth"]
|
|
tags: ["xcecli", "security", "jwt"]
|
|
related: ["bug-1946"]
|
|
gitea_issue: 390
|
|
gitea_synced_status: "open"
|
|
gitea_synced_hash: "3ee2d40b62c8"
|
|
---
|
|
|
|
# bug-1959: xcecli logout only clears local config and never calls the logout API, so the token is not revoked
|
|
|
|
## Description
|
|
**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))
|
|
Reported by the bug-1946 fix: server-side token revocation exists (`POST /xce/v1/auth/logout`), but `xcecli logout` deletes the local token without calling it, so the token stays valid until expiry.
|
|
|
|
**Expected:** `xcecli logout` calls the logout API (best effort) before clearing local state.
|
|
**Impact:** Security: a CLI token survives logout.
|
|
**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)
|
|
## Environment
|
|
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
|
|
- libc: glibc 2.42-47 (dev shell; `xcecli` itself is a statically linked Go binary, CGO disabled)
|
|
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
|
|
- Build: asan (xce.build)
|
|
- Code: scheduler-framework @ 19be145d-dirty
|
|
- Deployment: any (found by source reading; confirmed by the RED test of the fix)
|
|
|
|
## Reproduction
|
|
1. `xcecli login`, copy the token, `xcecli logout`.
|
|
2. Call any API with the copied token: it succeeds.
|
|
- Frequency: deterministic (by code reading; confirmed by the RED test of the fix)
|
|
- Evidence: the code sites quoted in Description; no logs kept.
|
|
## Root cause
|
|
TODO: required for fixed/partial
|
|
|
|
## Fix
|
|
TODO: required for fixed/partial
|
|
|
|
## Verification
|
|
- Test: TODO: name + file; RED before the fix, GREEN after
|
|
- Suites: TODO: suite results and build profile
|
|
- Live: TODO: soak/deploy run, or n/a and why
|
|
|
|
## References
|
|
- Related: none
|