Skip to main content

Zope Security Framework

Project description

The Security framework provides a generic mechanism to implement security policies on Python objects.

CHANGES

4.0.0a2 (2013-02-15)

  • Added back the untrustedpython extra: now pulls in zope.untrustedpython. Restored deprecated backward-compatible imports for zope.security.untrustedpython.{builtins,interpreter,rcompile} (the extra and the imports are to be removed in version 4.1).

4.0.0a1 (2013-02-14)

  • Added support for Python 3.2 and 3.3.

  • 100% unit test coverage.

  • zope.security.untrustedpython moved to separate project: zope.untrustedpython

  • Converted use of assert in non-test code to apprpriate error types:

    • Non-dict’s passed to Checker.__init__.

  • Removed dprecattion of zope.security.adapter.TrustedAdapterFactory. Although it has been marked as deprectaed since before Zope3 3.2, current versions of zope.compoent still rely on it.

  • Converted doctests to Sphinx documentation in ‘docs’.

  • Added ‘setup.py docs’ alias (installs Sphinx and dependencies).

  • Added ‘setup.py dev’ alias (runs setup.py develop plus installs nose and coverage).

  • Made non-doctest tests fully independent of zope.testing.

    Two modules, zope.security.checker and zope.security.management, register cleanups with zope.testing IFF it is importable, but the tests no longer rely on it.

  • Enabled building extensions without the ‘svn:external’ of the zope.proxy headers into our ‘include’ dir.

  • Bumped zope.proxy dependency to “>= 4.1.0” to enable compilation on Py3k.

  • Replaced deprecated zope.component.adapts usage with equivalent zope.component.adapter decorator.

  • Replaced deprecated zope.interface.classProvides usage with equivalent zope.interface.provider decorator.

  • Replaced deprecated zope.interface.implements usage with equivalent zope.interface.implementer decorator.

  • Dropped support for Python 2.4 and 2.5.

  • Added test convenience helper create_interaction and with interaction().

3.8.3 (2011-09-24)

  • Fixed a regression introduced in 3.8.1: zope.location's LocationProxy did not get a security checker if zope.security.decorator was not imported manually. Now zope.security.decorator is imported in zope.security.proxy without re-introducing the circular import fixed in 3.8.1.

3.8.2 (2011-05-24)

  • Fix a test that failed on Python 2.7.

3.8.1 (2011-05-03)

  • Fixed circular import beween zope.security.decorator and zope.security.proxy which led to an ImportError when only importing zope.security.decorator.

3.8.0 (2010-12-14)

  • Added tests for our own configure.zcml.

  • Added zcml extra dependencies, run related tests only if zope.configuration is available.

  • Run tests related to the untrustedpython functionality only if RestrictedPython is available.

3.7.3 (2010-04-30)

  • Prefer the standard libraries doctest module to the one from zope.testing.

  • Fixed directlyProvides IVocabularyFactory for PermissionIdsVocabulary in Python code, even if it’s unnecessary because IVocabularyFactory is provided in zcml.

  • Removed the dependency on the zope.exceptions package: zope.security.checker now imports DuplicationError from zope.exceptions if available, otherwise it defines a package-specific DuplicationError class which inherits from Exception.

3.7.2 (2009-11-10)

  • Added compatibility with Python 2.6 abstract base classes.

3.7.1 (2009-08-13)

  • Fix for LP bug 181833 (from Gustavo Niemeyer). Before “visiting” a sub-object, a check should be made to ensure the object is still valid. Because garbage collection may involve loops, if you garbage collect an object, it is possible that the actions done on this object may modify the state of other objects. This may cause another round of garbage collection, eventually generating a segfault (see LP bug). The Py_VISIT macro does the necessary checks, so it is used instead of the previous code.

3.7.0 (2009-05-13)

  • Made pytz a soft dependency: the checker for pytz.UTC is created / tested only if the package is already present. Run bin/test_pytz to run the tests with pytz on the path.

