Repoze-who

Latest version: v2.3

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 7

0.9.1

------------------

- Fix auth_tkt plugin to be able to encode and decode integer user
ids.

0.9

----------------

- Fix bug introduced in FormPlugin in 0.8 release (rememberer headers
not set).

- Add PATH_INFO to started and ended log info.

- Add a SQLMetadataProviderPlugin (in plugins/sql).

- Change constructor of SQLAuthenticatorPlugin: it now accepts only
"query", "conn_factory", and "compare_fn". The old constructor
accepted a DSN, but some database systems don't use DBAPI DSNs. The
new constructor accepts no DSN; the conn_factory is assumed to do
all the work to make a connection, including knowing the DSN if one
is required. The "conn_factory" should return something that, when
called with no arguments, returns a database connection.

- The "make_plugin" helper in plugins/sql has been renamed
"make_authenticator_plugin". When called, this helper will return a
SQLAuthenticatorPlugin. A bit of helper logic in the
"make_authenticator_plugin" allows a connection factory to be
computed. The top-level callable referred to by conn_factory in
this helper should return a function that, when called with no
arguments, returns a datbase connection. The top-level callable
itself is called with "who_conf" (global who configuration) and any
number of non-top-level keyword arguments as they are passed into
the helper, to allow for a DSN or URL or whatever to be passed in.

- A "make_metatata_plugin" helper has been added to plugins/sql. When
called, this will make a SQLMetadataProviderPlugin. See the
implementation for details. It is similar to the
"make_authenticator_plugin" helper.

0.8

----------------

- Add a RedirectingFormIdentifier plugin. This plugin is willing to
redirect to an external (or downstream application) login form to
perform identification. The external login form must post to the
"login_handler_path" of the plugin (optimally with a "came_from"
value to tell the plugin where to redirect the response to if the
authentication works properly). The "logout_handler_path" of this
plugin can be visited to perform a logout. The "came_from" value
also works there.

- Identifier plugins are now permitted to set a key in the environment
named 'repoze.who.application' on ingress (in 'identify'). If an
identifier plugin does so, this application is used instead of the
"normal" downstream application. This feature was added to more
simply support the redirecting form identifier plugin.

0.7

----------------

- Change the IMetadataProvider interface: this interface used to have
a "metadata" method which returned a dictionary. This method is not
part of that API anymore. It's been replaced with an "add_metadata"
method which has the signature::

def add_metadata(environ, identity):
"""
Add metadata to the identity (which is a dictionary)
"""

The return value is ignored. IMetadataProvider plugins are now
assumed to be responsible for 'scribbling' directly on the identity
that is passed in (it's a dictionary). The user id can always be
retrieved from the identity via identity['repoze.who.userid'] for
metadata plugins that rely on that value.

0.6

----------------

- Renaming: repoze.pam is now repoze.who

- Bump ez_setup.py version.

- Add IMetadataProvider plugin type. Chris says 'Whit rules'.

0.5

----------------

- Allow "remote user key" (default: REMOTE_USER) to be overridden
(pass in remote_user_key to middleware constructor).

- Allow form plugin to override the default form.

- API change: IIdentifiers are no longer required to put both 'login'
and 'password' in a returned identity dictionary. Instead, an
IIdentifier can place arbitrary key/value pairs in the identity
dictionary (or return an empty dictionary).

- API return value change: the "failure" identity which IIdentifiers
return is now None rather than an empty dictionary.

- The IAuthenticator interface now specifies that IAuthenticators must
not raise an exception when evaluating an identity that does not
have "expected" key/value pairs (e.g. when an IAuthenticator that
expects login and password inspects an identity returned by an
IP-based auth system which only puts the IP address in the
identity); instead they fail gracefully by returning None.

- Add (cookie) "auth_tkt" identification plugin.

- Stamp identity dictionaries with a userid by placing a key named
'repoze.pam.userid' into the identity for each authenticated
identity.

- If an IIdentifier plugin inserts a 'repoze.pam.userid' key into the
identity dictionary, consider this identity "preauthenticated". No
authenticator plugins will be asked to authenticate this identity.
This is designed for things like the recently added auth_tkt plugin,
which embeds the user id into the ticket. This effectively alllows
an IIdentifier plugin to become an IAuthenticator plugin when
breaking apart the responsibility into two separate plugins is
"make-work". Preauthenticated identities will be selected first
when deciding which identity to use for any given request.

- Insert a 'repoze.pam.identity' key into the WSGI environment on
ingress if an identity is found. Its value will be the identity
dictionary related to the identity selected by repoze.pam on
ingress. Downstream consumers are allowed to mutate this
dictionary; this value is passed to "remember" and "forget", so its
main use is to do a "credentials reset"; e.g. a user has changed his
username or password within the application, but we don't want to
force him to log in again after he does so.

Page 6 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.