mirror of
https://github.com/PegaProx/project-pegaprox.git
synced 2026-04-25 10:05:56 +03:00
[GH-ISSUE #9] Bug: Unable to use Proxmox API Tokens for Cluster Connection (401 Unauthorized) #6
Labels
No labels
Approved
Q2-3 2026 Development
bug
documentation
enhancement
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/project-pegaprox-PegaProx#6
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 @LarsGdk on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/PegaProx/project-pegaprox/issues/9
When attempting to add a Proxmox cluster using an API Token (format: user@pam!tokenid), the connection fails with a 401 Unauthorized error.
Technical Analysis: The current code in pegaprox_multi_cluster.py appears to hardcode the login process to the /api2/json/access/ticket endpoint, which only supports standard password authentication.
Python
Current problematic code snippet:
login_url = f"https://{host}:8006/api2/json/access/ticket"
resp = session.post(login_url, data=login_data, timeout=10)
Expected Behavior: The system should detect if an API Token is being used and instead send the token in the Authorization header (e.g., Authorization: PVEAPIToken=user@pam!tokenid=secret) rather than attempting a POST to the ticket endpoint.
Environment:
@mkellermann97 commented on GitHub (Jan 26, 2026):
Hi @LarsGdk ,
A fix has been implemented and will be included in version 0.6.2.
Regards,
Marcus
@mkellermann97 commented on GitHub (Jan 28, 2026):
Hi @LarsGdk LarsGdk,
Could you please update your PegaProx version?
Regards,
Marcus