keystone/keystone/federation
John Dennis b33abb4b07 Federation mapping debug should show direct_maps values
If you use keystone-manage mapping_engine --engine-debug to test your
rules (or when debug logging is on during run time) the diagnostic
output fails to emit a piece of crucial information, the contents
direct map array. What you'll get instead is this:

direct_maps: <keystone.federation.utils.DirectMaps object at 0x7f7121887b00>

That's because the DirectMaps class does not have a __str__() method
and Python resorts to __ref__() in the absence of __str__() and all
__ref__() does is print the class name and it's memory location, not
very useful.

This patch adds a __str__() method to the DirectMaps class so the
debug output now includes the actual direct map data like this:

direct_maps: [['jdoe@example.com'], ['Group1', 'Group3']]

Co-Authored-By: Lance Bragstad <lbragstad@gmail.com>
Change-Id: I07643fbe3e1e712b7eac716a7f671a2d513e920b
Closes-Bug: 1841486
Signed-off-by: John Dennis <jdennis@redhat.com>
2019-09-19 11:27:53 -07:00
..
backends Add new attribute to the federation protocol API 2019-07-19 10:46:23 -07:00
__init__.py Remove exposure of routers at package level 2015-12-03 15:06:56 -03:00
constants.py Move federation extension into keystone core 2015-11-18 15:11:30 +00:00
core.py Invalidate shadow_federated_user cache when deleting protocol 2019-01-04 09:45:42 +08:00
idp.py Add missing ws seperator between words 2018-11-19 14:36:40 +08:00
schema.py Add new attribute to the federation protocol API 2019-07-19 10:46:23 -07:00
utils.py Federation mapping debug should show direct_maps values 2019-09-19 11:27:53 -07:00