swift/test/unit/common/middleware
Clay Gerrard f9bed74d1b Return 403 on unauthorized upload when over account quota
If you try an unauthorized upload into a container that is over quota you get
a 403 instead of a 413, but if you try to unauthorized upload when an
*account* is over quota you can see the 413 even though the upload would have
been rejected by the authorize callback.  By wrapping the authorize callback
associated with the incoming request we can make sure to only return our 413
when the request would have been authorized otherwise.

Drive by doc fixes thanks to acoles:

 * State that container_quotas should be after auth middleware in
   the class doc string.
 * Add note to proxy-server.conf.sample that account_quotas should
   be after auth middleware.

The equivalent statements are already in place for each quota
middleware.

Doc-Impact

Closes-Bug: #1387415
Change-Id: I2a88b3ec79d35bfdd73ea6ad64e376b7c7af4ea6
2014-10-30 14:03:56 -07:00
..
__init__.py Initial commit of middleware refactor 2010-08-20 00:42:38 +00:00
helpers.py Add container-reconciler daemon 2014-06-18 17:31:39 -07:00
test_account_quotas.py Return 403 on unauthorized upload when over account quota 2014-10-30 14:03:56 -07:00
test_acl.py Fix invalid account acl generating 500 response. 2014-02-19 18:32:53 +00:00
test_bulk.py Rework use of constraints to ease testing 2014-04-02 23:48:01 -04:00
test_cname_lookup.py Allow multiple storage_domain in cname_lookup. 2014-01-26 10:45:19 +00:00
test_container_sync.py Add Storage Policy Support to Container Sync 2014-06-18 21:09:54 -07:00
test_crossdomain.py Corrected many style violations in the tests. 2013-07-24 10:18:47 -07:00
test_dlo.py Fixes unit tests to clean up temporary directories 2014-09-26 22:39:48 +05:30
test_domain_remap.py Allow empty reseller prefixes in domain_remap 2014-04-23 23:59:28 +01:00
test_except.py Let users add their own txid suffixes 2014-05-16 15:29:47 -04:00
test_formpost.py Move multipart MIME parser into utils 2014-09-16 10:10:59 -07:00
test_gatekeeper.py Uses None instead of mutables for function param defaults 2014-05-10 11:15:56 +00:00
test_healthcheck.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_keystoneauth.py Restrict keystone cross-tenant ACLs to IDs 2014-08-08 15:58:29 +01:00
test_list_endpoints.py Add v2 API to list endpoints middleware 2014-07-17 11:48:27 +01:00
test_memcache.py Fix for memcache middleware configuration 2013-11-26 18:03:33 +00:00
test_name_check.py Convert maximum length to integer in name_check 2014-10-08 09:59:47 +05:30
test_proxy_logging.py Change the default token logged length to 16 2014-05-20 19:46:38 -07:00
test_quotas.py Return verbose message if account quota exceeded 2014-10-29 12:45:15 +01:00
test_ratelimit.py use get_container_info in ratelimit 2014-09-25 16:29:57 +00:00
test_recon.py Parallel object auditor 2014-06-25 16:57:53 +01:00
test_slo.py Fix SLO test with old simplejson 2014-06-16 10:43:22 -07:00
test_staticweb.py Improve StaticWeb 404 on web-listings/index 2014-02-18 11:46:31 +00:00
test_tempauth.py Fix invalid account acl generating 500 response. 2014-02-19 18:32:53 +00:00
test_tempurl.py test tempurl header sanitization priority 2014-09-08 12:25:54 -07:00
test_xprofile.py Fixes unit tests to clean up temporary directories 2014-09-26 22:39:48 +05:30