ironic/ironic/tests/unit/common
Devananda van der Veen dc0dad9773 Mask instance secrets in API responses
This change adds a new policy setting, "show_instance_secrets", whose
behavior mirrors that of the existing "show_passwords" policy setting.

Whereas "show_passwords" has historically blocked all sensitive
information from the node's driver_info field, the new setting blocks
all sensitive information from the node's instance_info field, including
image_url.

The name of the old setting, "show_passwords", is not being changed at
this time because such a change is not backwards-compatible. Instead,
the documentation string for this setting has been changed to clarify
what it does. Note that the behavior has not actually changed.

Note that this change moves the policy.check("show_password") call from
the Pecan hook into the API's Nodes() class, where the
policy.check("show_instance_secrets") is also added. This makes the code
a little cleaner and more maintainable, especially if we want to add any
more checks like this in the future.

As a result of this cleanup, the ironic-specific
RequestContext.show_password property is removed.

Partial-bug: #1530972
Partial-bug: #1526752
Related-bug: #1613903

Change-Id: I48493c53971cdab3b9122897e51322e19ce2f600
2016-08-26 08:31:17 -07:00
..
__init__.py Prepare for functional testing 2015-09-28 21:27:01 +00:00
test_context.py Mask instance secrets in API responses 2016-08-26 08:31:17 -07:00
test_driver_factory.py Add 'neutron' network interface 2016-07-13 13:38:56 +03:00
test_exception.py Remove "message" attribute support from IronicException 2016-05-16 20:53:14 +00:00
test_fsm.py Replace assertRaisesRegexp with assertRaisesRegex 2016-06-21 11:25:23 +03:00
test_glance_service.py Trivial: Remove useless function call in glance service test 2016-08-09 13:35:57 +08:00
test_hash_ring.py Fix race in hash ring refresh unit test 2016-03-23 16:20:24 -07:00
test_image_service.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
test_images.py Remove iterated form of side effects 2016-07-07 10:08:55 +09:00
test_keystone.py Fix fall back to newer keystonemiddleware options 2016-08-25 18:12:10 +03:00
test_network.py Add 'neutron' network interface 2016-07-13 13:38:56 +03:00
test_neutron.py Adding InfiniBand Support 2016-08-14 09:14:34 +03:00
test_policy.py Add keystone policy support to Ironic 2016-08-04 12:43:20 +00:00
test_pxe_utils.py Adding InfiniBand Support 2016-08-14 09:14:34 +03:00
test_raid.py RAID interface to support JBOD volumes 2016-05-04 14:28:48 +00:00
test_rpc.py Add notification base classes and docs 2016-08-23 21:46:16 +00:00
test_service.py Merge "Use get_admin_context() to create the context object" 2016-04-14 13:53:45 +00:00
test_states.py Move ironic.tests.unit.base to ironic.tests.base 2015-10-22 08:57:41 -07:00
test_swift.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
test_utils.py Add multitenancy-related fields to port API object 2016-07-13 13:39:56 +03:00