Require authz for user role list (bug 1006815)

Change-Id: I65f25dcca3e265f44746930917434b45e64de15e
Carrying over token expiry time when token chaining

Fixes bug #998185

This commit causes the token expiry time to be maintained when
one token is being created from another

Change-Id: I7b61692a60d9227423b93c267864a5abe939ca33
fix importing of optional modules in auth_token

* keystone/middleware/auth_token.py: Catch the
correct exception so that the memcache and iso8601
modules can be optional as intended.
* tests/test_auth_token_middleware.py: Test
the ImportError path
* keystone/test.py: Add a new mixin class to
support disabling importing of a module.

Bug: 1003715
Change-Id: I87cc2f3bc79b17a52ea672bac7e0ebcf9e1fce57
Revert file mode to be non-executable

Change-Id: Ib2a84f1e5d7d155fc53c60ede073c96a2332d030
Tweak for easier, safer subclassing

Implements the "follow up suggestion" in blueprint sql-identiy-pam

Moved the call to utils.check_password call to its own subroutine.
This allows anyone creating a subclass for sql.Identity to just replace
this new 'check_password' method rather than the entire
'authenticate' method. (This is modeled after ldap/core.py which
already does this.) If the logic in 'authenticate' changes, any
derrived classes won't need to be modified.

Updated to make method private.

Change-Id: I1a06596861fd016f63f5f1a5fe8180993f04f4f5
Merge "fix importing of optional modules in auth_token"
Add s3 extension in keystone.conf sample.

- Document S3 functionality along the way.

Change-Id: I5525cd084aa16a33176c2ed0c3df53e9743072fc
Merge "Require authz for user role list (bug 1006815)"
Use cfg's new global CONF object

Implements blueprint cfg-global-object

Change-Id: Ic53b41dafa8666ce21f33697f7e8697f1e5cb0fd
Merge "Tweak for easier, safer subclassing"
Merge "Use cfg's new global CONF object"
Merge "Carrying over token expiry time when token chaining"
Clean up test requires a bit.

The main culprit here was prettytable - but because of the way this was
working, it was causing intermittent transient network issues from pypi in
the devstack gates.

Change-Id: I62117116c850361c5e2de7e6485c14ef43007c1d
PEP8 fixes

Change-Id: I0989396691eb31d9008c016e64f2c197f8c7e48c
Speed up SQL unit tests.

Using a cached copy of the SQLite Data base speeds up the tests:

Before this change

Ran 44 tests in 126.154s
OK
Slowest 5 tests took 15.87 secs:
    3.34       test_delete_role (test_backend_sql.SqlIdentity)
    3.17       test_delete_user_with_tenant_association (test_backend_sql.SqlIdentity)
    3.17       test_create_tenant_invalid_name_fails (test_backend_sql.SqlIdentity)
    3.10       test_get_user (test_backend_sql.SqlIdentity)
    3.10       test_get_tenant_bad_tenant (test_backend_sql.SqlIdentity)

After this change:

Ran 44 tests in 58.996s

OK
Slowest 5 tests took 8.64 secs:
    2.57       test_add_user_to_tenant (test_backend_sql.SqlIdentity)
    1.58       test_update_tenant_long_name_fails (test_backend_sql.SqlIdentity)
    1.51       test_rename_duplicate_user_name_fails (test_backend_sql.SqlIdentity)
    1.50       test_delete_tenant_with_user_association (test_backend_sql.SqlIdentity)
    1.49       test_delete_user_with_tenant_association (test_backend_sql.SqlIdentity)

Slowest test was where the database was initialized

Change-Id: Idf046763e8718762695bbcedce4d223f654054db
Monkey patching 'thread'.

Fixes bug 1012381.

Change-Id: Icb7b2372df96d647fc6dcd4c4ebe72c8aa607f9d
400 on unrecognized content type (bug 1012282)

Unrecognized content type:
  http://paste.openstack.org/raw/18537/

Malformed JSON:
  http://paste.openstack.org/raw/18536/

Change-Id: I76afbf9300bcb1c11bed74eddbe4972c451c5877
Merge "Speed up SQL unit tests."
Fixed typo in routing conditions (bug 1006793)

The kwarg should be 'method' not 'methods', per Routes docs.
See: http://routes.readthedocs.org/en/latest/setting_up.html#conditions

Example in lieu of negative tests...
Without this change: http://paste.openstack.org/raw/18326/
With this change: http://paste.openstack.org/raw/18325/

Change-Id: If91fc0c79b320652674c68c433989a60c098dc1e
Merge "400 on unrecognized content type (bug 1012282)"