| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch makes sure that datetimes in the auth_token middleware
are normalized to account for timezone offsets.
Some of the old tests were changed to ensure that the expires string
stored in the cache is in ISO 8601 format and not a random float.
Fixes bug 1195924
Change-Id: I5917ab728193cd2aa8784c4860a96cdc17f3d43f
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Align the hacking version between test-requirement and global requirement.
The change of H202 detection from 0.6 to 0.7 in hacking is:
- if logical_line.startswith("self.assertRaises(Exception)"):
+ if logical_line.startswith("self.assertRaises(Exception,"):
then more cases are detected by this change. Fix the exposed H202 error.
There is a special test case:
tests/v3/test_endpoints.py:test_update_invalid_interface
ref = self.new_ref(interface=uuid.uuid4().hex)
this line can not generate proper parameter for self.manager.update,
add a parameter "endpoint" for it, according to the
definition in keystoneclient/v3/endpoints.py:EndpointManager.update.
Otherwise, there will be following error after changing the Exception
to exceptions.ValidationError:
TypeError: update() takes at least 2 arguments (6 given)
Fixes Bug #1220008
Change-Id: I8f7ed7a6eebf8576a6db5fecd86b9d19a15c8d60
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
confirm_token_not_expired() in keystoneclient/middleware/auth_token.py has
been moved out of the class to make it a function and be more testable.
Currently, there is no need to keep it within the class. An upcoming
commit makes fixes that rely on this refactor to be tested.
Change-Id: I8460a2ee663dec8be0f339735208779a3b988040
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unittest code for auth_token.py doesn't specify auth_uri in conf,
which will cause lots of warnings, since auth_token.py will use
'%(protocol)s://%(host)s:%(port)s' to generate auth_uri when it is
None, we can specify this value directly to avoid unnecessary warnings.
Closes-Bug: #1219493
Change-Id: I26b636bcddabd91b06479c6a42a6a48d74ac9431
|
| |\ \ \
| |_|/
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add logging for user information (like user name, tenant_id, roles) in
the auth_token middleware. This would make tracking down issues much
easier.
Change-Id: Ife4ce29d2f8e1a338a025dda4afbd7b563f6b8c1
Implements: blueprint user-info-logging-in-auth-token-middleware
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| | |
Refactored unit tests to use assertEqual instead of assertTrue
where needed.
Fixes bug #1226374
Change-Id: I678b2e7fcc522c8776c7fc0a554c1fc229ab781e
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the suggested location for tests and is adopted by most
projects. As part of this change relative imports to package imports.
Fix all the test running and coverage code to point to the new location.
Change-Id: I01264aed14f396ab9a7242e3e72b71e1bc332675
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Now that 1.2.0 has been released, require it rather than on of the beta
release tarballs.
Closes-Bug: #1182861
Change-Id: I75ffc4a572d14488d19491a38742d6920951c171
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently keyring tests test the calls to the keyring service directly
and not their use in an actual authentication call. Modify them so we
test how the keyring performs under more realistic usage.
Change-Id: I2216dcaaa6464f39807fd79a3bea07d1de71f827
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes bug #1226736
Change-Id: Id0ab5a1b74688601f4f8dd1c2613f4cee93401ab
|
| |\ \ \ \ |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
User cannot set blank to email address when use "user-update".
This patch fixes this problem.
Change-Id: I3b9494a1c668358a529031c366c55b303f43c533
Closes-bug: #1226439
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
convert the non-english username str to unicode,
then the converted username can match the username from db.
Fixes bug #1221576
Change-Id: I9e5f941fe43f081d75750e3f4754e8beea8210db
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There are a lot of problems with the current means of mocking. Most
annoyingly is that we cannot differ the call to the request library by
even a single optional header or whitespace difference without breaking
the mock. HTTPretty does a better job of this because it only cares
about what is transmitted over the socket.
Rewrite tests so that they no longer do string comparisons of JSON encoded
dictionaries. This meant that they had to order the dictionary before
encoding and would fail tests where the ordering was not followed.
In the process of this I reorganized the inheritance of the
utils.TestCase object so that there is a clear separation between the
data stored on the V2 and V3 base test objects.
Change-Id: I590df65adb1d2177b4be4e016708db05131b6880
|
| |\ \ \ \ \ |
|
| | | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In run_tests.sh, function init_testr will initialize testr if the
directory .testrepository is not existed. Actually, testr will do
the check before run the test:
In Python package testrepository, setuptools_command.py:Testr.run
68 def run(self):
69 """Set up testr repo, then run testr"""
70 if not os.path.isdir(".testrepository"):
71 self._run_testr("init")
"python setup.py testr" will trigger this function to create
.testrepository if not exist.
So, init_testr can be removed safely.
Fixes Bug #1220149
Change-Id: I4dfcdfa5e1e323bbc7ee3add5d9d0888a42e3812
|
| |\ \ \ \ \ |
|
| | | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
Until python-openstackclient is ready for more mainstream users.
Change-Id: Ic90daa38cd7e8e2f6d6b23c30c3d83935cf6c1a6
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This timestamp is the last possible moment that can be represented on
32-bit systems as an integer.
As a consequence of revising the JSON examples, the corresponding PEM
files must be re-generated as well.
Change-Id: Ic6014c08b4545db036605beef1e6a8829ed347c4
Related-Bug: 1190054
Related-Bug: 1225084
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Requests is becoming the standard way of doing http communication, it
also vastly simplifies adding other authentication mechanisms. Use it in
the auth_token middleware.
This adds the ability to specify a CA file that will be used to verify a
HTTPS connections or insecure to specifically ignore HTTPS validation.
SecurityImpact
DocImpact
Partial-Bug: #1188189
Change-Id: Iae94329e7abd105bf95224d28f39f4b746b9eb70
|
| |\ \ \ \ \ \
| |/ / / / /
| | | | / /
| |_|_|/ /
|/| | | | |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch is for fix bug 1208784. Support keystone client generate
literal ipv6 auth_uri via provided auth_host, when the auth_uri is
None.
Fixes bug 1208784
Change-Id: I226881a35a74ef668d4cd1c6829a64c94ff185d9
|
| |\ \ \ \
| |_|/ /
|/| | | |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow newer versions of Hacking as well,
which permits further checks to be used for gating.
Suppress H202 for now to pass tests.
Change-Id: I75ab26df94b5dd8b8b05f4ada2ca6831d8584a75
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| | |
keystoneclient/shell.py's docstr is rendered by argparse as the
description for:
$ keystone --help
Change-Id: I7355cdf533800086027824fb729eb52cdd8bbc33
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In tests/test_auth_token_middleware.py, some assertRaises tests do not
pass conf as a keyword argument to self.set_middleware. This patch
correct them.
Fixes bug #1212984
Change-Id: Idd34dc043526a4eb22b28b144d327fd95aa14af2
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In keystoneclient/middleware/auth_token.py, _choose_api_version(), the
codes's logic assume that auth_version in conf is always correct, so the
testcase test_invalid_auth_version_request() is incorrect. This patch
remove it.
Fixes bug #1218881
Change-Id: I6aec0526a6a60eea8d357ec1b44570e7d74da653
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes duplicate method definitions and enables gating on F811
Change-Id: Ic360e70d13da864b8b5c10fc5e731b3952b2d2e8
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Main changes:
* deprecate api variable in favour of client
* add documentation
* use to_slug from oslo strutils
* remove Python 2.4 support
* other small fixes from novaclient
Change-Id: Ife54fd3207798ee03101a48bc1cda3b3f62cc5e4
|
| |\ \ \ \ \ |
|
| | | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixing a couple locations that could potentially raise NameErrors
instead of intended exceptions. These were found by looking at
flake8 F821 (undefined name) errors.
Added in unit tests to verify NameErrors would not be raised.
Change-Id: I8619cb0be495b814335a5aea23daca025484d3c6
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The new apiclient.exceptions hierarchy is more comprehensive
and it covers almost all HTTP error status codes. These
exceptions can be used in novaclient, keystoneclient,
glanceclient, and other client projects thus providing a
single inteface.
Users can have benefit from OpenStack clients raising exceptions
of known classes while now every client has its own classes making
difficult to catch, e.g., NotFound for every client.
Change-Id: Ia7b25880e0ffca3526525a0f0e77c7e77c4f0076
|
| |\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
|
| | | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Httpretty will work in exactly the same way regardless of whether we use
the httplib or requests library. Convert it so we can modify the
middleware and know that our tests are still correct.
In this process we also split the tests from having V3 tests override
V2 tests, to having a base test class and V2 and V3 seperate overrides.
Change-Id: I1bfcecc6ae47a6dd5e76d4ceb8b3941e6ad1089f
|
| |\ \ \ \ \ |
|