* [pbs-devel] [PATCH proxmox-backup] http_client: keep renewal future running on failed re-auth
@ 2024-06-24 7:54 Hannes Laimer
2024-06-26 10:22 ` Fabian Grünbichler
2024-07-02 9:16 ` [pbs-devel] applied: " Wolfgang Bumiller
0 siblings, 2 replies; 3+ messages in thread
From: Hannes Laimer @ 2024-06-24 7:54 UTC (permalink / raw)
To: pbs-devel
The re-authentication request can also fail due to network instability,
and not necesarrily only due to an invalid ticket. In that case it makes
sense to retry refreshing the ticket in 15 minutes. Also, the future does
not depend on a failed re-authentication to be clean up properly, so that
happens already somewhere else, therefore we don't rely on this return
anyway. If the ticket is actually invalid or timed out, the main job
will fail and also terminate the renewal future, same applies if the
network is not just unstable but straight up not working.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
pbs-client/src/http_client.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
index 27e6ab5d..8ae5edaa 100644
--- a/pbs-client/src/http_client.rs
+++ b/pbs-client/src/http_client.rs
@@ -469,7 +469,6 @@ impl HttpClient {
}
Err(err) => {
log::error!("re-authentication failed: {}", err);
- return;
}
}
}
--
2.39.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] [PATCH proxmox-backup] http_client: keep renewal future running on failed re-auth
2024-06-24 7:54 [pbs-devel] [PATCH proxmox-backup] http_client: keep renewal future running on failed re-auth Hannes Laimer
@ 2024-06-26 10:22 ` Fabian Grünbichler
2024-07-02 9:16 ` [pbs-devel] applied: " Wolfgang Bumiller
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2024-06-26 10:22 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
there's a small typo in the commit message (necesarrily). in general, it
could have been structured a bit more readable ;) e.g.,
It is okay to treat a failure to refresh the authentication ticket as
non-fatal, since it is either spurious and other requests including the
next refresh will work (in which case, erroring out the whole client is
premature), or all requests will fail, in which case the client will
error out shortly anyway.
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
a second pair of eyes to ensure I haven't missed any peculiarity here
wouldn't hurt, since this is potentially security sensitive code, albeit
the chances should be low.
On June 24, 2024 9:54 am, Hannes Laimer wrote:
> The re-authentication request can also fail due to network instability,
> and not necesarrily only due to an invalid ticket. In that case it makes
> sense to retry refreshing the ticket in 15 minutes. Also, the future does
> not depend on a failed re-authentication to be clean up properly, so that
> happens already somewhere else, therefore we don't rely on this return
> anyway. If the ticket is actually invalid or timed out, the main job
> will fail and also terminate the renewal future, same applies if the
> network is not just unstable but straight up not working.
>
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> pbs-client/src/http_client.rs | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
> index 27e6ab5d..8ae5edaa 100644
> --- a/pbs-client/src/http_client.rs
> +++ b/pbs-client/src/http_client.rs
> @@ -469,7 +469,6 @@ impl HttpClient {
> }
> Err(err) => {
> log::error!("re-authentication failed: {}", err);
> - return;
> }
> }
> }
> --
> 2.39.2
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] http_client: keep renewal future running on failed re-auth
2024-06-24 7:54 [pbs-devel] [PATCH proxmox-backup] http_client: keep renewal future running on failed re-auth Hannes Laimer
2024-06-26 10:22 ` Fabian Grünbichler
@ 2024-07-02 9:16 ` Wolfgang Bumiller
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Bumiller @ 2024-07-02 9:16 UTC (permalink / raw)
To: Hannes Laimer; +Cc: pbs-devel
applied, thanks
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-02 9:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24 7:54 [pbs-devel] [PATCH proxmox-backup] http_client: keep renewal future running on failed re-auth Hannes Laimer
2024-06-26 10:22 ` Fabian Grünbichler
2024-07-02 9:16 ` [pbs-devel] applied: " Wolfgang Bumiller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox