]> git.proxmox.com Git - proxmox.git/log
proxmox.git
5 years agotools: daemon: add a default signalfd helper
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>
5 years agotools: add daemon helpers
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>
5 years agosrc/tools/ticket.rs: define const TICKET_LIFETIME
Dietmar Maurer [Tue, 5 Mar 2019 11:52:39 +0000 (12:52 +0100)]
src/tools/ticket.rs: define const TICKET_LIFETIME

5 years agosrc/tools/file_logger.rs: class to log into files
Dietmar Maurer [Fri, 1 Mar 2019 08:34:29 +0000 (09:34 +0100)]
src/tools/file_logger.rs: class to log into files

5 years agorc/server/rest.rs: allow to pass parameters as application/json
Dietmar Maurer [Wed, 27 Feb 2019 11:12:00 +0000 (12:12 +0100)]
rc/server/rest.rs: allow to pass parameters as application/json

5 years agocleanup
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>
5 years agosrc/server/rest.rs: correctly insert NoLogExtension()
Dietmar Maurer [Mon, 18 Feb 2019 05:54:12 +0000 (06:54 +0100)]
src/server/rest.rs: correctly insert NoLogExtension()

5 years agosrc/server/rest.rs: get_index() include username and CSRF token
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.

5 years agosrc/server/rest.rs: factor our normalize_path()
Dietmar Maurer [Sun, 17 Feb 2019 16:31:53 +0000 (17:31 +0100)]
src/server/rest.rs: factor our normalize_path()

5 years agosrc/server/rest.rs: improve logs for unauthorized request
Dietmar Maurer [Sun, 17 Feb 2019 16:18:44 +0000 (17:18 +0100)]
src/server/rest.rs: improve logs for unauthorized request

5 years agoimprove api_schema module structure
Dietmar Maurer [Sun, 17 Feb 2019 09:16:33 +0000 (10:16 +0100)]
improve api_schema module structure

5 years agorename src/api to src/api_schema
Dietmar Maurer [Sun, 17 Feb 2019 08:59:20 +0000 (09:59 +0100)]
rename src/api to src/api_schema

5 years agocleanup auth code, verify CSRF prevention token
Dietmar Maurer [Sat, 16 Feb 2019 14:52:55 +0000 (15:52 +0100)]
cleanup auth code, verify CSRF prevention token

5 years agoserver/rest.rs: add method to log message
Dietmar Maurer [Fri, 15 Feb 2019 09:16:12 +0000 (10:16 +0100)]
server/rest.rs: add method to log message

5 years agoserver/rest.rs: log full error messages
Dietmar Maurer [Fri, 15 Feb 2019 08:55:12 +0000 (09:55 +0100)]
server/rest.rs: log full error messages

5 years agoserver/rest.rs: use a protocol extension to avoid double log
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.

5 years agoavoid double logging of proxied requests
Dietmar Maurer [Thu, 14 Feb 2019 12:28:41 +0000 (13:28 +0100)]
avoid double logging of proxied requests

5 years agosrc/server/rest.rs: log failed requests
Dietmar Maurer [Thu, 14 Feb 2019 12:07:34 +0000 (13:07 +0100)]
src/server/rest.rs: log failed requests

5 years agosrc/client/http_client.rs: try to login
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)

5 years agoremove some rather inconvenient debug output
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>
5 years agoimplement relead_timezone flag
Dietmar Maurer [Fri, 1 Feb 2019 08:54:56 +0000 (09:54 +0100)]
implement relead_timezone flag

5 years agodelay unauthorized request (rate limit)
Dietmar Maurer [Thu, 31 Jan 2019 13:34:21 +0000 (14:34 +0100)]
delay unauthorized request (rate limit)

5 years agomove http error class to router.rs
Dietmar Maurer [Thu, 31 Jan 2019 12:22:30 +0000 (13:22 +0100)]
move http error class to router.rs

5 years agoserver/rest.rs: verify auth cookie
Dietmar Maurer [Thu, 31 Jan 2019 11:22:00 +0000 (12:22 +0100)]
server/rest.rs: verify auth cookie

5 years agoUtils.js: fix cookie handling
Dietmar Maurer [Thu, 31 Jan 2019 09:08:08 +0000 (10:08 +0100)]
Utils.js: fix cookie handling

Use unsecure cookie foör testing.

5 years agoapi2/access.rs: add ticket api
Dietmar Maurer [Wed, 30 Jan 2019 14:14:20 +0000 (15:14 +0100)]
api2/access.rs: add ticket api

5 years agoserver/rest.rs: simplify proxy code
Dietmar Maurer [Mon, 28 Jan 2019 17:22:16 +0000 (18:22 +0100)]
server/rest.rs: simplify proxy code

Only pass neccessary parameters.

5 years agoserver/rest.rs: implement proxy_sync_api_request
Dietmar Maurer [Mon, 28 Jan 2019 17:06:42 +0000 (18:06 +0100)]
server/rest.rs: implement proxy_sync_api_request

