summaryrefslogtreecommitdiff
path: root/keystonemiddleware/s3_token.py
Commit message (Collapse)AuthorAgeFilesLines
* Add timeout for requestsHEAD10.3.0masterHiromu Asahina2023-03-181-1/+11
| | | | | | | | | | | Bandit emits errors for request methods without the timeout parameter. It's better to follow the instruction to avoid hanging. Added timeout parameters and config options to set timeout. [1] https://bandit.readthedocs.io/en/1.7.5/plugins/b113_request_without_timeout.html Change-Id: I0c022c3cc57f30530ebdef6e434753ece2bdf912
* Rename auth_uri to www_authenticate_uriColleen Murphy2017-10-111-3/+10
| | | | | | | | | | | | | | | The [keystone_authtoken]/auth_uri middleware parameter has been causing extreme confusion amongst operators and developers ever since the keystonemiddleware started accepting keystoneauth plugin parameters including auth_url. The two parameters look identical and yet have completely different meanings and are both required. This patch deprecates auth_uri and renames it to www_authenticate_uri, which more accurately describes the WWW-Authenticate header it is configuring and is dissimilar to any other keystone_authtoken middleware parameter. This also renames the internal variable names for consistency with the config option. Change-Id: I0cf11da3d395749df28077427689fdafc8a6b981
* Remove log translationsD G Lee2017-05-021-6/+3
| | | | | | | | | | | | Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. See: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: I73ca5fc046ad04505b52ca93c9bbdbfd72405aed
* use oslo.log instead of loggingJanonymous2017-01-131-1/+1
| | | | | | | | | The constants of log levels were added in the 1.8 version of the oslo.log library. So we can replace all usage of system logging module with log module from oslo.log Change-Id: I97a1d913b543dc9dbd4d228b04adbdf7ee320df5
* Use method split_path from oslo.utilsChangBo Guo(gcb)2016-05-311-51/+2
| | | | | | | We added method split_path in version 3.11 of oslo.utils, so don't maintain it by keystonemiddleware. Change-Id: Iaba3d3f8b10392c0ee3fbb076f1e364f0c97ca88
* Merge "s3token config with auth URI"Jenkins2016-05-111-7/+14
|\
| * s3token config with auth URIBrant Knudson2016-05-031-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | s3token middleware only allows configuring host and port for the auth URI. This doesn't allow the auth server to be on a path. A new auth_uri config option is added that allows the deployer to specify the full URL for auth. This overrides auth_host, auth_port, and auth_protocol. auth_host, auth_port, and auth_protocol are deprecated. DocImpact Change-Id: I1fe13f0365ca4704717fe680a0c8f54c64a9f06c
* | Fix D400 PEP257 violationNavid Pustchi2016-05-061-1/+1
| | | | | | | | | | | | | | | | | | Currently tox ignores D400: D400: First line should end with a period. This change makes keystonemiddleware docstrings compliant with D400. Change-Id: Icff2b744d72ae74492cfc6515b91f393fa2b50bf
* | Fix D401 PEP257 violation and enable H403Navid Pustchi2016-05-051-1/+1
|/ | | | | | | | | | | Currently tox ignores D401 and H403: 401: First line should be in imperative mood. 403: multi line docstrings should end on a new line This change makes keystonemiddleware docstrings compliant with D401. H403 is already passing, so this commit also enables it. Change-Id: I9471721220c99f9c4ed055840ed626bb7750eb3f
* Prevent a UnicodeDecodeError in the s3token middlewareCyril Roelandt2015-06-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Mixing "str" and "unicode" can lead to a UnicodeDecodeError. We encode unicode values before using them with text strings. The bug occurs if the URL contains a non-ASCII character in the path: "hého" in "/v1/AUTH_cfa/c/hého" ("/v1/AUTH_cfa/c/h\xc3\xa9ho" in UTF-8) for example. The bug occurs on Python 2 in s3_token.py because the tenant id is retrieved from identity_info['access']['token']['tenant'] and identity_info comes from resp.json(). The problem is that in Python, the JSON decoder always create Unicode strings. Example in Python 2: >>> json.loads('{"key": "value"}') {u'key': u'value'} There is no issue in Python 3, since all text strings are Unicode. Change-Id: Ib7fdf60f8369ea9546fcd92f1ac385c777478d10 Closes-Bug: #1428706 Co-Authored-By: Victor Stinner <vstinner@redhat.com>
* Fix s3_token middleware parsing insecure optionBrant Knudson2015-04-141-1/+2
| | | | | | | | | The "insecure" option was being treated as a bool when it was actually provided as a string. The fix is to parse the string to a bool. Change-Id: Id674f40532215788675c97a8fdfa91d4420347b3 Closes-Bug: 1411063
* Switch from oslo.serialization to oslo_serializationBrant Knudson2015-01-181-1/+1
| | | | | | | | oslo_serialization moved out of the oslo namespace. bp drop-namespace-packages Change-Id: Iff3c62018d5008f9451dd54a8cf63700c9b61f5d
* Merge "Docstring cleanup"Jenkins2014-11-261-5/+5
|\
| * Docstring cleanupBrant Knudson2014-10-081-5/+5
| | | | | | | | | | | | Minor cleanups for the doc strings in middleware. Change-Id: I96058ee05645f03b6d9946f4db73b76b0a368d08
* | I18nBrant Knudson2014-10-291-4/+7
|/ | | | | | | | | | The strings weren't marked for translation. DocImpact implements bp keystonemiddleware-i18n Change-Id: Ic7da29b54b1547ff8df002bd77f61f2ebff35217
* Update oslo-incubator and switch to oslo.{utils,serialization}Julien Danjou2014-09-301-2/+1
| | | | | | Update to commit 9ce1d96fb2e075fcd5b9ddbee728c0ee49d2be56 Change-Id: I27e20f76fb0f4b858230b2c36e6ff960e1ec9d09
* Privatize EverythingMorgan Fainberg2014-07-021-42/+43
| | | | | | | | | | Make s3_token and ec2_token middleware match auth_token and all properties except the class itself are now private. The memcache_crypt module is now private to the keystonemiddleware package. Change-Id: Id5103f4e9689bc2dbc6f79705030c903ae5cc406
* Update middleware and tests for new packageMorgan Fainberg2014-06-191-1/+1
| | | | | Update the middleware code and the tests to run with the new package name.
* Moving middleware to new locationMorgan Fainberg2014-06-191-0/+264
Move the middleware code to the new location within the keystonemiddleware directory.