From 4aef06f1b6857fc87f1e15352851316bb1f05cf0 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 30 Oct 2020 17:01:18 +0100 Subject: [PATCH] docs: add token example to client, and reformat a bit Signed-off-by: Thomas Lamprecht --- docs/backup-client.rst | 40 ++++++++++++++++++++-------------------- docs/user-management.rst | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/backup-client.rst b/docs/backup-client.rst index 7270a37e..c565073b 100644 --- a/docs/backup-client.rst +++ b/docs/backup-client.rst @@ -12,31 +12,31 @@ on the backup server. [[username@]server[:port]:]datastore -The default value for ``username`` is ``root@pam``. If no server is specified, +The default value for ``username`` is ``root@pam``. If no server is specified, the default is the local host (``localhost``). You can specify a port if your backup server is only reachable on a different port (e.g. with NAT and port forwarding). -Note that if the server is an IPv6 address, you have to write it with -square brackets (e.g. [fe80::01]). +Note that if the server is an IPv6 address, you have to write it with square +brackets (for example, `[fe80::01]`). -You can pass the repository with the ``--repository`` command -line option, or by setting the ``PBS_REPOSITORY`` environment -variable. +You can pass the repository with the ``--repository`` command line option, or +by setting the ``PBS_REPOSITORY`` environment variable. Here some examples of valid repositories and the real values -================================ ============ ================== =========== -Example User Host:Port Datastore -================================ ============ ================== =========== -mydatastore ``root@pam`` localhost:8007 mydatastore -myhostname:mydatastore ``root@pam`` myhostname:8007 mydatastore -user@pbs@myhostname:mydatastore ``user@pbs`` myhostname:8007 mydatastore -192.168.55.55:1234:mydatastore ``root@pam`` 192.168.55.55:1234 mydatastore -[ff80::51]:mydatastore ``root@pam`` [ff80::51]:8007 mydatastore -[ff80::51]:1234:mydatastore ``root@pam`` [ff80::51]:1234 mydatastore -================================ ============ ================== =========== +================================ ================= ================== =========== +Example User Host:Port Datastore +================================ ================= ================== =========== +mydatastore ``root@pam`` localhost:8007 mydatastore +myhostname:mydatastore ``root@pam`` myhostname:8007 mydatastore +user@pbs@myhostname:mydatastore ``user@pbs`` myhostname:8007 mydatastore +user@pbs!token@host:store ``user@pbs!token`` myhostname:8007 mydatastore +192.168.55.55:1234:mydatastore ``root@pam`` 192.168.55.55:1234 mydatastore +[ff80::51]:mydatastore ``root@pam`` [ff80::51]:8007 mydatastore +[ff80::51]:1234:mydatastore ``root@pam`` [ff80::51]:1234 mydatastore +================================ ================= ================== =========== Environment Variables --------------------- @@ -45,16 +45,16 @@ Environment Variables The default backup repository. ``PBS_PASSWORD`` - When set, this value is used for the password required for the - backup server. + When set, this value is used for the password required for the backup server. + You can also set this to a API token secret. ``PBS_ENCRYPTION_PASSWORD`` When set, this value is used to access the secret encryption key (if protected by password). ``PBS_FINGERPRINT`` When set, this value is used to verify the server - certificate (only used if the system CA certificates cannot - validate the certificate). + certificate (only used if the system CA certificates cannot validate the + certificate). Output Format diff --git a/docs/user-management.rst b/docs/user-management.rst index 3b629780..fb565253 100644 --- a/docs/user-management.rst +++ b/docs/user-management.rst @@ -102,7 +102,7 @@ API tokens serve two purposes: An API token consists of two parts: an identifier consisting of the user name, the realm and a tokenname (``user@realm!tokenname``), and a secret value. Both need to be provided to the client in place of the user ID (``user@realm``) and -the user password. +the user password, respectively. The API token is passed from the client to the server by setting the ``Authorization`` HTTP header with method ``PBSAPIToken`` to the value