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