Summary
Add the ‘pyramid’ command to cubicweb-ctl”.
This cube also add a CWSession entity type so that sessions can be stored in the database, which allows to run a Cubicweb instance without having to set up a session storage (like redis or memcache) solution.
However, for production systems, it is greatly advised to use such a storage solution for the sessions.
The handling of the sessions is made by pyramid (see the pyramid’s documentation on sessions for more details).
For example, to set up a redis based session storage, you need the pyramid-redis-session package, then you must configure pyramid to use this backend, by configuring the pyramid.ini file in the instance’s config directory (near the all-in-one.conf file):
[main]
cubicweb.defaults = no # we do not want to load the default cw session handling
cubicweb.auth.authtkt.session.secret = <secret1>
cubicweb.auth.authtkt.persistent.secret = <secret2>
cubicweb.auth.authtkt.session.secure = yes
cubicweb.auth.authtkt.persistent.secure = yes
redis.sessions.secret = <secret3>
redis.sessions.prefix = <my-app>:
redis.sessions.url = redis://localhost:6379/0
pyramid.includes =
pyramid_redis_sessions
pyramid_cubicweb.auth
pyramid_cubicweb.login
See the documentation of Pyramid Cubicweb for more details.
Secrets
There are a number of secrets to configure in pyramid.ini. They should be different one from each other, as explained in Pyramid’s documentation.
For the record:
- cubicweb.session.secret:
This secret is used to encrypt the session’s data ID (data themselved are stored in the backend, database or redis) when using the integrated (CWSession based) session data storage.
- redis.session.secret:
This secret is used to encrypt the session’s data ID (data themselved are stored in the backend, database or redis) when using redis as backend.
- cubicweb.auth.authtkt.session.secret:
This secret is used to encrypt the authentication cookie.
- cubicweb.auth.authtkt.persistent.secret:
This secret is used to encrypt the persistent authentication cookie.
Metadata
Release files for cubicweb-pyramid 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cubicweb-pyramid-0.5.0.tar.gz | 10.7 kB | Without provenance | Details |
Release files / cubicweb-pyramid-0.5.0.tar.gz
| Download URL | cubicweb-pyramid-0.5.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a2d602d9f74c3b47c643d416eb74721b91a041a00e9b7b5eed609d816d0f9f1
|
|
BLAKE2b-256 checksum How to use checksums |
10b3bf8eb137d0d34b9107060d9e3bb099b2ce5228d7270c1dec799c29478150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cubicweb-pyramid 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.