summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Do not reveal auth token in swiftclient log messages by defaultliberty-eolstable/libertyJoel Wright2016-03-084-12/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the swiftclient logs sensitive info in headers when logging HTTP requests. This patch hides sensitive info in headers such as 'X-Auth-Token' in a similar way to swift itself (we add a 'reveal_sensitive_prefix' configuration to the client). With this patch, tokens are truncated by removing the specified number of characters, after which '...' is appended to the logged token to indicate that it has been redacted. Also include client.parse_header_string() for safe unicode handling of header data. Backport based on commits: c3f06417049e17a8d45ee5926c5043cb6c8aa9ef 4d44dcf36086add13d3353915c014f095ab99c6d ce569f46517e10f2ce0d27e9ee0a922ad1d84e2f 46d817828082105a69d4da53fef2f2fbefc54809 aa0edd00966237163451fc44cda2c593a5215cbe Co-Authored-By: Tim Burke <tim.burke@gmail.com> Co-Authored-By: Alistair Coles <alistair.coles@hpe.com> Co-Authored-By: Li Cheng <shcli@cn.ibm.com> Co-Authored-By: Zack M. Davis <zdavis@swiftstack.com> Change-Id: I71fc5aad23bc076b06f75888c3ea507feffc7b48 Closes-bug: #1516692
* Fix the http request headers being overwritten in loggingMin Min Ren2016-02-251-1/+0
| | | | | | | | | Fix the http request headers in put_object being overwritten in logging Cherry-picked from commit 61880c6f980cb8e613bdf6cb48a9a61ce7488162 Change-Id: Id0d1e36561a61ed1ce30d93c801ec32f058a6fa4 Closes-bug: #1501292
* Merge "Update .gitreview for stable/liberty" into stable/libertyJenkins2015-12-011-0/+1
|\
| * Update .gitreview for stable/libertyDoug Hellmann2015-09-211-0/+1
| | | | | | | | Change-Id: I2943b0dbcfc988bbd471b56ef7d02a515d49e16f
* | Change ignore-errors to ignore_errorsMonty Taylor2015-11-301-1/+1
|/ | | | | | | Needed for coverage 4.0 Change-Id: I2789541f67d6adbdc8454183753832488fe2bbe2 (cherry picked from commit ccc3aa49ee654286c169afce558455cfb9f2d4ba)
* updated changelog for 2.6.0 release2.6.0John Dickinson2015-09-071-5/+10
| | | | | | Instead of a 2.5.1 release, add in the absolute tempurl option to the release and bump it to 2.6.0 Change-Id: Ie8335a737aac3211a240c25d88501f8f5dbccbea
* Merge "absolute expiry option for tempURL generation"Jenkins2015-09-055-20/+52
|\
| * absolute expiry option for tempURL generationZack M. Davis2015-09-045-20/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `tempurl` subcommand's second positional argument is called `seconds` and has heretofore interpreted as the number of seconds for which the tempURL should be valid, counting from the moment of running the command. This is indeed a common, if not the most common, use-case. But some users, occasionally, might want to generate a tempURL that expires at some particular ("absolute") time, rather than a particular amount of time relative to the moment of happening to run the command. (One might make an analogy to the way in which Swift's expiring object support supports an `X-Delete-At` header in addition to `X-Delete-After`—and it's the former that must be regarded as ontologically prior.) Thus, this commit adds an `--absolute` optional argument to the `tempurl` subcommand; if present, the `seconds` argument will be interpreted as a Unix timestamp of when the tempURL should be expire, rather than a duration for which the tempURL should be valid starting from "now". Change-Id: If9ded96f2799800958d5063127f3de812f50ef06
* | do hand-curated authors/changelog filesJohn Dickinson2015-09-045-3/+553
|/ | | | Change-Id: I1a264c9ce1d137b18a6dc62623a282e4a2fe839c
* Merge "Log and report trace on service operation fails"Jenkins2015-09-043-61/+241
|\
| * Log and report trace on service operation failsJoel Wright2015-08-313-61/+241
| | | | | | | | | | | | | | | | | | This patch adds exception logging to the swift service API. Each operation that results in failure of any operation will now log the exception as well as report a timestamp and full stack trace in the results returned by the service API calls. Change-Id: I7336b28354e7740ea7d048bdf355e3c1a1b4436c
* | Merge "Increase httplib._MAXHEADERS to 256."Jenkins2015-09-031-1/+4
|\ \
| * | Increase httplib._MAXHEADERS to 256.Charles Hsu2015-08-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default Swift increase the number of max metadata count to 90 and extra header count to 32. That mean we can put 90 metadata to Account/Container/Object by default, when user put 90 metadata to a Account, the Account header count is close or more than 100. The swift client unable to access Account and get an error likes, ('Connection aborted.', HTTPException('got more than 100 headers',)) So the default _MAXHEADERS(100) won't enough. Change-Id: I5ffc4eb5d3e1ebc3dbdd7dc69376919ae3e1c5a8
* | | Merge "Cleanup and improve tests for download"Jenkins2015-09-032-33/+42
|\ \ \
| * | | Cleanup and improve tests for downloadAlistair Coles2015-09-022-33/+42
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Some improvements to the tests for staggered download that were added in [1]. [1] Ie737cbb7f8b1fa8a79bbb88914730b05aa7f2906 Change-Id: Ib999bc7bd198c1d9c217c57501f751e854d4c6ad
* | | Merge "Drop flake8 ignores for already-passing tests"Jenkins2015-09-031-8/+1
|\ \ \
| * | | Drop flake8 ignores for already-passing testsTim Burke2015-08-191-8/+1
| | | | | | | | | | | | | | | | Change-Id: I5fb349b2f7808a3f97d95fc7db6b5cf5842a9f7c
* | | | Merge "Stop Connection class modifying os_options parameter"Jenkins2015-09-032-1/+28
|\ \ \ \ | |_|/ / |/| | |
| * | | Stop Connection class modifying os_options parameterAlistair Coles2015-08-252-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a caller passes an os_options dict to the Connection class constructor, the constructor may modify the os_options dict, which can surprise the caller if they re-use the os_options dict. Specifically the os_options tenant_name and object_storage_url may be modified, and the changed values would then leak through to a subsequent Connection constructed using the same os_options dict. This fix simply constructs a new dict from the supplied os_options. The patch also adds a test that covers this and also verifies that a preauth_url passed as a keyword arg to Connection() will take precedence over any object_storage_url in an os_options parameter. Closes-Bug: 1488070 Change-Id: Ic6b5cf3ac68c505de155619f2610be9529e15432
* | | | Merge "Reduce memory usage for download/delete and add --no-shuffle option ↵Jenkins2015-08-284-100/+595
|\ \ \ \ | |/ / / |/| | | | | | | to st_download"
| * | | Reduce memory usage for download/delete and add --no-shuffle option to ↵Joel Wright2015-07-204-100/+595
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | st_download The current code builds a full object listing before performing either a multiple download or delete operation (and also shuffles this complete list in the case of a download). This patch removes the creation of the full object list and adds the ability to turn off shuffle for files when downloading. Also added is a limit on the number of list results that can be queued by a single call to service.list without consuming results (reduces memory overhead for large listings). Some tests added for service.py download and list. Change-Id: Ie737cbb7f8b1fa8a79bbb88914730b05aa7f2906
* | | | Merge "Add minimal working service token support."Jenkins2015-08-252-20/+409
|\ \ \ \ | |_|/ / |/| | |
| * | | Add minimal working service token support.Stuart McLaren2015-08-242-20/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add client changes to allow accessing alternative reseller_prefixes via a service token. ie client changes for this server side spec: https://review.openstack.org/#/c/105228 We assume that the service storage url has been passed in as a preauthurl. We rely on get_auth preserving this url. Change-Id: I1cfda178f0b6c8add46cfebd6bf38440caae2036
* | | | flake8 ignores same hacks as swiftHiroshi Miura2015-08-184-46/+52
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - blacklisted flake8 hacking - fix against E122 continuation line missing indentation or outdented Closes-bug: #1475516 Change-Id: I708d0a3466a1f85c84e478873e142821ce0774cb Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
* | | Merge "Update mock to get away from env markers"Jenkins2015-08-141-2/+1
|\ \ \ | |/ / |/| |
| * | Update mock to get away from env markersChristian Schwede2015-08-061-2/+1
| |/ | | | | | | | | | | | | | | | | Closes-Bug: 1476585 Bug has been reproduced on a fresh installed SAIO using https://github.com/swiftstack/vagrant-swift-all-in-one. Change-Id: I0300319baf7e2d8c27d1c19957894396505caeb8
* | Merge "change deprecated assertEquals to assertEqual"Jenkins2015-08-115-51/+52
|\ \
| * | change deprecated assertEquals to assertEqualHiroshi Miura2015-08-065-51/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix against H234: assertEquals() logs a DeprecationWarning in Python3.x. use assertEqual() instead. Closes-bug: #1480776 Change-Id: Iffda6bb5f2616d4af4567eeea37bb26531e34371 Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
* | | Merge "make Connection.get_auth set url and token attributes on self"Jenkins2015-08-062-7/+19
|\ \ \ | |/ / |/| |
| * | make Connection.get_auth set url and token attributes on selfZack M. Davis2015-07-242-7/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Connection is first __init__ialized (without providing a preauthurl or preauthtoken), the url and token attributes are None; they get set (to be reused on future requests) after one of the wrapper methods internally using _retry (head_account, get_container, put_object, and similar friends) is called. However, this had not been the case for get_auth, much to the momentary confusion and disappointment of programmers using swiftclient who expected to be able to get the token or storage URL off the Connection object after calling get_auth (perhaps in order to make an unusual kind of request that swiftclient doesn't already have a function for). This commit makes get_auth set the url and token attributes as one might expect. Change-Id: I0d9593eb5b072c8e3fa84f7d5a4c948c0bc6037a
* | fix old style class definition(H238)Hiroshi Miura2015-08-042-2/+3
| | | | | | | | | | Change-Id: Ib5be06fa544f5eb3061c6a3077a3b9986382ecfe Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
* | Merge "Block comment PEP8 fix."Jenkins2015-08-012-2/+2
|\ \
| * | Block comment PEP8 fix.Ondrej Novy2015-07-302-2/+2
| | | | | | | | | | | | Change-Id: I999425902a5c82f7af129a8a1b6998d80edb225a
* | | Merge "Test auth params together with --help option."Jenkins2015-07-311-3/+13
|\ \ \ | |/ /
| * | Test auth params together with --help option.Ondrej Novy2015-07-301-3/+13
| |/ | | | | | | Change-Id: I2691739cc14bb8d384cc7ef0f8a3e73d1b898f88
* | Merge "swiftclient: add short options to help message"Jenkins2015-07-311-34/+43
|\ \ | |/ |/|
| * swiftclient: add short options to help messageHiroshi Miura2015-07-171-34/+43
| | | | | | | | | | | | | | | | | | | | | | | | - add usage strings for short option such as '-a' for '--all' This add all short options to usage text. - add missing --header usage help for download command - some cometic changes Closes-bug: #1475511 Change-Id: Ibfecac8764669540fa025787548133a50fa50b10 Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
* | Merge "Python 3: Replacing unicode with six.text_type for py3 compatibility"Jenkins2015-07-161-1/+1
|\ \
| * | Python 3: Replacing unicode with six.text_type for py3 compatibilityjanonymous2015-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "unicode" type was renamed to "str" in Python 3. Use six.text_type to make swiftclient compatible with Python 3. For more information about changes needed for py3 compatibility, see: https://wiki.openstack.org/wiki/Python3 Change-Id: Ic65607a69935652a1874340928f626fbcc35c014
* | | Merge "Always decode command-line arguments as UTF-8"2.5.0Jenkins2015-07-162-27/+63
|\ \ \
| * | | Always decode command-line arguments as UTF-8Tim Burke2015-07-072-27/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was always an implicit assumption that they were UTF-8 before, and by converting them to unicode we close another hole allowing raw bytes to appear in user-facing messages. Closes-Bug: #1431866 Change-Id: If2e41d9a592c3ad02818e9c6f0959fd4b73cd0e0
* | | | Merge "Properly test raw writes in Python 3"Jenkins2015-07-162-30/+22
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Properly test raw writes in Python 3Tim Burke2015-07-072-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | Previously we were trying to test writing bytes in Python 3 using only native (unicode) string objects. That doesn't test what we thought we were testing. Change-Id: I10a0a38143d7f7d850ab9a7005ad87f5d314c375
* | | Merge "add tempurl command to swift.1 man page"Jenkins2015-07-131-0/+8
|\ \ \
| * | | add tempurl command to swift.1 man pageZack M. Davis2015-07-131-0/+8
| | |/ | |/| | | | | | | | | | Change-Id: Ifccc7f6dc049ca0ac2c53c00b1704cff4d1a770f Closes-Bug: #1450606
* | | Merge "Correct the help message of swift tempurl"Jenkins2015-07-111-4/+4
|\ \ \
| * | | Correct the help message of swift tempurlYangLei2015-06-301-4/+4
| |/ / | | | | | | | | | | | | | | | | | | correct the help message of swift tempurl use <> instead of [] in Positional arguments. Change-Id: Ib60ce97cef03e0423082c497604525eba2300fa9
* | | Merge "Add some bash helpers for auth stuff"Jenkins2015-07-113-6/+156
|\ \ \
| * | | Add some bash helpers for auth stuffClay Gerrard2015-06-153-6/+156
| | | | | | | | | | | | | | | | Change-Id: If61ac9a050e7a115f37dbf4e74b904ac5dfd2052
* | | | Merge "Add ability to download objects to particular folder."Jenkins2015-07-113-13/+161
|\ \ \ \