Add size validations for /tokens.

Updates /tokens controller so that it explicitly checks the max
size of userId, username, tenantId, tenantname, token, and password
before continuing with a request.

Previously, when used with the SQL keystone backend an unauthenticated
user could send in *really* large requests which would ultimately
log large SQL exceptions and could thus fill up keystone logs on the
disk.

Change-Id: I0904d307bf79a3bf851ac052c11101f8380a12a7
Bump version to 2012.2.4

Change-Id: I9dab1dc62e41cdb4143a3c8083e65c4b13a22eb4
Merge "Add size validations for /tokens." into stable/folsom
Disable XML entity parsing

Fixes bug 1100282 and bug 1100279.

Change-Id: Ibf2d73bca17b689cfa2dfd29eb15ea6e7458a123
Ensure user and tenant enabled in EC2

Fixes bug 1121494.

Change-Id: Icc90d581691b5aa63754e076ce983dfa2885a1dc
Merge "Ensure user and tenant enabled in EC2" into stable/folsom
Sync timeutils to pick up normalize fix.

Required to backport fix for bug 1074172.

Change-Id: I6003abedcfc6ba9d287cabda35c0bbc821519008
Backport of fix for 24-hour failure of pki.

A 401 from the admin token was being treated as an invalid user token
and the admin token was never re-requested. This would cause all
services to incorrectly report all tokens as invalid after the service
had been running for 24 hours. This change re-requests the admin token
and attempts to revalidate instead of returning 401.

Original commit message follows:

fixes bug 1074172

updated diablo token based on output from diablo/stable keystone
added expiry to example tokens for test_auth_middleware
added a stack based HTTP response to test_auth_middleware to verify
sequencing

Change-Id: I738b0e9c1a0e62ad86adb95ec0b73f621513f7d4
(cherry picked from commit 7cc02c80cfb1976271fa8b6271091fcd35c1cb34)
add check for config-dir parameter (bug1101129)

Change-Id: I5cd454cc3c5bf5da9656c05e9a22385ffcd01147
Use the right subprocess based on os monkeypatch

This works around the following eventlet bug:

https://bitbucket.org/which_linden/eventlet/issue/92

by using the green version of Popen if os has been
monkeypatched. It also has the side effect of making the ssl
calls not block the reactor for workers that use eventlet.

Master Change ID was: I1457237f52310f0536fbcdcaa42174b17e8edbf5

Change-Id: I5b86f9920754a6ade770a336d21072ab0f36f457
auth_token hash pki
key PKI tokens on hash in memcached when accessed by auth_token
middelware

(cherry picked from commit 75496bbe6940e72fd42dcaacbfc92b6cf92b1149)

Bug 1073343

Change-Id: I32e5481f82fd110c855d7e1138c3d43c73099bbb
Retry http_request and json_request failure.

Temporary network outages or keystone server restarts can lead
to a connection refused in auth_token middleware. Rather than
failing immediately, this patch attempts to retry a few times.

Fixes bug 1150299

(pulled from python-keystoneclient commit
9bb29b9dff4d220eaabf86cd286e651c5ae15b98)

Change-Id: I2ecf0d7745290976efcb3e3cd6511817a53d3e0a
validate from backend (bug 1129713)

In certain cases we were depending on CMS to validate PKI tokens
but that is not necessary, and by passes the revocation check

Change-Id: I9d7e60b074aa8c8859971618fed20c8cde2220c4
Merge "Retry http_request and json_request failure." into stable/folsom
Merge "add check for config-dir parameter (bug1101129)" into stable/folsom
Merge "Use the right subprocess based on os monkeypatch" into stable/folsom
Merge "auth_token hash pki key PKI tokens on hash in memcached when accessed by auth_token middelware" into stable/folsom
key all backends off of hash of pki token.

Backporting to ensure memcached support is correct.

Bug 1073272

Change-Id: If55b3b595fa6f3b5e773a502fc69e7da2c3bd114
Merge remote-tracking branch 'upstream/stable/folsom' into folsom