Add WWW-Authenticate header in 401 responses.

This review come from https://review.openstack.org/#/c/41707/, due to the
inactive in that.

Add the WWW-Authenticate in header when Keystone responds with 401 status
code. The format of the header is

WWW-Authenticate: Keystone uri="http://localhost:5000/"

as indicated in

http://docs.openstack.org/developer/keystone/middlewarearchitecture.html#exchanging-user-information .

Closes-Bug: #1153719
Change-Id: Iaa2291c66a9b126982b8aad0ddbfa9468dfc5d3e
Update mailmap for Joe Gordon

Update mailmap to reflect that I am committing from a new email address.

Change-Id: Id87601ce73ada6b6ac9763f381bdc28853818428
Fix issue deleting ec2-credentials as non-admin user

The ec2tokens controller incorrectly uses the access id, not the
hashed credential id in _assert_owner, which means that non-admin
users can't delete their ec2-credentials.  Adding the hashing, as
in _get_credentials fixes the problem.  Test added demonstrating
the issue.

Change-Id: Ifb6e3e10a50541cf21d25880bd74e9aeb6df4f26
Closes-Bug: #1245435
fix unparseable JSON

- use only double quotes
- remove trailing commas for last element
- add trailing newline

Change-Id: I3f47a25cdac429d95319ca80c6622b9cb1460446
Closes-Bug: #1249117
Return an error when a non-existing tenant is added to a user

Currently, if a user is created without a tenantId, adding a
non-existing tenantId to that user succeeds.  This change
checks for whether the tenant exists in cases where the check
was previously skipped.

Closes-Bug: #1246473

Change-Id: I2a814c5df902a97297ad05950ae4205664ddf6e6
Detangle v3 RestfulTestCase setup

The v3 RestfulTestCase and base RestfulTestCase setup were intertwined
in such a way that there was lots of duplicated work executed for each
test.

Change-Id: I345ae83f60aba0a197b08103bd457e546942eeca
Remove obsolete redhat-eventlet.patch

See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gory details on
why this exists.

As of this fix:

  https://github.com/eventlet/eventlet/pull/34

which was released in eventlet 0.13, we no longer need the patch.

This has now been removed from oslo-incubator, so this is really just
syncing that removal.

Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
Proxy Assignment from Identity Deprecated

The identity_api served as a proxy for calling the assignment_api
and a majority of this proxy mechanism was removed.  This is the
second pass on the proxy cleanup fixing up the lingering domain
calls from the identity core api.

All proxy calls removed in the Icehouse development cycle (so far)
have been re-added and now have the @deprecated mechanism used to
indicate the support will be removed once development for J release
has been opened as discussed at the Icehouse design summit. See
https://etherpad.openstack.org/p/icehouse-keystone-internal-apis
for information on why these were added back in.

closes-bug: #1220913
Change-Id: If28b6d9189fa5879c8dbe131174b8cb8f84d9668
Allow use of rules Policy driver

With the implementation of bp abstract-base-class-drivers , the
"rules" Policy driver couldn't be used anymore because it didn't
implement the methods in the base class.

This change makes it so that the rules Policy driver can be used
again.

bp abstract-base-class-drivers

Change-Id: Ia2a5d42007f7480c2757932afcde35f121e05cab
Rewrites the serveapp method into a fixture

As a fixture we will no longer have to remember to kill the server when
you are done with it. Additionally we are able to use the fixture as a
context manager.

Change-Id: If283e12cde362d3eadc96318b5cf6799a813c14a
Partial-Bug: #1247443
Add memcache options to sample config

The memcache options from keystone.common.config weren't included
in the sample config file (keystone.conf.sample).

Having these options in the sample config file makes it easier to
update them when using the memcache token backend.

Change-Id: I49b5c928bcc7f170f049277c7dad0bae58b1504e
Role NoneType object has no attribute setdefault

Havana Keystone configured with LDAP.

When you try to update a role using the API:

curl -X PATCH --insecure -H "X-Auth-Token:the_token" -H
"Content-type:
application/json" -d '{"role": {"name": "the new name"}}'
https://localhost:35357/v3/roles/role_id

Keystone server raises an error:

{"error": {"message": "An unexpected error prevented the server from
fulfilling your request. 'NoneType' object has no attribute
'setdefault'", "code": 500, "title": "Internal Server Error"}}

The role information is updated, but keystone server raises that
error.

Closes-Bug: #1247830

Change-Id: I686e40e42371f6e2cea55110554456a33939799c
Merge "Update mailmap for Joe Gordon"
Merge "Add WWW-Authenticate header in 401 responses."
Merge "Detangle v3 RestfulTestCase setup"
Merge "Fix issue deleting ec2-credentials as non-admin user"
Merge "fix unparseable JSON"
Merge "Remove obsolete redhat-eventlet.patch"
Merge "Add memcache options to sample config"
Merge "Rewrites the serveapp method into a fixture"