Difference for API key authentication between PVE and PBS

Nov 29, 2024
25
21
3
Hi, I am writing a script to monitor some PVE and PBS servers. I had some problems authenticating with an API key and finally found out that the separators between username and password are different for PVE and PBS:

Code:
curl -v -H 'Authorization: PVEAPIToken=root@pam!monitoring=aaaaaaaaa-bbb-cccc-dddd-ef0123456789' https://pve:8006/api2/json/
curl -v -H 'Authorization: PBSAPIToken=root@pam!monitoring:aaaaaaaaa-bbb-cccc-dddd-ef0123456789' https://pbs:8007/api2/json/

So you need to use an equals sign = to separate username and password for PVE, but a colon : for PBS. That's not a big issue, just annoying -- would it be possible to accept both on PBS to make things more consistent without breaking the current method?

I tried to find a feature request for this in bugzilla -- if there is one, please point me to it. If not, I'll open one.

Cheers, Andreas