3.6.3 (2009-03-23)

  • Ensure that simple zope.schema’s VocabularyRegistry is used for PermissionVocabulary tests, because it’s replaced implicitly in environments with zope.app.schema installed that makes that tests fail.

  • Fixed a bug in DecoratedSecurityCheckerDescriptor which made security-wrapping location proxied exception instances throw exceptions on Python 2.5. See https://bugs.launchpad.net/zope3/+bug/251848

3.6.2 (2009-03-14)

  • Add zope.i18nmessageid.Message to non-proxied basic types. It’s okay, because messages are immutable. It was done by zope.app.security before.

  • Add “__name__” and “__parent__” attributes to list of available by default. This was also done by zope.app.security package before.

  • Added PermissionsVocabulary and PermissionIdsVocabulary vocabularies to the zope.security.permission module. They were moved from the zope.app.security package.

  • Add zcml permission definitions for most common and useful permissions, like “zope.View” and “zope.ManageContent”, as well as for the special “zope.Public” permission. They are placed in a separate “permissions.zcml” file, so it can be easily excluded/redefined. They are selected part of permissions moved from zope.app.security and used by many zope.* packages.

  • Add addCheckerPublic helper function in zope.security.testing module that registers the “zope.Public” permission as an IPermission utility.

  • Add security declarations for the zope.security.permisson.Permission class.

  • Improve test coverage.

