summaryrefslogtreecommitdiff
path: root/docs/api/security.rst
AgeCommit message (Collapse)Author
2020-01-14Apply suggestions from code reviewMichael Merickel
Co-Authored-By: Éric Araujo <merwok@netwok.org>
2020-01-14update changelog and docsMichael Merickel
2018-11-01remove deprecated security functionsMichael Merickel
2017-06-14fix p.security.ACLPermitsResult to subclass p.security.PermitsResultMichael Merickel
The ``IAuthorizationPolicy`` is expected to return an instance of ``PermitsResult`` and the ``ACLPermitsResult`` now subclasses this to form a consistent class hierarchy. Similarly the ``ACLDenied`` subclasses ``Denied`` and ``ACLAllowed`` subclasses ``Allowed`` for consistency.
2014-11-10update the public api for rememberMichael Merickel
2012-02-24More trivial typosPaul Winkler
2011-09-12explain NO_PERMISSION_REQUIRED constant in API docsDaniel Haaker
2011-08-09Added the `pyramid.security.NO_PERMISSION_REQUIRED` constant.Michael Merickel
Removed the undocumented version from pyramid.interfaces.
2010-12-31- The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies anChris McDonough
``unauthenticated_userid`` method. This method supports an important optimization required by people who are using persistent storages which do not support object caching and whom want to create a "user object" as a request attribute. - A new API has been added to the ``pyramid.security`` module named ``unauthenticated_userid``. This API function calls the ``unauthenticated_userid`` method of the effective security policy. - An ``unauthenticated_userid`` method has been added to the dummy authentication policy returned by ``pyramid.config.Configurator.testing_securitypolicy``. It returns the same thing as that the dummy authentication policy's ``authenticated_userid`` method. - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies that a policy implementation must implement an ``unauthenticated_userid`` method, all third-party custom authentication policies now must implement this method. It, however, will only be called when the global function named ``pyramid.security.unauthenticated_userid`` is invoked, so if you're not invoking that, you will not notice any issues. - The (non-API) method of all internal authentication policy implementations previously named ``_get_userid`` is now named ``unauthenticated_userid``, promoted to an API method. If you were overriding this method, you'll now need to override it as ``unauthenticated_userid`` instead.
2010-10-25convert API docs to PyramidChris McDonough
2009-10-19Organize into separate authentication and authorization sections.Chris McDonough
2009-05-30Docs.Chris McDonough
2009-05-27Merge authchanges branch to trunk.Chris McDonough
2009-05-06FeaturesChris McDonough
-------- - Two new security policies were added: RemoteUserInheritingACLSecurityPolicy and WhoInheritingACLSecurityPolicy. These are security policies which take into account *all* ACLs defined in the lineage of a context rather than stopping at the first ACL found in a lineage. See the "Security" chapter of the API documentation for more information. - The API and narrative documentation dealing with security was changed to introduce the new "inheriting" security policy variants. - Added glossary entry for "lineage". Deprecations ------------ - The security policy previously named ``RepozeWhoIdentityACLSecurityPolicy`` now has the slightly saner name of ``WhoACLSecurityPolicy``. A deprecation warning is emitted when this policy is imported under the "old" name; usually this is due to its use in ZCML within your application. If you're getting this deprecation warning, change your ZCML to use the new name, e.g. change:: <utility provides="repoze.bfg.interfaces.ISecurityPolicy" factory="repoze.bfg.security.RepozeWhoIdentityACLSecurityPolicy" /> To:: <utility provides="repoze.bfg.interfaces.ISecurityPolicy" factory="repoze.bfg.security.WhoACLSecurityPolicy" />
2009-01-17Security policy documentation.Chris McDonough
2008-11-02 FeaturesChris McDonough
- The ``BFG_DEBUG_AUTHORIZATION`` envvar and the ``debug_authorization`` config file value now only imply debugging of view-invoked security checks. Previously, information was printed for every call to ``has_permission`` as well, which made output confusing. To debug ``has_permission`` checks and other manual permission checks, use the debugger and print statements in your own code. - Authorization debugging info is now only present in the HTTP response body oif ``debug_authorization`` is true. - The format of authorization debug messages was improved. - A new ``BFG_DEBUG_NOTFOUND`` envvar was added and a symmetric ``debug_notfound`` config file value was added. When either is true, and a NotFound response is returned by the BFG router (because a view could not be found), debugging information is printed to stderr. When this value is set true, the body of HTTPNotFound responses will also contain the same debugging information. - ``Allowed`` and ``Denied`` responses from the security machinery are now specialized into two types: ACL types, and non-ACL types. The ACL-related responses are instances of ``repoze.bfg.security.ACLAllowed`` and ``repoze.bfg.security.ACLDenied``. The non-ACL-related responses are ``repoze.bfg.security.Allowed`` and ``repoze.bfg.security.Denied``. The allowed-type responses continue to evaluate equal to things that themselves evaluate equal to the ``True`` boolean, while the denied-type responses continue to evaluate equal to things that themselves evaluate equal to the ``False`` boolean. The only difference between the two types is the information attached to them for debugging purposes. - Added a new ``BFG_DEBUG_ALL`` envvar and a symmetric ``debug_all`` config file value. When either is true, all other debug-related flags are set true unconditionally (e.g. ``debug_notfound`` and ``debug_authorization``). Documentation - Added info about debug flag changes. - Added a section to the security chapter named "Debugging Imperative Authorization Failures" (for e.g. ``has_permssion``).
2008-09-21 - Add ``principals_allowed_by_permission`` API to security module.Chris McDonough
2008-07-20 - Add API functions for authenticated_userid and effective_principals.Chris McDonough
2008-07-16Rearrange into narrative and API sections; include README in narrative as ↵Chris McDonough
"introduction".