swift3/swift3
Kota Tsuyuzaki 4336ff4f99 Deny all access to controller instance method
Current swift3 middleware can allow to access the controller instance
method via HTTP verb and it may have a risk to be attacked like brute
force.

likely:
  from boto.s3.connection import S3Connection
  conn = S3Connection(<snip>)
  # expected 405 Method Not Allowed but this results in 500
  # InternalError
  conn.make_request('_delete_segments_bucket', 'bucket')

Probably all instance method except public verb like ones don't work
well and nothing leaked but it will absolutely 500 InternalError without
any information. This is worse. Thus we should strict the method anyway.

This patch fixes it to set swift.common.utils.public decorator for all
public methods and then middleware will deny the accesses for non-public
methods.

Closes-Bug: #1592250

Change-Id: Ia5579011701eaff2bca555efe950b0c11a3ff5b9
2016-06-14 19:04:14 -07:00
..
controllers Deny all access to controller instance method 2016-06-14 19:04:14 -07:00
schema Fix response of Upload Part Copy requests 2015-01-20 10:34:54 +09:00
test Deny all access to controller instance method 2016-06-14 19:04:14 -07:00
__init__.py Remove pbr dependency at run time 2014-04-22 16:02:16 +09:00
acl_handlers.py Fix cleanup segment container 2016-02-02 23:07:27 -08:00
acl_utils.py Move acl related functions to acl_utils.py 2015-04-07 01:44:31 +00:00
cfg.py Fix DELETE Object to delete segments when it is multipart object 2015-09-08 20:29:17 +00:00
etree.py Fix pylint E1111 Error on pkg_resource 2015-12-22 04:20:16 -08:00
exception.py acl: add preliminary support for S3 ACL 2014-12-08 11:42:27 +09:00
middleware.py Deny all access to controller instance method 2016-06-14 19:04:14 -07:00
request.py Re:implement AWS signature v4 2016-06-01 19:03:37 -07:00
response.py Re:implement AWS signature v4 2016-06-01 19:03:37 -07:00
s3_token_middleware.py Add s3token middleware to the swift3 project 2016-05-20 10:07:51 -07:00
subresource.py Fix date validation 2015-12-09 01:19:15 -08:00
utils.py Re:implement AWS signature v4 2016-06-01 19:03:37 -07:00