mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6953] [Bug]: Remote panel update via mTLS node fails with HTTP 403 error #4599
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4599
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jamesliu96 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6953
Describe the bug
When attempting to trigger a remote panel update from a Node connected via mTLS without providing a Bearer Token, the request fails with an error. Other remote API endpoints functioning over mTLS appear to work normally.
How to reproduce the problem
/panel/api/nodes/updatePanelAPI response failing:Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.11.0
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Debian 13
Which parts of the panel are affected?
Multi-node (sub-nodes)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Oct 26, 2026):
This 403 is intended since v3.11.0. A node connected over mTLS with no bearer token is treated as a
node-syncidentity, andnode-syncis not allowed to start a panel self-update. To update that node from the master, create an API token with thenode-adminscope on the node, then paste it into the master's API token field for that node. Keep the TLS verify mode onmtls. The client certificate still authenticates the connection, and thenode-adminbearer raises the request so it can callupdatePanel.Why it happens
On the node,
checkAPIAuthgives a verified client certificate thenode-syncscope. Only anode-adminbearer token raises that scope (internal/web/controller/api.go:51-58):/server/updatePanelappears only innodeAdminScopeAllow(api.go:127-129). It is not innodeSyncScopeAllow(api.go:99-125), soenforceTokenScoperejects the request with exactly the message you saw (api.go:153-158).On the master,
/panel/api/nodes/updatePanel(internal/web/controller/node.go:335) callsRemote.UpdatePanel, which sendsPOST panel/api/server/updatePanelto the node (internal/web/runtime/remote.go:713-719).Remote.doaddsAuthorization: Bearer …only when the node has a token stored (remote.go:267-273). A token is optional in mTLS mode (remote.go:214-216), so a node with no token reaches the node as plainnode-syncand gets the 403. Other endpoints work because they are all in thenode-syncallowlist.The gap that is real
The behaviour is deliberate, but the multi-node guide does not mention it.
docs/content/docs/en/operations/multi-node.mdx:26says the API token is "not needed in mTLS mode". Lines 65-66 say "The master now presents a client certificate instead of an API token." Neither line says that Update panel still needs anode-admintoken on an mTLS node. That requirement is documented only indocs/architecture.md:358-361and the API reference. I have relabelled this as documentation and left it open for that.Verdict: Not a bug (expected behaviour)
Severity: N/A
Confidence: High
Root cause: No defect.
checkAPIAuth(internal/web/controller/api.go:53-58) deliberately maps verified mTLS without anode-adminbearer tonode-sync, whichnodeSyncScopeAllowdoes not let call/server/updatePanel. Introduced on purpose ina8d0700b"fix(auth): add node-admin token scope for panel updates (#6666)", shipped in v3.11.0.Same class: None found.
nodeAdminScopeAllow(api.go:127-129) holds only/server/updatePanel, so no other endpoint is blocked for mTLS-only nodes this way.Already fixed: Not applicable
Duplicate of: None (related: PR #6666, which introduced the scope)
Evidence: The commit message for
a8d0700bsays "Allow only an explicit node-admin bearer to elevate a verified mTLS request."TestCheckAPIAuth_AcceptsVerifiedClientCert(internal/web/controller/api_auth_test.go:147) asserts that mTLS without a node-admin bearer gets 403 onupdatePanel.TestPanelUpdateRequiresNodeAdminScopepins the same message fornode-sync.docs/architecture.md:358-361: "On an mTLS connection, only a validnode-adminbearer elevates the request".Not determined: None
This reply was generated automatically; a maintainer may follow up.
@NikanZeyaei commented on GitHub (Oct 26, 2026):
Opened #6957, which documents this: the multi-node guide (en/zh/ru/fa) and the node form's mTLS hint now say that Update panel on an mTLS node needs an API token with the
node-adminscope.@jamesliu96 commented on GitHub (Oct 26, 2026):
Fair point.