API token permissions problem

iggy

New Member
Jan 23, 2024
5
0
1
Hi,
I'd like to monitor Proxmox VE (8.1.4) through zabbix monitoring, so I created user and associated API token. I gave permissions to API token:
/, /nodes, /nodes/node-1 and /vms as "PVEAuditor".
I still get 403 errors when getting parameters through API, like this:
"GET /api2/json/nodes/node-1/services HTTP/1.1" 403 13
"GET /api2/json/nodes/node-1/disks/list HTTP/1.1" 403 13
"GET /api2/json/nodes/node-1/status HTTP/1.1" 403 13
"GET /api2/json/nodes/node-1/disks/zfs HTTP/1.1" 403 13

For some reason I get 200 OK for this:
"GET /api2/json/nodes/node-1/storage HTTP/1.1" 200

Which permissions I must to add ?
 
I see "Privilege separation" checked in properties of Api token, though have no idea, what is it ?
Must I give user same permissions as for token ? (seems like no permissions at the moment)
 
I see "Privilege separation" checked in properties of Api token, though have no idea, what is it ?
Check the docs [1]
Must I give user same permissions as for token ? (seems like no permissions at the moment)
Exactly: an API token may have the same permissions as the user or less, but never more. If your user currently has no permissions, the effective permissions for the API key are none.

If it is still unclear, I suggest that you try to make it work with a user and then try with an API token.

[1] https://pve.proxmox.com/wiki/User_Management#pveum_tokens
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!