doc/book/pyramid/settings.rst
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Tue, 17 Mar 2020 13:29:08 +0100
branch3.27
changeset 12914 87c3562b3bae
parent 12792 e2cdb1be6bd9
permissions -rw-r--r--
[pkg] require python >= 3.4 This avoid pip pulling a version that does not run on python2 when using a python2 environment. Since we already released some 3.27 releases in pypi, I think we should release 3.27.3 and remove releases 3.27.2, 3.27.1 and 3.27.0 from pypi.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     1
Settings
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     2
========
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     3
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     4
.. _cubicweb_settings:
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     5
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     6
Cubicweb Settings
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     7
-----------------
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     8
11621
5747d4c2e083 [doc] update a bit the documentation
David Douard <david.douard@logilab.fr>
parents: 11605
diff changeset
     9
Pyramid CubicWeb will **not** make use of the configuration entries
5747d4c2e083 [doc] update a bit the documentation
David Douard <david.douard@logilab.fr>
parents: 11605
diff changeset
    10
found in the cubicweb configuration (a.k.a. `all-in-one.conf`) for any
5747d4c2e083 [doc] update a bit the documentation
David Douard <david.douard@logilab.fr>
parents: 11605
diff changeset
    11
pyramid related configuration value.
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    12
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    13
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    14
.. _pyramid_settings:
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    15
12098
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    16
Pyramid Settings file
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    17
---------------------
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    18
12098
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    19
In *backwards compatibility* mode, Pyramid settings will be looked for in a
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    20
``pyramid.ini`` file in the instance home directory (where the
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    21
``all-in-one.conf`` file is), its ``[main]`` section will be read and used as
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    22
the ``settings`` of the pyramid Configurator.
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    23
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    24
This configuration file is almost the same as the one read by ``pserve``, which
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    25
allow to easily add any pyramid extension and configure it.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    26
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    27
A typical ``pyramid.ini`` file is:
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    28
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    29
.. code-block:: ini
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    30
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    31
    [main]
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    32
    pyramid.includes =
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    33
        pyramid_redis_sessions
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    34
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    35
    cubicweb.defaults = no
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    36
    cubicweb.includes =
11631
faf279e33298 Merge with pyramid-cubicweb
Yann Voté <yann.vote@logilab.fr>
parents: 11621
diff changeset
    37
        cubicweb.pyramid.auth
faf279e33298 Merge with pyramid-cubicweb
Yann Voté <yann.vote@logilab.fr>
parents: 11621
diff changeset
    38
        cubicweb.pyramid.login
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    39
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    40
    cubicweb.profile = no
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    41
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    42
    redis.sessions.secret = your_cookie_signing_secret
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    43
    redis.sessions.timeout = 1200
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    44
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    45
    redis.sessions.host = mywheezy
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    46
12098
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    47
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    48
Without *backwards compatibility* a standard ``development.ini`` file can be
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    49
used with any useful CubicWeb-specific settings added.
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    50
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    51
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    52
Pyramid CubicWeb configuration entries
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    53
--------------------------------------
452129511244 [doc] Update "settings" pyramid documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11631
diff changeset
    54
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    55
The Pyramid CubicWeb specific configuration entries are:
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    56
11587
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    57
.. confval:: cubicweb.instance (string)
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    58
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    59
    A CubicWeb instance name. Useful when the application is not run by
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    60
    :ref:`cubicweb-ctl_pyramid`.
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    61
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    62
.. confval:: cubicweb.debug (bool)
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    63
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    64
    Enables the cubicweb debugmode. Works only if the instance is setup by
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    65
    :confval:`cubicweb.instance`.
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    66
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    67
    Unlike when the debugmode is set by the :option:`cubicweb-ctl pyramid --debug-mode`
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    68
    command, the pyramid debug options are untouched.
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11565
diff changeset
    69
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    70
.. confval:: cubicweb.includes (list)
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    71
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    72
    Same as ``pyramid.includes``, but the includes are done after the cubicweb
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    73
    specific registry entries are initialized.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    74
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    75
    Useful to include extensions that requires these entries.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    76
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    77
.. confval:: cubicweb.bwcompat (bool)
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    78
12186
36f1c7ab9010 [pyramid] Only expose 'cubicweb.bwcompat' setting for "all-in-one" configuration type
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12098
diff changeset
    79
    (True) Enable/disable backward compatibility. This only applies to
36f1c7ab9010 [pyramid] Only expose 'cubicweb.bwcompat' setting for "all-in-one" configuration type
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12098
diff changeset
    80
    "all-in-one" configuration type.
36f1c7ab9010 [pyramid] Only expose 'cubicweb.bwcompat' setting for "all-in-one" configuration type
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12098
diff changeset
    81
