cachelib icon indicating copy to clipboard operation
cachelib copied to clipboard

Add signing of cache values.

Open Varbin opened this issue 4 years ago • 0 comments

This PR adds the ability to sign the stored cache values. Most classes now accept the extra argument secret_key for signing cache values with this key. itsdangerous is used for signing.

The "SimpleCache" and "MemcachedCache" classes do not accept the new secret_key kwarg - the simple does not have any use, and various memcached client libraries already use pickle internally for serialization.

  • implements #1

Checklist:

  • [x] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • [x] Add or update relevant docs, in the docs folder and in code.
  • [x] Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • [x] Add .. versionchanged:: entries in any relevant code docs.
  • [x] Run pre-commit hooks and fix any issues.
  • [ ] Run pytest and tox, no tests failed. --> let's see what CI/CD say. I unfortunately did not have redis, uwsgi and memcached installed...

Varbin avatar Aug 13 '21 18:08 Varbin