| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 in put_object being overwritten in logging
Cherry-picked from commit 61880c6f980cb8e613bdf6cb48a9a61ce7488162
Change-Id: Id0d1e36561a61ed1ce30d93c801ec32f058a6fa4
Closes-bug: #1501292
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I2943b0dbcfc988bbd471b56ef7d02a515d49e16f
|
|/
|
|
|
|
|
| |
Needed for coverage 4.0
Change-Id: I2789541f67d6adbdc8454183753832488fe2bbe2
(cherry picked from commit ccc3aa49ee654286c169afce558455cfb9f2d4ba)
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
Change-Id: I1a264c9ce1d137b18a6dc62623a282e4a2fe839c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some improvements to the tests for staggered download
that were added in [1].
[1] Ie737cbb7f8b1fa8a79bbb88914730b05aa7f2906
Change-Id: Ib999bc7bd198c1d9c217c57501f751e854d4c6ad
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I5fb349b2f7808a3f97d95fc7db6b5cf5842a9f7c
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |/ / /
|/| | |
| | | | |
to st_download"
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- 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>
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Change-Id: Ib5be06fa544f5eb3061c6a3077a3b9986382ecfe
Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I999425902a5c82f7af129a8a1b6998d80edb225a
|
|\ \ \
| |/ / |
|
| |/
| |
| |
| | |
Change-Id: I2691739cc14bb8d384cc7ef0f8a3e73d1b898f88
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |/ / /
| | | /
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | | |
Change-Id: Ifccc7f6dc049ca0ac2c53c00b1704cff4d1a770f
Closes-Bug: #1450606
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
correct the help message of swift tempurl
use <> instead of [] in Positional arguments.
Change-Id: Ib60ce97cef03e0423082c497604525eba2300fa9
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: If61ac9a050e7a115f37dbf4e74b904ac5dfd2052
|
|\ \ \ \ |
|