mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #9] token expiration (http backend) #3
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#3
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 @CompileNix on GitHub (Jan 24, 2020).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/9
Originally assigned to: @jhollowe on GitHub.
I'm writing a tool which may run for several hours. It seems that the api access token times out at some point.
Do you think proxmoxer should detect that and try to aquire a new api access token by itself?
This would require that proxmoxer would need to keep username and password in memory permanently, while the instance of proxmoxer exists.
@elurex commented on GitHub (Feb 12, 2020):
this is a much needed feature or otherwise the process need to be killed and started like every 2 hours or so which cause chaos when there are process are actually calling api gets killed as well
@CompileNix commented on GitHub (Feb 12, 2020):
I've already implemented this in an internal fork and is working well for me.
I'll create a PR for this soon.
@CompileNix commented on GitHub (Apr 16, 2020):
PR has been created: #12
@jhollowe commented on GitHub (Apr 21, 2020):
@compilenix @elurex Are your scripts consistently using the connection (at least once every 2 hours) or are they sitting idle most of the time?
@CompileNix commented on GitHub (Apr 22, 2020):
My script is using the connection between 1 - 8 times a day, Idle time between requests can range from 1 to 24 hours.
Regarding #16: While i like the aproach of recreating the access token without the password, this would currently not resolve the original issue i had.
Suppose you have a service running which only performs requests to the proxmox api couple times a day, the access token / cookie would expire between two api calls and the service would need to recreate the proxmoxer object instance or restarting the whole service.
Two further ideas i have to add:
@jhollowe commented on GitHub (Apr 22, 2020):
Yeah, I like the prospects of the first idea. I'll add that to #16 in a bit.
@jhollowe commented on GitHub (Apr 22, 2020):
@compilenix can you try out the PR for a few days with the long_running flag and see if it works for your use case?
@CompileNix commented on GitHub (May 3, 2020):
I'm really busy lately, i'm trying to test this by next week :)
@jhollowe commented on GitHub (May 15, 2020):
would using the api tokens (#10) fill the need for this? It seems like that would be better than storing the password and is designed to have better access control.
@CompileNix commented on GitHub (May 15, 2020):
It seems like it, if api tokens are working as i think they will be this issue, #12 and #16 would be obsolete and could be closed.