XmlBodyMiddleware stubs break existing configs

Bug #1479943 reported by Tim Burke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Medium
Unassigned
Kilo
Fix Released
Medium
Tim Burke

Bug Description

The Kilo Keystone release dropped support for requests with XML bodies, but included shims to (presumably) prevent existing configs from breaking. This works as desired for XmlBodyMiddleware, but not XmlBodyMiddlewareV2 and XmlBodyMiddlewareV3. As a result, all client requests to a pipeline with either of those filters will receive a 500 response and the server's logs look like

2015-07-30 19:06:57.029 22048 DEBUG keystone.middleware.core [-] RBAC: auth_context: {} process_request /vagrant/swift3/.tox/keystone/local/lib/python2.7/site-packages/keystone/middleware/core.py:239
2015-07-30 19:06:57.029 22048 ERROR keystone.common.wsgi [-] 'XmlBodyMiddlewareV2' object has no attribute 'application'
2015-07-30 19:06:57.029 22048 TRACE keystone.common.wsgi Traceback (most recent call last):
2015-07-30 19:06:57.029 22048 TRACE keystone.common.wsgi File "/vagrant/swift3/.tox/keystone/local/lib/python2.7/site-packages/keystone/common/wsgi.py", line 452, in __call__
2015-07-30 19:06:57.029 22048 TRACE keystone.common.wsgi response = request.get_response(self.application)
2015-07-30 19:06:57.029 22048 TRACE keystone.common.wsgi AttributeError: 'XmlBodyMiddlewareV2' object has no attribute 'application'
2015-07-30 19:06:57.029 22048 TRACE keystone.common.wsgi
2015-07-30 19:06:57.055 22048 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [30/Jul/2015 19:06:57] "GET /v2.0/tenants HTTP/1.1" 500 423 0.027812

Revision history for this message
Dolph Mathews (dolph) wrote :
Changed in keystone:
importance: Undecided → Medium
status: New → Triaged
status: Triaged → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (stable/kilo)

Reviewed: https://review.openstack.org/205351
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=0fde127bd82b4728ccd2dde8a72c5af0932e82a4
Submitter: Jenkins
Branch: stable/kilo

commit 0fde127bd82b4728ccd2dde8a72c5af0932e82a4
Author: Tim Burke <email address hidden>
Date: Thu Jul 23 19:08:47 2015 -0700

    Properly stub out the V2 and V3 XML middlewares

    Previously, these middlewares did nothing during initialization. No
    logging, no calls to super, nothing. As a result, including these
    (admittedly, defunct) middlewares in your pipeline would cause
    AttributeErrors on every request.

    Now, these middlewares will behave like XmlBodyMiddleware; i.e., log a
    warning that XML support has been removed while still allowing the
    pipeline to function.

    Note that no patch is necessary on master, as the XML middlewares have
    already been removed.

    Closes-Bug: #1479943
    Change-Id: Id175816b967bd883524f7e3ecc6b03d11b2831f7

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.