Tres Seaver
2010-06-13 aa95dbbfe435fe3e9f92eadc00f252276e0c809a
commit | author | age
7141c7 1 repoze.who Changelog
TS 2 ====================
aa8755 3
f80021 4 After 2.0a2 (unreleased)
TS 5 -----------------------
6
5b6365 7 - In ``repoze.who.restrict``, return headers as a list, to keep ``wsgiref``
TS 8   from complaining.
9
6b7b34 10 - Help default request classifier cope with xml submissions with an
CM 11   explicit charset defined: http://bugs.repoze.org/issue145 (Lorenzo
12   M. Catucci)
13
14 - Correct the handling of type and subtype when matching an XML post
15   to ``xmlpost`` in the default classifier, which, according to RFC
16   2045, must be matched case-insensitively:
17   http://bugs.repoze.org/issue145 (Lorenzo M. Catucci)
18
a349a2 19 - Added ``repoze.who.config:make_api_factory_with_config``, a convenience
TS 20   method for applications which want to set up their own API Factory from
21   a configuration file.
22   
f80021 23 - Fixed example call to ``repoze.who.config:make_middleware_with_config``
TS 24   (added missing ``global_config`` argument).  See
25   http://bugs.repoze.org/issue114
26
c186ae 27 2.0a2 (2010-03-25)
TS 28 ------------------
52bc23 29
TS 30 Bugs Fixed
31 ~~~~~~~~~~
32
33 - Fixed failure to pass substution values in log message string formatting
34   for ``repoze.who.api:API.challenge``.  Fix included adding tests for all
35   logging done by the API object.  See http://bugs.repoze.org/issue122
36
37 Backward Incompatibilities
38 ~~~~~~~~~~~~~~~~~~~~~~~~~~
39
40 - Adjusted logging level for some lower-level details from ``info``
41   to ``debug``.
42
43
e25b84 44 2.0a1 (2010-02-24)
993216 45 ------------------
TS 46
b4b8ee 47 Features
TS 48 ~~~~~~~~
62cd25 49
c9c1c6 50 - Restored the ability to create the middleware using the old ``classifier``
TS 51   argument.  That argument is now a deprecated-but-will-work-forever alias for
52   ``request_classifier``.
cbc983 53
b0f81f 54 - The ``auth_tkt`` plugin now implements the ``IAuthenticator`` interface,
TS 55   and should normally be used both as an ``IIdentifier`` and an
56   ``IAuthenticator``.
57
993216 58 - Factored out the API of the middleware object to make it useful from
TS 59   within the application.  Applications using ``repoze.who``` now fall into
60   one of three catgeories:
61
62   - "middleware-only" applications are configured with middleware, and
63     use either ``REMOTE_USER`` or ``repoze.who.identity`` from the environment
64     to determing the authenticated user.
65
66   - "bare metal" applications use no ``repoze.who`` middleware at all:
67     instead, they configure and an ``APIFactory`` object at startup, and
68     use it to create an ``API`` object when needed on a per-request basis.
69
70   - "hybrid" applications are configured with ``repoze.who`` middleware,
71     but use a new library function to fetch the ``API`` object from the
c9c1c6 72     environ, e.g. to permit calling ``remember`` after a signup or successful
TS 73     login.
993216 74
b4b8ee 75 Bugs Fixed
TS 76 ~~~~~~~~~~
77
78 - Fix http://bugs.repoze.org/issue102: when no challengers existed,
79   logging would cause an exception.
80
81 - Remove ``ez_setup.py`` and dependency on it in setup.py (support
82   distribute).
83
84 Backward Incompatibilities
85 ~~~~~~~~~~~~~~~~~~~~~~~~~~
86
b213af 87 - The middleware used to allow identifier plugins to "pre-authenticate"
TS 88   an identity.  This feature is no longer supported: the ``auth_tkt`` 
89   plugin, which used to use the feature, is now configured to work as
c9c1c6 90   an authenticator plugin (as well as an identifier).
b213af 91
b4b8ee 92 - The ``repoze.who.middleware:PluggableAuthenticationMiddleware`` class
TS 93   no longer has the following (non-API) methods (now made API methods
94   of the ``repoze.who.api:API`` class):
95
96   - ``add_metadata``
97   - ``authenticate``
98   - ``challenge``
99   - ``identify``
100
101 - The following (non-API) functions moved from ``repoze.who.middleware`` to
102   ``repoze.who.api``:
103   
104   - ``make_registries``
105   - ``match_classification``
106   - ``verify``
107
108
060054 109 1.0.18 (2009-11-05)
TS 110 -------------------
798feb 111
TS 112 - Issue #104:  AuthTkt plugin was passing an invalid cookie value in
113   headers from ``forget``, and was not setting the ``Max-Age`` and 
114   ``Expires`` attributes of those cookies.
115
b4b8ee 116
6e136f 117 1.0.17 (2009-11-05)
TS 118 -------------------
e0d138 119
TS 120 - Fixed the ``repoze.who.plugins.form.make_plugin`` factory's ``formcallable``
121   argument handling, to allow passing in a dotted name (e.g., from a config
122   file).
123
b4b8ee 124
6b15ee 125 1.0.16 (2009-11-04)
028e4d 126 -------------------
1ec83d 127
8dd881 128 - Exposed ``formcallable`` argument for ``repoze.who.plugins.form.FormPlugin``
TS 129   to the callers of the ``repoze.who.plugins.form.make_plugin`` factory.
130   Thanks to Roland Hedburg for the report.
21a9c5 131
8dd881 132 - Fixed an issue that caused the following symptom when using the
TS 133   ini configuration parser::
134
135    TypeError: _makePlugin() got multiple values for keyword argument 'name'
21a9c5 136
CM 137   See http://bugs.repoze.org/issue92 for more details.  Thanks to vaab
138   for the bug report and initial fix.
139
1ec83d 140
7141c7 141 1.0.15 (2009-06-25)
TS 142 -------------------
299b4c 143
a14163 144 - If the form post value ``max_age`` exists while in the ``identify``
CM 145   method is handling the ``login_handler_path``, pass the max_age
146   value in the returned identity dictionary as ``max_age``.  See the
147   below bullet point for why.
148
299b4c 149 - If the ``identity`` dict passed to the ``auth_tkt`` ``remember``
CM 150   method contains a ``max_age`` key with a string (or integer) value,
151   treat it as a cue to set the ``Max-Age`` and ``Expires`` headers in
152   the returned cookies.  The cookie ``Max-Age`` is set to the value
153   and the ``Expires`` is computed from the current time.
154
7141c7 155
TS 156 1.0.14 (2009-06-17)
157 -------------------
9318dd 158
1810b2 159 - Fix test breakage on Windows.  See http://bugs.repoze.org/issue79 .
TS 160
00a6d9 161 - Documented issue with using ``include_ip`` setting in the ``auth_tkt``
TS 162   plugin.  See http://bugs.repoze.org/issue81 .
163
0dd808 164 - Added 'passthrough_challenge_decider', which avoids re-challenging 401
TS 165   responses which have been "pre-challenged" by the application.
166
9318dd 167 - One-hundred percent unit test coverage.
TS 168
a6f6dc 169 - Add ``timeout`` and ``reissue_time`` arguments to the auth_tkt
CM 170   identifier plugin, courtesty of Paul Johnston.
171
172 - Add a ``userid_checker`` argument to the auth_tkt identifier plugin,
173   courtesty of Gustavo Narea.
174
175   If ``userid_checker`` is provided, it must be a dotted Python name
176   that resolves to a function which accepts a userid and returns a
177   boolean True or False, indicating whether that user exists in a
178   database.  This is a workaround.  Due to a design bug in repoze.who,
179   the only way who can check for user existence is to use one or more
180   IAuthenticator plugin ``authenticate`` methods.  If an
181   IAuthenticator's ``authenticate`` method returns true, it means that
182   the user exists.  However most IAuthenticator plugins expect *both*
183   a username and a password, and will return False unconditionally if
184   both aren't supplied.  This means that an authenticator can't be
185   used to check if the user "only" exists.  The identity provided by
186   an auth_tkt does not contain a password to check against.  The
187   actual design bug in repoze.who is this: when a user presents
188   credentials from an auth_tkt, he is considered "preauthenticated".
189   IAuthenticator.authenticate is just never called for a
190   "preauthenticated" identity, which works fine, but it means that the
191   user will be considered authenticated even if you deleted the user's
192   record from whatever database you happen to be using.  However, if
193   you use a userid_checker, you can ensure that a user exists for the
194   auth_tkt supplied userid.  If the userid_checker returns False, the
195   auth_tkt credentials are considered "no good".
196
7141c7 197
TS 198 1.0.13 (2009-04-24)
199 -------------------
64ba13 200
TS 201 - Added a paragraph to ``IAuthenticator`` docstring, documenting that plugins
202   are allowed to add keys to the ``identity`` dictionary (e.g., to save a
ced7bd 203   second database query in an ``IMetadataProvider`` plugin).
64ba13 204
08b2ae 205 - Patch supplied for issue #71 (http://bugs.repoze.org/issue71)
CM 206   whereby a downstream app can return a generator, relying on an
207   upstream component to call start_response.  We do this because the
208   challenge decider needs the status and headers to decide what to do.
209
56d0c5 210
7141c7 211 1.0.12 (2009-04-19)
TS 212 -------------------
56d0c5 213 - auth_tkt plugin tried to append REMOTE_USER_TOKENS data to
CM 214   existing tokens data returned by auth_tkt.parse_tkt; this was
215   incorrect; just overwrite.
0ee58d 216
TS 217 - Extended auth_tkt plugin factory to allow passing secret in a separate
218   file from the main config file.  See http://bugs.repoze.org/issue40 .
219
7141c7 220
TS 221 1.0.11 (2009-04-10)
222 -------------------
afbbcd 223
8c20ba 224 - Fix auth_tkt plugin; cookie values are now quoted, making it possible
CM 225   to put spaces and other whitespace, etc in usernames. (thanks to Michael
95736b 226   Pedersen).
8c20ba 227
afbbcd 228 - Fix corner case issue of an exception raised when attempting to log
CM 229   when there are no identifiers or authenticators.
230
7141c7 231
TS 232 1.0.10 (2009-01-23)
233 -------------------
7b931d 234
CM 235 - The RedirectingFormPlugin now passes along SetCookie headers set
236   into the response by the application within the NotFound response
237   (fixes TG2 "flash" issue).
238
7141c7 239
TS 240 1.0.9 (2008-12-18)
241 ------------------
30ab69 242
9238cd 243 - The RedirectingFormPlugin now attempts to find a header named
CM 244   ``X-Authentication-Failure-Reason`` among the response headers set
245   by the application when a challenge is issued.  If a value for this
246   header exists (and is non-blank), the value is attached to the
247   redirect URL's query string as the ``reason`` parameter (or a
248   user-settable key).  This makes it possible for downstream
249   applications to issue a response that initiates a challenge with
250   this header and subsequently display the reason in the login form
251   rendered as a result of the challenge.
30ab69 252
7141c7 253
TS 254 1.0.8 (2008-12-13)
255 ------------------
186ff6 256
9238cd 257 - The ``PluggableAuthenticationMiddleware`` constructor accepts a
CM 258   ``log_stream`` argument, which is typically a file.  After this
259   release, it can also be a PEP 333 ``Logger`` instance; if it is a
260   PEP 333 ``Logger`` instance, this logger will be used as the
261   repoze.who logger (instead of one being constructed by the
262   middleware, as was previously always the case).  When the
263   ``log_stream`` argument is a PEP 333 Logger object, the
264   ``log_level`` argument is ignored.
186ff6 265
7141c7 266
TS 267 1.0.7 (2008-08-28)
268 ------------------
37de44 269
9238cd 270 - ``repoze.who`` and ``repoze.who.plugins`` were not added to the
CM 271   ``namespace_packages`` list in setup.py, potentially making 1.0.6 a
272   brownbag release, given that making these packages namespace
273   packages was the only reason for its release.
37de44 274
7141c7 275
TS 276 1.0.6 (2008-08-28)
277 ------------------
facdf8 278
9238cd 279 - Make repoze.who and repoze.who.plugins into namespace packages
CM 280   mainly so we can allow plugin authors to distribute packages in the
281   repoze.who.plugins namespace.
facdf8 282
7141c7 283
TS 284 1.0.5 (2008-08-23)
285 ------------------
519300 286
9238cd 287 - Fix auth_tkt plugin to set the same cookies in its ``remember``
CM 288   method that it does in its ``forget`` method.  Previously, logging
289   out and relogging back in to a site that used auth_tkt identifier
290   plugin was slightly dicey and would only work sometimes.
facdf8 291
9238cd 292 - The FormPlugin plugin has grown a redirect-on-unauthorized feature.
CM 293   Any response from a downstream application that causes a challenge
294   and includes a Location header will cause a redirect to the value of
295   the Location header.
dee08c 296
7141c7 297
TS 298 1.0.4 (2008-08-22)
299 ------------------
b95a59 300
9238cd 301 - Added a key to the '[general]' config section: ``remote_user_key``.
CM 302   If you use this key in the config file, it tells who to 1) not
303   perform any authentication if it exists in the environment during
304   ingress and 2) to set the key in the environment for the downstream
305   app to use as the REMOTE_USER variable.  The default is
306   ``REMOTE_USER``.
b95a59 307
9238cd 308 - Using unicode user ids in combination with the auth_tkt plugin would
CM 309   cause problems under mod_wsgi.
55dc7a 310
9238cd 311 - Allowed 'cookie_path' argument to InsecureCookiePlugin (and config
CM 312   constructor).  Thanks to Gustavo Narea.
55dc7a 313
7141c7 314
TS 315 1.0.3 (2008-08-16)
316 ------------------
f693fe 317
9238cd 318 - A bug in the middleware's ``authenticate`` method made it impossible
CM 319   to authenticate a user with a userid that was null (e.g. 0, False),
320   which are valid identifiers.  The only invalid userid is now None.
c7e12d 321
9238cd 322 - Applied patch from Olaf Conradi which logs an error when an invalid
CM 323   filename is passed to the HTPasswdPlugin.
c7e12d 324
7141c7 325
TS 326 1.0.2 (2008-06-16)
327 ------------------
cad90d 328
9238cd 329 - Fix bug found by Chris Perkins: the auth_tkt plugin's "remember"
CM 330   method didn't handle userids which are Python "long" instances
331   properly.  Symptom: TypeError: cannot concatenate 'str' and 'long'
332   objects in "paste.auth.auth_tkt".
a2c030 333
9238cd 334 - Added predicate-based "restriction" middleware support
CM 335   (repoze.who.restrict), allowing configuratio-driven authorization as
336   a WSGI filter.  One example predicate, 'authenticated_predicate', is
337   supplied, which requires that the user be authenticated either via
338   'REMOTE_USER' or via 'repoze.who.identity'.  To use the filter to
339   restrict access::
cad90d 340
TS 341      [filter:authenticated_only]
342      use = egg:repoze.who#authenticated
343
344    or::
345
346      [filter:some_predicate]
347      use = egg:repoze.who#predicate
348      predicate = my.module:some_predicate
349      some_option = a value
350
7141c7 351
TS 352 1.0.1 (2008-05-24)
353 ------------------
8199a1 354
9238cd 355 - Remove dependency-link to dist.repoze.org to prevent easy_install
CM 356   from inserting that path into its search paths (the dependencies are
357   available from PyPI).
8199a1 358
7141c7 359
TS 360 1.0 (2008-05-04)
361 -----------------
419946 362
9238cd 363 - The plugin at plugins.form.FormPlugin didn't redirect properly after
CM 364   collecting identification information.  Symptom: a downstream app
365   would receive a POST request with a blank body, which would
366   sometimes result in a Bad Request error.
f39349 367
9238cd 368 - Fixed interface declarations of
CM 369   'classifiers.default_request_classifier' and
370   'classifiers.default_password_compare'.
515c69 371
9238cd 372 - Added actual config-driven middleware factory,
CM 373   'config.make_middleware_with_config'
515c69 374
9238cd 375 - Removed fossilized 'who_conf' argument from plugin factory functions.
515c69 376
7141c7 377 - Added ConfigParser-based WhoConfig, implementing the spec outlined at
9238cd 378   http://www.plope.com/static/misc/sphinxtest/intro.html#middleware-configuration-via-config-file,
CM 379   with the following changes:
419946 380
7141c7 381   - "Bare" plugins (requiring no configuration options) may be specified
419946 382      as either egg entry points (e.g., 'egg:distname#entry_point_name') or
TS 383      as dotted-path-with-colon (e.g., 'dotted.name:object_id').
384
7141c7 385   - Therefore, the separator between a plugin and its classifier is now
TS 386     a semicolon, rather than a colon. E.g.::
419946 387
TS 388      [plugins:id_plugin]
389      use = egg:another.package#identify_with_frobnatz
390      frobnatz = baz
391
392      [identifiers]
393      plugins =
394        egg:my.egg#identify;browser
395        dotted.name:identifier
396        id_plugin
397
7141c7 398
779caf 399 0.9.1 (2008-04-27)
7141c7 400 ------------------
779caf 401
9238cd 402 - Fix auth_tkt plugin to be able to encode and decode integer user
CM 403   ids.
779caf 404
7141c7 405
88e646 406 0.9 (2008-04-01)
7141c7 407 ----------------
88e646 408
9238cd 409 - Fix bug introduced in FormPlugin in 0.8 release (rememberer headers
CM 410   not set).
88e646 411
9238cd 412 - Add PATH_INFO to started and ended log info.
d9f046 413
9238cd 414 - Add a SQLMetadataProviderPlugin (in plugins/sql).
d9f046 415
9238cd 416 - Change constructor of SQLAuthenticatorPlugin: it now accepts only
CM 417   "query", "conn_factory", and "compare_fn".  The old constructor
418   accepted a DSN, but some database systems don't use DBAPI DSNs.  The
419   new constructor accepts no DSN; the conn_factory is assumed to do
420   all the work to make a connection, including knowing the DSN if one
421   is required.  The "conn_factory" should return something that, when
422   called with no arguments, returns a database connection.
d9f046 423
9238cd 424 - The "make_plugin" helper in plugins/sql has been renamed
CM 425   "make_authenticator_plugin".  When called, this helper will return a
426   SQLAuthenticatorPlugin.  A bit of helper logic in the
427   "make_authenticator_plugin" allows a connection factory to be
428   computed.  The top-level callable referred to by conn_factory in
429   this helper should return a function that, when called with no
430   arguments, returns a datbase connection.  The top-level callable
431   itself is called with "who_conf" (global who configuration) and any
432   number of non-top-level keyword arguments as they are passed into
433   the helper, to allow for a DSN or URL or whatever to be passed in.
d9f046 434
9238cd 435 - A "make_metatata_plugin" helper has been added to plugins/sql. When
CM 436   called, this will make a SQLMetadataProviderPlugin.  See the
437   implementation for details.  It is similar to the
438   "make_authenticator_plugin" helper.
d9f046 439
7141c7 440
cbe4e3 441 0.8 (2008-03-27)
7141c7 442 ----------------
b5a331 443
9238cd 444 - Add a RedirectingFormIdentifier plugin.  This plugin is willing to
CM 445   redirect to an external (or downstream application) login form to
446   perform identification.  The external login form must post to the
447   "login_handler_path" of the plugin (optimally with a "came_from"
448   value to tell the plugin where to redirect the response to if the
449   authentication works properly).  The "logout_handler_path" of this
450   plugin can be visited to perform a logout.  The "came_from" value
451   also works there.
a400b0 452
9238cd 453 - Identifier plugins are now permitted to set a key in the environment
CM 454   named 'repoze.who.application' on ingress (in 'identify').  If an
455   identifier plugin does so, this application is used instead of the
456   "normal" downstream application.  This feature was added to more
457   simply support the redirecting form identifier plugin.
a400b0 458
7141c7 459
a400b0 460 0.7 (2008-03-26)
7141c7 461 ----------------
a400b0 462
9238cd 463 - Change the IMetadataProvider interface: this interface used to have
CM 464   a "metadata" method which returned a dictionary.  This method is not
465   part of that API anymore.  It's been replaced with an "add_metadata"
466   method which has the signature::
b5a331 467
CM 468     def add_metadata(environ, identity):
469         """
470         Add metadata to the identity (which is a dictionary)
471         """
472
473    The return value is ignored.  IMetadataProvider plugins are now
474    assumed to be responsible for 'scribbling' directly on the identity
475    that is passed in (it's a dictionary).  The user id can always be
476    retrieved from the identity via identity['repoze.who.userid'] for
477    metadata plugins that rely on that value.
478
7141c7 479
a400b0 480 0.6 (2008-03-20)
7141c7 481 ----------------
e35c64 482
9238cd 483 - Renaming: repoze.pam is now repoze.who
cb5426 484
9238cd 485 - Bump ez_setup.py version.
e35c64 486
9238cd 487 - Add IMetadataProvider plugin type.  Chris says 'Whit rules'.
fa9581 488
7141c7 489
3b67e9 490 0.5 (2008-03-09)
7141c7 491 ----------------
db4cf5 492
9238cd 493 - Allow "remote user key" (default: REMOTE_USER) to be overridden
CM 494   (pass in remote_user_key to middleware constructor).
db4cf5 495
9238cd 496 - Allow form plugin to override the default form.
db4cf5 497
9238cd 498 - API change: IIdentifiers are no longer required to put both 'login'
CM 499   and 'password' in a returned identity dictionary.  Instead, an
500   IIdentifier can place arbitrary key/value pairs in the identity
501   dictionary (or return an empty dictionary).
40a968 502
9238cd 503 - API return value change: the "failure" identity which IIdentifiers
CM 504   return is now None rather than an empty dictionary.
40a968 505
9238cd 506 - The IAuthenticator interface now specifies that IAuthenticators must
CM 507   not raise an exception when evaluating an identity that does not
508   have "expected" key/value pairs (e.g. when an IAuthenticator that
509   expects login and password inspects an identity returned by an
510   IP-based auth system which only puts the IP address in the
511   identity); instead they fail gracefully by returning None.
40a968 512
9238cd 513 - Add (cookie) "auth_tkt" identification plugin.
a5b033 514
9238cd 515 - Stamp identity dictionaries with a userid by placing a key named
CM 516   'repoze.pam.userid' into the identity for each authenticated
517   identity.
a5b033 518
9238cd 519 - If an IIdentifier plugin inserts a 'repoze.pam.userid' key into the
CM 520   identity dictionary, consider this identity "preauthenticated".  No
521   authenticator plugins will be asked to authenticate this identity.
522   This is designed for things like the recently added auth_tkt plugin,
523   which embeds the user id into the ticket.  This effectively alllows
524   an IIdentifier plugin to become an IAuthenticator plugin when
525   breaking apart the responsibility into two separate plugins is
526   "make-work".  Preauthenticated identities will be selected first
527   when deciding which identity to use for any given request.
a5b033 528
9238cd 529 - Insert a 'repoze.pam.identity' key into the WSGI environment on
CM 530   ingress if an identity is found.  Its value will be the identity
531   dictionary related to the identity selected by repoze.pam on
532   ingress.  Downstream consumers are allowed to mutate this
533   dictionary; this value is passed to "remember" and "forget", so its
534   main use is to do a "credentials reset"; e.g. a user has changed his
535   username or password within the application, but we don't want to
536   force him to log in again after he does so.
a5b033 537
7141c7 538
247f34 539 0.4 (03-07-2008)
7141c7 540 ----------------
247f34 541
9238cd 542 - Allow plugins to specify a classifiers list per interface (instead
CM 543   of a single classifiers list per plugin).
247f34 544
7141c7 545
fb510d 546 0.3 (03-05-2008)
7141c7 547 ----------------
fb510d 548
9238cd 549 - Make SQLAuthenticatorPlugin's default_password_compare use hexdigest
CM 550   sha instead of base64'ed binary sha for simpler conversion.
fb510d 551
7141c7 552
196bc2 553 0.2 (03-04-2008)
7141c7 554 ----------------
196bc2 555
9238cd 556 - Added SQLAuthenticatorPlugin (see plugins/sql.py).
196bc2 557
7141c7 558
318832 559 0.1 (02-27-2008)
7141c7 560 ----------------
318832 561
9238cd 562 - Initial release (no configuration file support yet).