36f1c7ab9010 [pyramid] Only expose 'cubicweb.bwcompat' setting for "all-in-one" configuration type
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12098
diff changeset
    82
    See :ref:`bwcompat_module`.
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    83
11588
50e1fda83837 [bwcompat] Make the error handler optional
Christophe de Vienne <christophe@unlish.com>
parents: 11587
diff changeset
    84
.. confval:: cubicweb.bwcompat.errorhandler (bool)
50e1fda83837 [bwcompat] Make the error handler optional
Christophe de Vienne <christophe@unlish.com>
parents: 11587
diff changeset
    85
50e1fda83837 [bwcompat] Make the error handler optional
Christophe de Vienne <christophe@unlish.com>
parents: 11587
diff changeset
    86
    (True) Enable/disable the backward compatibility error handler.
50e1fda83837 [bwcompat] Make the error handler optional
Christophe de Vienne <christophe@unlish.com>
parents: 11587
diff changeset
    87
    Set to 'no' if you need to define your own error handlers.
50e1fda83837 [bwcompat] Make the error handler optional
Christophe de Vienne <christophe@unlish.com>
parents: 11587
diff changeset
    88
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    89
.. confval:: cubicweb.defaults (bool)
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    90
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    91
    (True) Enable/disable defaults. See :ref:`defaults_module`.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    92
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    93
.. confval:: cubicweb.profile (bool)
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    94
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    95
    (False) Enable/disable profiling. See :ref:`profiling`.
11565
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
    96
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
    97
.. confval:: cubicweb.auth.update_login_time (bool)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
    98
11631
faf279e33298 Merge with pyramid-cubicweb
Yann Voté <yann.vote@logilab.fr>
parents: 11621
diff changeset
    99
    (True) Add a :class:`cubicweb.pyramid.auth.UpdateLoginTimeAuthenticationPolicy`
11565
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   100
    policy, that update the CWUser.login_time attribute when a user login.
12792
e2cdb1be6bd9 [doc8] D002 Trailing whitespace
Arthur Lutz <arthur.lutz@logilab.fr>
parents: 12186
diff changeset
   101
11565
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   102
.. confval:: cubicweb.auth.authtkt (bool)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   103
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   104
    (True) Enables the 2 cookie-base auth policies, which activate/deactivate
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   105
    depending on the `persistent` argument passed to `remember`.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   106
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   107
    The default login views set persistent to True if a `__setauthcookie`
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   108
    parameters is passed to them, and evals to True in
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   109
    :func:`pyramid.settings.asbool`.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   110
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   111
    The configuration values of the policies are arguments for
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   112
    :class:`pyramid.authentication.AuthTktAuthenticationPolicy`.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   113
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   114
    The first policy handles session authentication. It doesn't get
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   115
    activated if `remember()` is called with `persistent=False`:
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   116
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   117
    .. confval:: cubicweb.auth.authtkt.session.cookie_name (str)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   118
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   119
        ('auth_tkt') The cookie name. Must be different from the persistent
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   120
        authentication cookie name.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   121
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   122
    .. confval:: cubicweb.auth.authtkt.session.timeout (int)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   123
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   124
        (1200) Cookie timeout.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   125
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   126
    .. confval:: cubicweb.auth.authtkt.session.reissue_time (int)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   127
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   128
        (120) Reissue time.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   129
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   130
    The second policy handles persistent authentication. It doesn't get
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   131
    activated if `remember()` is called with `persistent=True`:
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   132
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   133
    .. confval:: cubicweb.auth.authtkt.persistent.cookie_name (str)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   134
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   135
        ('auth_tkt') The cookie name. Must be different from the session
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   136
        authentication cookie name.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   137
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   138
    .. confval:: cubicweb.auth.authtkt.persistent.max_age (int)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   139
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   140
        (30 days) Max age in seconds.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   141
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   142
    .. confval:: cubicweb.auth.authtkt.persistent.reissue_time (int)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   143
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   144
        (1 day) Reissue time in seconds.
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   145
11605
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   146
    Both policies set the ``secure`` flag to ``True`` by default, meaning that
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   147
    cookies will only be sent back over a secure connection (see
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   148
    `Authentication Policies documentation`_ for details). This can be
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   149
    configured through :confval:`cubicweb.auth.authtkt.persistent.secure` and
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   150
    :confval:`cubicweb.auth.authtkt.session.secure` configuration options.
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   151
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   152
    .. _`Authentication Policies documentation`: \
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   153
        http://docs.pylonsproject.org/projects/pyramid/en/latest/api/authentication.html
2bf1eabb2bbd Document how to configure the "secure" flag for authentication policies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11588
diff changeset
   154
11565
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   155
.. confval:: cubicweb.auth.groups_principals (bool)
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   156
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   157
    (True) Setup a callback on the authentication stack that inject the user
6398be12f8e6 [doc] Document the new authentication stack
Christophe de Vienne <christophe@unlish.com>
parents: 11555
diff changeset
   158
    groups in the principals.