v3 to v2 catalog conversion missing id

Bug #1421858 reported by Matthew Edmonds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystonemiddleware
Invalid
Undecided
Matthew Edmonds

Bug Description

the keystonemiddleware.auth_token._v3_to_v2_catalog() method is dropping the id portion of the catalog during the conversion. This breaks the pycadf audit middleware, as seen in the following trace, and may also have other impacts.

2015-02-11 03:13:46.917 15544 ERROR pycadf.middleware.notifier [req-97bd23d9-61eb-43c2-8171-a93e74303e8d None] An exception occurred processing the API call: 'id'
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier Traceback (most recent call last):
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier File "/usr/lib/python2.7/site-packages/pycadf/middleware/notifier.py", line 36, in wrapped
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier return fn(*args, **kwargs)
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier File "/usr/lib/python2.7/site-packages/pycadf/middleware/audit.py", line 35, in process_request
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier self.cadf_audit.append_audit_event(request)
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier File "/usr/lib/python2.7/site-packages/pycadf/audit/api.py", line 282, in append_audit_event
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier event = self.create_event(req, correlation_id)
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier File "/usr/lib/python2.7/site-packages/pycadf/audit/api.py", line 240, in create_event
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier service_info = self._get_service_info(default_endpoint)
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier File "/usr/lib/python2.7/site-packages/pycadf/audit/api.py", line 188, in _get_service_info
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier id=identifier.norm_ns(endp['endpoints'][0]['id']),
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier KeyError: 'id'
2015-02-11 03:13:46.917 15544 TRACE pycadf.middleware.notifier

Revision history for this message
wanghong (w-wanghong) wrote :
Changed in keystonemiddleware:
status: New → Invalid
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

The fix referenced in the previous comment is for a different middleware (audit vs. auth_token). This does not appear to have been addressed yet in the auth_token middleware. See https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/auth_token/__init__.py#L416

Changed in keystonemiddleware:
status: Invalid → New
Changed in keystonemiddleware:
assignee: nobody → Matthew Edmonds (edmondsw)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystonemiddleware (master)

Fix proposed to branch: master
Review: https://review.openstack.org/164826

Revision history for this message
Steve Martinelli (stevemar) wrote :

Can you try using the latest pycadf (0.8.0) and latest keystonemiddleware (1.50)? This should have been resolved by now.
The pycadf library's middleware component has been deprecated, and moved into keystonemiddleware.

For info on configuring the audit middleware: http://docs.openstack.org/developer/keystonemiddleware/audit.html

Revision history for this message
Matthew Edmonds (edmondsw) wrote :

I haven't seen that trace after upgrading pycadf and keystonemiddleware. But I still think the proposed change is beneficial... other things could need the id on a v3 to v2 conversion.

And I'm still having to use the deprecated pycadf audit middleware, because I can't get the one in keystonemiddleware to work. Separate issue...

Revision history for this message
Steve Martinelli (stevemar) wrote :

pycadf's audit middleware addressed this issue

Changed in keystonemiddleware:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystonemiddleware (master)

Change abandoned by Matthew Edmonds (<email address hidden>) on branch: master
Review: https://review.openstack.org/164826
Reason: Not sure this is needed anymore, so it doesn't seem to make sense to waste time debating whether it's correct or not.

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.