Redirect stdout and stderr when using subprocess

The standard output and standard error streams where not captured
and logged in any meaningful way. This change captures those
streams and logs them in debug mode and when an exception is raised.

Closes-Bug: #1183526
Co-Authored-By: David Stanek <dstanek@dstanek.com>
Change-Id: I37fc99e0f857d21ddd02b15234a42fec5810bc03
Notification Constant Cleanup and internal notify type

Added a new notification type 'internal' that will never be public
which is utilized for communicating certain things exclusively to the
notification callback system where there is no overlap with the
public notifications (to be put on the bus) or if there are special
case notification data types.

Basic cleanup on constants within the notification callbacks has been
done to utilize a centrally defined set of notification types and
internal-specific user token invalidation. Forward looking some more
constant cleanup will need to occur. Eventually there will be
additional internal-notification types.

This is all in support of removing the dependency of moving to
non-persistent tokens which requires unifying token persistence
management.

Change-Id: I16b608e8502f38c3a88579aa1bc91b4af7ed7bc9
bp: non-persistent-tokens
Remove assignment_api dependency on token_api

The assignment_api now uses the callback system to avoid needing
to directly call token_api for invalidating the tokens in the
token persistence system.

This change is in support of non-persistent tokens which has a
dependency on unifying interactions with the token persistence
system.

Change-Id: I66af0a7281cf9a4d451f0f6d86da8182e2cc0e60
bp: non-persistent-tokens
Remove oauth controller dependency on token_api

The oauth controllers now use a mixture of internal callbacks and
the token_provider_api.validate_token instead of directly calling
the token_api delete token methods.

Change-Id: I454a592747dc5a4438541a8cecbcd796dd8378ab
bp: non-persistent-tokens
Remove SAML2 plugin dependency on token_api

Remove the SAML2 auth plugin's dependency on the token_api by utilizing
the token_provider_api.validate_token instead of token_api.get_token and
leveraging the KeystoneToken model instead of doing direct lookups on the
dictionary returned.

This change is to ensure interactions with the token persistence system
are consistent and supporting the ability to toggle token persistence
in the future.

Change-Id: I1a38156ff5535e1dd52460040891ad50500d4c71
bp: non-persistent-tokens
Mark methods on token_api deprecated

Mark the methods on token_api as deprecated. The versionutils.deprecated
decorator will only work with functions and classes (meaning it cannot
be applied to instance methods post instantiation). A log line is used
that should only trigger once per object on token_api instead of the
versionutils decorator.

Change-Id: I97c96c239262697b0df37ef895c4bafa262892e0
bp: non-persistent-tokens
bp: deprecated-as-of-juno
Add extra guarding to revoke_by_audit_id methods

Guard against an event that is both project and domain scoped in the
revoke by audit_id and revoke by audit_chain_id methods.

Change-Id: Ia2f562a47551cffd9d4e5bd630ff7d55d8c7aef8
bp: non-persistent-tokens
Add libxmlsec1 as external package dependency on OS X

This is required to use pysaml2.

There are several packages related to libxmlsec1 on Debian and Fedora,
and I'm not sure which is/are required without testing, so this patch is
limited to documenting the change required for OS X.

Implements bp keystone-to-keystone-federation

Change-Id: I61586a0b6d9411136f7e2d5a3f991bee4617f355
Make persistence manager in token_provider_api private

The token_provider_api persistence manager is now private this is
to ensure clear control over how the token persistence is utilized
and allowing for toggling when fully non-persistent tokens are
supported.

Change-Id: Id2bc82ee6d77201c5d1d868aa7584b3553fba97a
bp: non-persistent-tokens
Update tests to not use token_api

Update tests to use token_provider_api._persistence instead of
token_api (as token_api is deprecated).

Change-Id: Ie465dd2f15a5ac9695de230fd430ad511642682f
bp: non-persistent-tokens
Update sample config

noticed it was out of date again.

Change-Id: I63519682a70052cf05235671a842e799900b5b98
Add bash code style to some portions of configuration.rst

Some bash commands were not being formatted correctly, or did not
have a leading $.

Change-Id: I3939521ce1119f3957adf02004c16ded9fe13f96
Merge "Notification Constant Cleanup and internal notify type"
Mark kvs backends as deprecated, for removal in Kilo.

Although kvs.Base was marked from removal in Juno, the backends
themselves were not explicitly marked. This patch does this,
as well as extendes kvs.Base also to Kilo so that they can all
be removed together.

Partially implements: bp deprecated-as-of-juno
Change-Id: Ia2e7c95074c4b6b9743c6086842105a5579fc0c9
Notification cleanup: namespace actions

Update the notification actions to be properly namespaced  rather than
simple constant strings. This is a followup to the general notification
constant cleanup changeset.

Change-Id: Ife7597eba4a797b6909acd76720e46ee20a91727
bp: non-persistent-tokens
Comments to docstrings for notification emit methods

Update the comments to docstrings for the assignment and identity
notification emitting methods.

Change-Id: I1a6297de4f93ffec637978232412fa095e8e12b1
bp: non-persistent-tokens
Add commas for ease of maintenance

Add commas to lists to make adding to the lists easier. This is
correcting some nits from earlier changesets.

Change-Id: I3ab3f230917e4f2156ba667e870dd92fd55c896e
Merge "Update sample config"
Merge "Remove assignment_api dependency on token_api"
Merge "Add libxmlsec1 as external package dependency on OS X"