catch errors in wsgi.Middleware.

- Catch errors in wsgi.Middleware like done in wsgi.Applications.
- Add tests for test_middleware.
- Fixes bug 1128379.

Change-Id: I2e95595c392631aebf2682d4506e4dde78cd6d69
Rework S3Token middleware tests.

- Split between good and bad tests.
- Add more tests to get to 100% coverage.

Change-Id: Iffd00c2b557e54b122f29f8b0ec7f7ab7a92d16e
Explain LDAP page_size & default value

Change-Id: If7746bf92c29e824369777764877a414dc7a5d6e
Make getting user-domain roles backend independant

There is nothing backend specific in geting the list of roles
for a user-domain, so we should move this function into backends
core.  This also has the affect of now ensuring that the kvs and ldap
support will work, provided the specific backend supports roles on
users and domains.  This is true today for kvs, but support in ldap
for domains is gated by other bugs.

Fixes bug #1131769

Change-Id: Id99accb33fd7cd8d6c37e64e140552c5bfe68349
Remove TODO that didn't land in grizzly

This was intended to be removed during grizzly by utilizing centralized
policy storage on /v3/policies -- but such a feature hasn't been
implemented yet beyond the API.

Change-Id: Ie696bc671fc1d6fd05cc1dda376d2be945097845
residual grants after delete action (bug1125637)

remove all applicable grants when role is deleted
(sql/kvs solution only)

Fixes: bug #1125637
Change-Id: I3a958c6d56739e37a95f6c713fab154827e9ceca
cleanup trusts in controllers

Change-Id: I1eff618d1e6cef2eb10ae7e737b0ca0beaca1d4d
Change exception raised to Forbidden on trust_id

Change-Id: I30f89d52ade45335d2f29b8454438d0dd3b20a97
unable to load certificate should abort request

If openssl returns with a command line error (3), we assume
the PKI certificate is not properly installed.  Added
'try ... except' blocks to cms_sign_text and cms_sign_token
calls.

Fixes: bug #1103569
Change-Id: Iad98738e990d3ab1ec0d0015840d76cf948ae560
add missing attributes for group/project tables (bug1126021)

add and assign default values for optional attributes to all backends

Change-Id: I54fe234b919162c3056c14f1f06c4de876080fb9
return 201 Created on POST request (bug1131119)

correct status code from 200 Ok to 201 Created for v3 POST requests.

Fixes: bug #1131119
Change-Id: Iabeb6daf677e0f34defdef5e58d87229fc90346f
v3 endpoints won't have legacy ID's (bug 1150930)

Change-Id: I8cc6bac7b0e549db7755df3a993db7d563907324
from tests import

Makes the resolution of local imports work
when running individual tests.

Bug 1152326

Change-Id: I72f54bdbb60a6d7acf32bdbdc02d7bce69add84e
Delete tokens for user

Bug 1152283

There was a typo in the function that showed it
was untested.  This fixes the typo and adds a unit test

It also corrects the logic in the KVS backend to ignore
the user_id field when listing tokens by trust_id

Change-Id: I5325c04e53a09fce68f3d350e7502341a398aa05
Merge "unable to load certificate should abort request"
Merge "add missing attributes for group/project tables (bug1126021)"
Merge "v3 endpoints won't have legacy ID's (bug 1150930)"
Fix folsom -> grizzly role table migration issues (bug 1119789)

Change-Id: Id7e5b3354d9139afa0a69b283924f363847cef56
bug 1133526

modify "expires" to "expires_at", most of the changes were
already done by Guang-yee, added a pki-token-id test

Change-Id: Ib3f39620db18aaea6b0cb5d0ae9c290afd870605
remove spurious roles check

Change-Id: Ia4909478703d5fe9fb4fec7377c4030cf67eae7b