mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #48] Uploading isos with api key not possible #22
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#22
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 @lbckmnn on GitHub (Mar 13, 2021).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/48
I am not sure if this is an issue of proxmoxer or the API itself, but when i try to upload an iso with the following code:
I get the Exception:
When i pass upload_iso an ProxmoxAPI instance, which was created using a "normal" user, uploading the iso works just fine.
The iso itself is only a few Kbytes big and the permissions of the api token are the same as the permissions from the user.
Doing other actions, for example listing the content of a storage, are also no problem with the API Key.
@jhollowe commented on GitHub (Mar 21, 2021):
This is interesting. I'm thinking this is a PVE bug and not a proxmoxer bug, since we use the same upload code for either authentication method. Since a username/password login works, I would assume that this is not a local problem.
This PVE forum post might be what is going on, but I'm not sure since the username/password works and it is just the token that does not work.
@lbckmnn commented on GitHub (Mar 23, 2021):
Initially, I tried to upload a fairly large iso, but I also get the same exception if I try to upload a file which was created with:
So the iso is valid and about as small, as an iso can get.
Yes.
Proxmoxer: 1.1.1
PVE: 6.3-4
@encodeltd commented on GitHub (Apr 7, 2021):
Hi, I think this is the same thing that I spent a bit of time looking into a while ago. Basically, the REST API throws 501 Not Implemented, because this method is not implemented in the REST API and the API call only works via SSH/pvesh. I validated that by looking into the API code on my Proxmox node and then I switched my code to do the ISO uploads via SSH/pvesh and everything worked as expected. Hope this helps.
@jhollowe commented on GitHub (Apr 9, 2021):
@encodeltd yeah, that is what I was thinking was the problem, but @LukasBec said it worked with standard username/password auth, but not the API key. I'm thinking this is either a PVE issue or an issue with how we are handling API Tokens during a file upload.
@LukasBec could you try uploading a template using both auth methods? I would assume it would have the same issues, but I would like to just double-check.
I've created a related thread on the PVE forums for this issue.
@Fabian-Gruenbichler commented on GitHub (Apr 9, 2021):
(Proxmox dev here)
file uploads with an API token are not supported/implemented yet.
https://git.proxmox.com/?p=pve-manager.git;a=blob;f=PVE/HTTPServer.pm;h=64976c7cba3a50537911bab36e4e484aaf4fd586;hb=HEAD#l80
@jhollowe commented on GitHub (Apr 14, 2021):
I've created a Bugzilla bug for this issue as suggested on the forums.
I'll close this issue as this is a PVE issue and it will hopefully get resolved now that there is a bug filed for it.
@jhollowe commented on GitHub (May 1, 2021):
This issue is fixed in pve-manager >= 6.3-8