5 years agoserver/rest.rs: add proxy_sync_api_request() dummy
Dietmar Maurer [Mon, 28 Jan 2019 16:30:39 +0000 (17:30 +0100)]
server/rest.rs: add proxy_sync_api_request() dummy

5 years agoserver/formatter.rs: fix extjs error format
Dietmar Maurer [Mon, 28 Jan 2019 12:44:48 +0000 (13:44 +0100)]
server/formatter.rs: fix extjs error format

5 years agosrc/bin/proxmox-backup-proxy.rs: implement unpriviledged server
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.

5 years agoRpcEnvironment: implement set_user() and get_user()
Dietmar Maurer [Sun, 27 Jan 2019 09:42:45 +0000 (10:42 +0100)]
RpcEnvironment: implement set_user() and get_user()

5 years agoRpcEnvironment: add environment type enum RpcEnvironmentType
Dietmar Maurer [Sun, 27 Jan 2019 09:33:42 +0000 (10:33 +0100)]
RpcEnvironment: add environment type enum RpcEnvironmentType

5 years agoalso pass rpcenv to async handlers
Dietmar Maurer [Sun, 27 Jan 2019 09:18:52 +0000 (10:18 +0100)]
also pass rpcenv to async handlers

5 years agomove rpc environment implementation to separate files
Dietmar Maurer [Sat, 26 Jan 2019 14:08:02 +0000 (15:08 +0100)]
move rpc environment implementation to separate files

5 years agoapi: pass RpcEnvirnment to api handlers
Dietmar Maurer [Sat, 26 Jan 2019 13:50:37 +0000 (14:50 +0100)]
api: pass RpcEnvirnment to api handlers

5 years agoserver/rest.rs: fake login cookie
Dietmar Maurer [Wed, 23 Jan 2019 11:49:10 +0000 (12:49 +0100)]
server/rest.rs: fake login cookie

5 years agorename api3 back to api2
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).

5 years agoremove crate tokio-codec (seems to be part of tokio now)
Dietmar Maurer [Sun, 20 Jan 2019 13:28:06 +0000 (14:28 +0100)]
remove crate tokio-codec (seems to be part of tokio now)

5 years agoapi/router.rs: rename ApiUploadMethod to ApiAsyncMethod
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 ...

5 years agoapi3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox...
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")

5 years agoapi/router.rs: return Result in upload handler
Dietmar Maurer [Thu, 17 Jan 2019 11:03:38 +0000 (12:03 +0100)]
api/router.rs: return Result in upload handler

5 years agoserver/rest.rs: correctly pass query/url parameters
Dietmar Maurer [Wed, 16 Jan 2019 12:58:36 +0000 (13:58 +0100)]
server/rest.rs: correctly pass query/url parameters

5 years agoapi3/admin/datastore/upload_catar.rs: implement upload future
Dietmar Maurer [Tue, 15 Jan 2019 10:38:26 +0000 (11:38 +0100)]
api3/admin/datastore/upload_catar.rs: implement upload future

5 years agoapi/router.rs: allow different types of api methods
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.

5 years agorest: rename utf-8-checked 'bytes' to 'utf8'
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>
5 years agorest: don't copy the body
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>
5 years agosimplify formatter code
Dietmar Maurer [Wed, 5 Dec 2018 17:22:56 +0000 (18:22 +0100)]
simplify formatter code

5 years agoadd output formatter
Dietmar Maurer [Wed, 5 Dec 2018 11:42:25 +0000 (12:42 +0100)]
add output formatter

5 years agomove src/api/server.rs -> src/server/rest.rs
Dietmar Maurer [Wed, 5 Dec 2018 09:16:23 +0000 (10:16 +0100)]
move src/api/server.rs -> src/server/rest.rs

5 years agostart the GUI
Dietmar Maurer [Tue, 4 Dec 2018 16:53:10 +0000 (17:53 +0100)]
start the GUI

5 years agoset content type for static file download
Dietmar Maurer [Sun, 2 Dec 2018 10:00:52 +0000 (11:00 +0100)]
set content type for static file download

5 years agofix file download, listen to 0.0.0.0
Dietmar Maurer [Sat, 1 Dec 2018 14:21:25 +0000 (15:21 +0100)]
fix file download, listen to 0.0.0.0

5 years agoremove www/pbs-index.html.tt, hardcode into rust for now
Dietmar Maurer [Sat, 1 Dec 2018 12:37:49 +0000 (13:37 +0100)]
remove www/pbs-index.html.tt, hardcode into rust for now

5 years agorouter: no need to use Fn (fn also works for static closures)
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)

5 years agohandle uri parameters correctly
Dietmar Maurer [Fri, 16 Nov 2018 08:15:33 +0000 (09:15 +0100)]
handle uri parameters correctly

5 years agoallow closure handlers
Dietmar Maurer [Thu, 15 Nov 2018 16:47:59 +0000 (17:47 +0100)]
allow closure handlers

5 years agocleanup module names
Dietmar Maurer [Thu, 15 Nov 2018 16:07:10 +0000 (17:07 +0100)]
cleanup module names