Bug: Unable to use Proxmox API Tokens for Cluster Connection (401 Unauthorized)
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:
PegaProx Version: 0.6.1
Proxmox Version: 9.1.4
Hi @LarsGdk , A fix has been implemented and will be included in version 0.6.2.
Regards, Marcus
Hi @LarsGdk LarsGdk, Could you please update your PegaProx version? Regards, Marcus