previewuser.rst 2.1 KB
Newer Older
1
.. index::
Andri Steiner's avatar
Andri Steiner committed
2
   triple: Website; Advanced; Preview User
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
   :name: website-advanced-previewuser

============
Preview User
============

On all non PROD contexts, we configure basic authentication in front
of your website. This will ensure that there is no content leaked
into the world coming from one of your internal websites.

Default User
============

The default username is called `preview`. You can set the desired
password in the `Preview password` field by either:

* generate a new, random password through the `Generate` button
* hash your desired password through with the `htpasswd` utility

Change Username
===============

Per Website
-----------

You can change the default username `preview` to a value of your own
by setting the ``preview_username`` string within the
`Custom JSON` :ref:`customjson_website`:

.. code-block:: json

   {
     "preview_username": "mypreviewusername"
   }

Globally
39
--------
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

To change the default username for all websites on a given server,
you can override the value ``website::preview_username`` within the
`Custom JSON` :ref:`customjson_server`:

.. code-block:: json

   {
     "website::preview_username": "myglobalpreviewusername"
   }

Additional Users
================

To add additional users for all websites on a given server,
you can set the ``website::users`` hash within the
`Custom JSON` :ref:`customjson_server`:

.. code-block:: json

  {
    "website::users": {
      "alice": {
        "preview": "$apr1$RXDs3l18$w0VJrVN5uoU6DMY.0xgTr/"
      },
      "bob": {
        "preview": "$apr1$RSDdas2323$23case23DCDMY.0xgTr/"
      }
    }
  }

.. tip::

   Add such additional users for yourself and your co-workers. You can use
   your own login on every website then.

Disable Authentication
======================

You can disable the authentication altogether by de-selecting `Enable preview auth`
on the websites `Advanced` tab.

.. warning::

   After deselecting preview auth, the website will be reachable from everywhere.
   Make sure you do not leak private informations. Often, there are better suited
   alternatives like open access for certain ip address ranges only.