3.6.1 (2009-03-10)

  • Use from imports instead of zope.deferred to avoid circular import problems, thus drop dependency on zope.deferredimport.

  • Raise NoInteraction when zope.security.checkPermission is called without interaction being active (LP #301565).

  • Don’t define security checkers for deprecated set types from the “sets” module on Python 2.6. It’s discouraged to use them and set and frozenset built-in types should be used instead.

  • Change package’s mailng list address to zope-dev at zope.org as zope3-dev at zope.org is now retired.

  • Remove old zpkg-related files.

3.6.0 (2009-01-31)

  • Install decorated security checker support on LocationProxy from the outside.

  • Added support to bootstrap on Jython.

  • Moved the protectclass module from zope.app.security to this package to reduce the number of dependencies on zope.app.security.

  • Moved the <module> directive implementation from zope.app.security to this package.

  • Moved the <class> directive implementation from zope.app.component to this package.

3.5.2 (2008-07-27)

  • Made C code compatible with Python 2.5 on 64bit architectures.

3.5.1 (2008-06-04)

  • Add frozenset, set, reversed, and sorted to the list of safe builtins.

3.5.0 (2008-03-05)

  • Changed title for zope.security.management.system_user to be more presentable.

3.4.3 - (2009/11/26)

  • Backported a fix made by Gary Poster to the 3.4 branch: Fix for LP bug 181833 (from Gustavo Niemeyer). Before “visiting” a sub-object, a check should be made to ensure the object is still valid. Because garbage collection may involve loops, if you garbage collect an object, it is possible that the actions done on this object may modify the state of other objects. This may cause another round of garbage collection, eventually generating a segfault (see LP bug). The Py_VISIT macro does the necessary checks, so it is used instead of the previous code.

3.4.2 - (2009/03/23)

  • Added dependency ‘zope.thread’ to setup.py, without the tests were failing.

  • Backported a fix made by Albertas Agejevas to the 3.4 branch. He fixed a bug in DecoratedSecurityCheckerDescriptor which made security-wrapping location proxied exception instances throw exceptions on Python 2.5. See https://bugs.launchpad.net/zope3/+bug/251848

3.4.1 - 2008/07/27

  • Made C code compatible with Python 2.5 on 64bit architectures.

3.4.0 (2007-10-02)

  • Updated meta-data.

3.4.0b5 (2007-08-15)

  • Bug: Fixed a circular import in the C implementation.

3.4.0b4 (2007-08-14)

  • Bug: zope.security.management.system_user had an ugly/brittle id.

3.4.0b3 (2007-08-14)

  • zope.security now works on Python 2.5

  • Bug: zope.security.management.system_user wasn’t a valid principal (didn’t provide IPrincipal).

  • Bug: Fixed inclusion of doctest to use the doctest module from zope.testing. Now tests can be run multiple times without breaking. (#98250)

3.4.0b2 (2007-06-15)

  • Bug: Removed stack extraction in newInteraction. When using eggs this is an extremly expensive function. The publisher is now more than 10 times faster when using eggs and about twice as fast with a zope trunk checkout.

3.4.0b1

  • Temporarily fixed the hidden (and accidental) dependency on zope.testing to become optional.

Note: The releases between 3.2.0 and 3.4.0b1 where not tracked as an individual package and have been documented in the Zope 3 changelog.

3.2.0 (2006-01-05)

  • Corresponds to the verison of the zope.security package shipped as part of the Zope 3.2.0 release.

  • Removed deprecated helper functions, ‘proxy.trustedRemoveSecurityProxy’ and ‘proxy.getProxiedObject’.

  • Made handling of ‘management.{end,restore}Interaction’ more careful w.r.t. edge cases.

  • Made behavior of ‘canWrite’ consistent with ‘canAccess’: if ‘canAccess’ does not raise ‘ForbiddenAttribute’, then neither will ‘canWrite’. See: http://www.zope.org/Collectors/Zope3-dev/506

  • Code style / documentation / test fixes.

3.1.0 (2005-10-03)

  • Added support for use of the new Python 2.4 datatypes, ‘set’ and ‘frozenset’, within checked code.

  • C security proxy acquired a dependency on the ‘proxy.h’ header from the ‘zope.proxy’ package.

  • XXX: the spelling of the ‘#include’ is bizarre! It seems to be related to ‘zpkg’-based builds, and should likely be revisited. For the moment, I have linked in the ‘zope.proxy’ package into our own ‘include’ directory. See the subversion checkin: http://svn.zope.org/Zope3/?rev=37882&view=rev

  • Updated checker to avoid re-proxying objects which have and explicit ‘__Security_checker__’ assigned.

  • Corresponds to the verison of the zope.security package shipped as part of the Zope 3.1.0 release.

  • Clarified contract of ‘IChecker’ to indicate that its ‘check*’ methods may raise only ‘Forbidden’ or ‘Unauthorized’ exceptions.

  • Added interfaces, (‘IPrincipal’, ‘IGroupAwarePrincipal’, ‘IGroup’, and ‘IPermission’) specifying contracts of components in the security framework.

  • Code style / documentation / test fixes.

3.0.0 (2004-11-07)

  • Corresponds to the version of the zope.security package shipped as part of the Zope X3.0.0 release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zope.security-4.0.0a2.tar.gz (704.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zope.security-4.0.0a2.win-amd64-py2.7.exe (350.1 kB view details)

Uploaded Source

zope.security-4.0.0a2.win-amd64-py2.6.exe (350.0 kB view details)

Uploaded Source

zope.security-4.0.0a2.win32-py2.7.exe (322.3 kB view details)

Uploaded Source

zope.security-4.0.0a2.win32-py2.6.exe (322.2 kB view details)

Uploaded Source

zope.security-4.0.0a2-py2.7-win-amd64.egg (226.7 kB view details)

Uploaded Egg

zope.security-4.0.0a2-py2.7-win32.egg (226.4 kB view details)

Uploaded Egg

zope.security-4.0.0a2-py2.6-win-amd64.egg (227.2 kB view details)

Uploaded Egg

zope.security-4.0.0a2-py2.6-win32.egg (226.8 kB view details)

Uploaded Egg

File details

Details for the file zope.security-4.0.0a2.tar.gz.

File metadata

File hashes

Hashes for zope.security-4.0.0a2.tar.gz
Algorithm Hash digest
SHA256 ae84d5f77b0ce38ae97be4029b3b93589e05977ec0635590a0fae217d04a1160
MD5 fa5cc7d467cd16466e5a34d70cf6ea2e
BLAKE2b-256 674dbdc071f2d4e78d746ea33cb4188aa11eb31895eff4d262e3cf72f17ffa9c

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for zope.security-4.0.0a2.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 1e5ee7ee9058d7ac550e94f98274f31bcd72ffc7827b95a729552eebc2f4942b
MD5 e0e52b8909b4869f2b8d94ebcbfe776c
BLAKE2b-256 f760e9896292baa00815a4b086ecf40af0cdbb43a6c721bbb382ec5c35faee59

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2.win-amd64-py2.6.exe.

File metadata

File hashes

Hashes for zope.security-4.0.0a2.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 81f35d87c85d0714f4b0fea9d8dff65335a4f53997e39fee4b2468c79fe63ce3
MD5 46740388c9be287f23c546606b11fec3
BLAKE2b-256 44db1c7715b155989e43b5aa588d36564a3fa3f52fac6b039ccb89874e4415d1

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2.win32-py2.7.exe.

File metadata

File hashes

Hashes for zope.security-4.0.0a2.win32-py2.7.exe
Algorithm Hash digest
SHA256 9e31c10ad6ac0a09906dea7c86548d31cc9ca52578aeee73b8e47eee4042a0ef
MD5 708e03a4407eb1109ac604da2f546b6a
BLAKE2b-256 b4de32f61986ea6f5d30eeeb0426830d801379e968b4096bae032a59186661af

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2.win32-py2.6.exe.

File metadata

File hashes

Hashes for zope.security-4.0.0a2.win32-py2.6.exe
Algorithm Hash digest
SHA256 15a6f18e73b9b55bcccb6a038ade0f40238f74b3b219e9558e2e6d82c87409c1
MD5 dcd124684ba074b50b84bbe18a79cf75
BLAKE2b-256 5d223234c88984976ec5a7bacf00a3a8d6929faf83778a9e35ec0140a1f3dc42

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for zope.security-4.0.0a2-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 86be179a97fa63aad789fd1de40e4b4c953a817bebf826759d2e3aa4de2698e5
MD5 779eb398146bddfe2fe215a844c33e66
BLAKE2b-256 728e6150e4f0735f2aeecb515a2b2a45d216b5634809bb84f9c03fb7cc619b97

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2-py2.7-win32.egg.

File metadata

File hashes

Hashes for zope.security-4.0.0a2-py2.7-win32.egg
Algorithm Hash digest
SHA256 4e1b43f2c25f2743367d0a57545b53a8de941bfc4ed85813604ddb5654cc24cf
MD5 3100464d0fab0f1d9dffc73691af3b78
BLAKE2b-256 15b102527a4a8b557ebc5f029600f7c27cbfb745562491db8a7326d92bb12977

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2-py2.6-win-amd64.egg.

File metadata

File hashes

Hashes for zope.security-4.0.0a2-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 3102a0ad2c446ee39d888bedbc78778c719959756f3e3ca332155ce10ca84a9c
MD5 7f3a173f2f17324b245ed793faa3d879
BLAKE2b-256 efc9094e2fe21ecd4525cee17d3c873e931ad7a494766a396dd1090e51554046

See more details on using hashes here.

File details

Details for the file zope.security-4.0.0a2-py2.6-win32.egg.

File metadata

File hashes

Hashes for zope.security-4.0.0a2-py2.6-win32.egg
Algorithm Hash digest
SHA256 7600a706e1a4433fcef674081df06b4f2ebcc8921d23651e7691cbdd3c289896
MD5 44b02d72c43c03d822925ed5601ba9d0
BLAKE2b-256 555d83e3ce38c90e3468e1278674dde8f064910948077dbea188563e79a3219f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page