3 Commits

Author SHA1 Message Date
Albert Esteve
fc6e58d9e6 reuse: addheader test/*.py
Add SPDX header to python files with
the 'py' extension in the test directory.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-10-18 13:04:20 +02:00
Nir Soffer
d5e9c757e0 http: Configurable inactivity timeout
We used 60 seconds timeout for disconnecting inactive clients. This is
too long to protect from bad clients leaving open connections, and too
short for applications that need long timeout[1].

Change the default timeout to 15 seconds, configurable via
daemon:auth_timeout. This timeout is used for new unauthorized
connections. If a connection does not authorize within this timeout, it
is disconnected.

When a connection is authorized during the first request, the connection
timeout is increased to ticket.inactivity_timeout. The default value is
60 seconds, configurable via daemon:inactivity_timeout.

Application with special needs can request a larger timeout when
creating an image transfer. Engine need to include the transfer
inactivity timeout in the ticket.

[1] https://bugzilla.redhat.com/2032324

Fixes #14.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-12-20 21:13:12 +02:00
Nir Soffer
e504bd9f86 admin: Add admin library and command
Add ovirt_imageio.admin python library for controlling the imageio
daemon. The library provides the Client class, supporting adding,
getting or deleting tickets. This library will replace the code in vdsm
for manipulating tickets.

The new ovirt-imageioctl command uses the admin library to manipulate
tickets, providing way to manage tickets manually. This will be useful
to test the Go client.

The library and the command also make it possible to use the
ovirt-imageio service on any host without oVirt installation. One use
case can be a container image, starting a daemon for single image. The
container startup script can install a ticket using the ovirt-imageioctl
command.

Change-Id: I2cc209f4a27d8b4a1021e49c214b7f1f7f229915
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-11-01 00:08:38 +02:00