]>
git.proxmox.com Git - proxmox.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Wolfgang Bumiller [Thu, 25 Apr 2019 08:35:01 +0000 (08:35 +0000)]
tools/daemon: add sd_notify wrapper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Apr 2019 08:36:04 +0000 (10:36 +0200)]
api_schema: allow generic api handler functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 11 Apr 2019 08:51:59 +0000 (10:51 +0200)]
src/server/command_socket.rs: check control socket permissions
Wolfgang Bumiller [Wed, 10 Apr 2019 13:17:11 +0000 (15:17 +0200)]
tools/daemon: dup the TcpListener file descriptor
Now that we let hyper shutdown gracefully we need an owned
version of the listening socket to prevent it from closing
before running the reload preparations.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 10 Apr 2019 10:42:24 +0000 (12:42 +0200)]
src/server/worker_task.rs: implement abort_worker (via command_socket)
Dietmar Maurer [Wed, 10 Apr 2019 09:05:00 +0000 (11:05 +0200)]
src/server/command_socket.rs: correctly handle/spawn handle parallel connections
Dietmar Maurer [Wed, 10 Apr 2019 07:03:17 +0000 (09:03 +0200)]
src/server/worker_task.rs: use abstract socket
Dietmar Maurer [Wed, 10 Apr 2019 06:24:32 +0000 (08:24 +0200)]
start hyper server using with_graceful_shutdown()
Without, hyper keeps some futures running, and the server does not
correctly shutdown.
Dietmar Maurer [Tue, 9 Apr 2019 10:47:42 +0000 (12:47 +0200)]
src/server/command_socket.rs: code cleanup - fix error message
Dietmar Maurer [Tue, 9 Apr 2019 09:47:23 +0000 (11:47 +0200)]
src/server/command_socket.rs: implement auto_remove flag
Remove the socket file on close.
Dietmar Maurer [Mon, 8 Apr 2019 15:59:39 +0000 (17:59 +0200)]
src/server/command_socket.rs: simple command socket
Dietmar Maurer [Mon, 8 Apr 2019 12:00:23 +0000 (14:00 +0200)]
src/tools/daemon.rs: use new ServerState handler
Dietmar Maurer [Mon, 8 Apr 2019 10:21:29 +0000 (12:21 +0200)]
implement server state/signal handling, depend on tokio-signal
Dietmar Maurer [Sat, 6 Apr 2019 09:24:37 +0000 (11:24 +0200)]
src/tools/file_logger.rs: fix test
Dietmar Maurer [Sat, 6 Apr 2019 07:17:25 +0000 (09:17 +0200)]
src/server.rs: improve crate layout
Dietmar Maurer [Wed, 3 Apr 2019 12:13:33 +0000 (14:13 +0200)]
src/tools/file_logger.rs: new - accept AsRef<Path>
Dietmar Maurer [Wed, 3 Apr 2019 06:58:43 +0000 (08:58 +0200)]
src/tools/file_logger.rs: change timestamp format to rfc3339
Dietmar Maurer [Mon, 1 Apr 2019 10:03:47 +0000 (12:03 +0200)]
add global var to indicate server shutdown requests
Dietmar Maurer [Mon, 1 Apr 2019 06:04:12 +0000 (08:04 +0200)]
src/server/rest.rs: use formatter to encode errors
Dietmar Maurer [Mon, 1 Apr 2019 05:52:30 +0000 (07:52 +0200)]
src/server/rest.rs: generate csrf token if we have a valid ticket
This is important if the user reloads the browser page.
Dietmar Maurer [Tue, 19 Mar 2019 11:50:15 +0000 (12:50 +0100)]
src/server/rest.rs: correctly extract content type
Wolfgang Bumiller [Mon, 18 Mar 2019 13:13:44 +0000 (14:13 +0100)]
daemon: simplify daemon creation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 18 Mar 2019 12:44:37 +0000 (13:44 +0100)]
tools: daemon: rename some structs
Reloadable resources are now 'Reloadable' instead of
'ReexecContinue'.
The struct handling the reload is a 'Reloader', not a
'ReexecStore'.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 18 Mar 2019 10:52:04 +0000 (11:52 +0100)]
tools: implement ReexecContinue for tokio's TcpListener
This is the only thing we currently need to keep alive for
reloads.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 18 Mar 2019 10:50:10 +0000 (11:50 +0100)]
tools: daemon: add a default signalfd helper
Proxy and daemon for now just want to handle reload via
`SIGHUP`, so provide a helper creating the signalfd stream
doing that - this is simply a filtered stream which passes
the remaining signals through, so it can be used exactly
like the signalfd stream could before to add more signals.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Mar 2019 09:40:25 +0000 (10:40 +0100)]
tools: add daemon helpers
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Tue, 5 Mar 2019 11:52:39 +0000 (12:52 +0100)]
src/tools/ticket.rs: define const TICKET_LIFETIME
Dietmar Maurer [Fri, 1 Mar 2019 08:34:29 +0000 (09:34 +0100)]
src/tools/file_logger.rs: class to log into files
Dietmar Maurer [Wed, 27 Feb 2019 11:12:00 +0000 (12:12 +0100)]
rc/server/rest.rs: allow to pass parameters as application/json
Wolfgang Bumiller [Mon, 18 Feb 2019 12:21:25 +0000 (13:21 +0100)]
cleanup
Error::from is already a function taking 1 parameter,
there's no need to wrap it with `|e| Error::from(e)`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Mon, 18 Feb 2019 05:54:12 +0000 (06:54 +0100)]
src/server/rest.rs: correctly insert NoLogExtension()
Dietmar Maurer [Sun, 17 Feb 2019 17:50:40 +0000 (18:50 +0100)]
src/server/rest.rs: get_index() include username and CSRF token
When we have an valid ticket. Also delay get_index() if called with
an invalid ticket.
Dietmar Maurer [Sun, 17 Feb 2019 16:31:53 +0000 (17:31 +0100)]
src/server/rest.rs: factor our normalize_path()
Dietmar Maurer [Sun, 17 Feb 2019 16:18:44 +0000 (17:18 +0100)]
src/server/rest.rs: improve logs for unauthorized request
Dietmar Maurer [Sun, 17 Feb 2019 09:16:33 +0000 (10:16 +0100)]
improve api_schema module structure
Dietmar Maurer [Sun, 17 Feb 2019 08:59:20 +0000 (09:59 +0100)]
rename src/api to src/api_schema
Dietmar Maurer [Sat, 16 Feb 2019 14:52:55 +0000 (15:52 +0100)]
cleanup auth code, verify CSRF prevention token
Dietmar Maurer [Fri, 15 Feb 2019 09:16:12 +0000 (10:16 +0100)]
server/rest.rs: add method to log message
Dietmar Maurer [Fri, 15 Feb 2019 08:55:12 +0000 (09:55 +0100)]
server/rest.rs: log full error messages
Dietmar Maurer [Thu, 14 Feb 2019 15:04:24 +0000 (16:04 +0100)]
server/rest.rs: use a protocol extension to avoid double log
Instead of modifying the response header itself.
Dietmar Maurer [Thu, 14 Feb 2019 12:28:41 +0000 (13:28 +0100)]
avoid double logging of proxied requests
Dietmar Maurer [Thu, 14 Feb 2019 12:07:34 +0000 (13:07 +0100)]
src/server/rest.rs: log failed requests
Dietmar Maurer [Wed, 13 Feb 2019 13:31:43 +0000 (14:31 +0100)]
src/client/http_client.rs: try to login
use an environment var to store passphrase (PBS_PASSWORD)
Wolfgang Bumiller [Mon, 4 Feb 2019 14:34:38 +0000 (15:34 +0100)]
remove some rather inconvenient debug output
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 1 Feb 2019 08:54:56 +0000 (09:54 +0100)]
implement relead_timezone flag
Dietmar Maurer [Thu, 31 Jan 2019 13:34:21 +0000 (14:34 +0100)]
delay unauthorized request (rate limit)
Dietmar Maurer [Thu, 31 Jan 2019 12:22:30 +0000 (13:22 +0100)]
move http error class to router.rs
Dietmar Maurer [Thu, 31 Jan 2019 11:22:00 +0000 (12:22 +0100)]
server/rest.rs: verify auth cookie
Dietmar Maurer [Thu, 31 Jan 2019 09:08:08 +0000 (10:08 +0100)]
Utils.js: fix cookie handling
Use unsecure cookie foör testing.
Dietmar Maurer [Wed, 30 Jan 2019 14:14:20 +0000 (15:14 +0100)]
api2/access.rs: add ticket api
Dietmar Maurer [Mon, 28 Jan 2019 17:22:16 +0000 (18:22 +0100)]
server/rest.rs: simplify proxy code
Only pass neccessary parameters.
Dietmar Maurer [Mon, 28 Jan 2019 17:06:42 +0000 (18:06 +0100)]
server/rest.rs: implement proxy_sync_api_request
Dietmar Maurer [Mon, 28 Jan 2019 16:30:39 +0000 (17:30 +0100)]
server/rest.rs: add proxy_sync_api_request() dummy
Dietmar Maurer [Mon, 28 Jan 2019 12:44:48 +0000 (13:44 +0100)]
server/formatter.rs: fix extjs error format
Dietmar Maurer [Mon, 28 Jan 2019 12:17:03 +0000 (13:17 +0100)]
src/bin/proxmox-backup-proxy.rs: implement unpriviledged server
We want to run the public server as user www-data. Requests needing
root priviledges needs to be proxied to the proxmox-backup.service, which
now listens to 127.0.0.1:82.
Dietmar Maurer [Sun, 27 Jan 2019 09:42:45 +0000 (10:42 +0100)]
RpcEnvironment: implement set_user() and get_user()
Dietmar Maurer [Sun, 27 Jan 2019 09:33:42 +0000 (10:33 +0100)]
RpcEnvironment: add environment type enum RpcEnvironmentType
Dietmar Maurer [Sun, 27 Jan 2019 09:18:52 +0000 (10:18 +0100)]
also pass rpcenv to async handlers
Dietmar Maurer [Sat, 26 Jan 2019 14:08:02 +0000 (15:08 +0100)]
move rpc environment implementation to separate files
Dietmar Maurer [Sat, 26 Jan 2019 13:50:37 +0000 (14:50 +0100)]
api: pass RpcEnvirnment to api handlers
Dietmar Maurer [Wed, 23 Jan 2019 11:49:10 +0000 (12:49 +0100)]
server/rest.rs: fake login cookie
Dietmar Maurer [Tue, 22 Jan 2019 11:10:38 +0000 (12:10 +0100)]
rename api3 back to api2
There is no real need to change the path, so using api2 we can reuse
all helpers (like tools from proxmox widget toolkit).
Dietmar Maurer [Sun, 20 Jan 2019 13:28:06 +0000 (14:28 +0100)]
remove crate tokio-codec (seems to be part of tokio now)
Dietmar Maurer [Sat, 19 Jan 2019 15:42:43 +0000 (16:42 +0100)]
api/router.rs: rename ApiUploadMethod to ApiAsyncMethod
We can use this for uploads and downloads ...
Dietmar Maurer [Thu, 17 Jan 2019 11:43:29 +0000 (12:43 +0100)]
api3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox-backup-catar")
Dietmar Maurer [Thu, 17 Jan 2019 11:03:38 +0000 (12:03 +0100)]
api/router.rs: return Result in upload handler
Dietmar Maurer [Wed, 16 Jan 2019 12:58:36 +0000 (13:58 +0100)]
server/rest.rs: correctly pass query/url parameters
Dietmar Maurer [Tue, 15 Jan 2019 10:38:26 +0000 (11:38 +0100)]
api3/admin/datastore/upload_catar.rs: implement upload future
Dietmar Maurer [Mon, 14 Jan 2019 11:26:04 +0000 (12:26 +0100)]
api/router.rs: allow different types of api methods
Added a prototype for file/backup uploads.
Wolfgang Bumiller [Tue, 8 Jan 2019 13:22:43 +0000 (14:22 +0100)]
rest: rename utf-8-checked 'bytes' to 'utf8'
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 8 Jan 2019 13:21:54 +0000 (14:21 +0100)]
rest: don't copy the body
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 5 Dec 2018 17:22:56 +0000 (18:22 +0100)]
simplify formatter code
Dietmar Maurer [Wed, 5 Dec 2018 11:42:25 +0000 (12:42 +0100)]
add output formatter
Dietmar Maurer [Wed, 5 Dec 2018 09:16:23 +0000 (10:16 +0100)]
move src/api/server.rs -> src/server/rest.rs
Dietmar Maurer [Tue, 4 Dec 2018 16:53:10 +0000 (17:53 +0100)]
start the GUI
Dietmar Maurer [Sun, 2 Dec 2018 10:00:52 +0000 (11:00 +0100)]
set content type for static file download
Dietmar Maurer [Sat, 1 Dec 2018 14:21:25 +0000 (15:21 +0100)]
fix file download, listen to 0.0.0.0
Dietmar Maurer [Sat, 1 Dec 2018 12:37:49 +0000 (13:37 +0100)]
remove www/pbs-index.html.tt, hardcode into rust for now
Dietmar Maurer [Fri, 16 Nov 2018 10:12:00 +0000 (11:12 +0100)]
router: no need to use Fn (fn also works for static closures)
Dietmar Maurer [Fri, 16 Nov 2018 08:15:33 +0000 (09:15 +0100)]
handle uri parameters correctly
Dietmar Maurer [Thu, 15 Nov 2018 16:47:59 +0000 (17:47 +0100)]
allow closure handlers
Dietmar Maurer [Thu, 15 Nov 2018 16:07:10 +0000 (17:07 +0100)]
cleanup module names