diff options
author | Tim Burke <tim.burke@gmail.com> | 2020-05-13 10:30:30 -0700 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2020-05-27 15:17:09 -0700 |
commit | 257a7185a8d5fdc11d91058f1735fa4273719aa9 (patch) | |
tree | b3d9d6ae6db4693a2688906a0a5dc23f93cefb07 /test | |
parent | 5840efe1d62d67735e6986512a66ddd1991fd60d (diff) | |
download | python-swiftclient-257a7185a8d5fdc11d91058f1735fa4273719aa9.tar.gz |
Application credential support follow-up
Following the recent v3applicationcredentials patch, if you have your
environment variables set up to work with python-openstackclient using
swiftclient's v1password plugin, swiftclient won't work:
$ env | egrep '^(OS|ST)_'
ST_KEY=testing
ST_USER=test:tester
OS_AUTH_URL=http://saio/auth/v1.0
ST_AUTH=http://saio/auth/v1.0
OS_USERNAME=test:tester
OS_AUTH_TYPE=v1password
OS_PASSWORD=testing
$ openstack object store account show
+------------+----------------------------+
| Field | Value |
+------------+----------------------------+
| Account | AUTH_test |
| Bytes | 0 |
| Containers | 11 |
| Objects | 0 |
+------------+----------------------------+
$ swift stat
Only "v3applicationcredential" is supported for --os-auth-type
We don't really want to allow (and mostly ignore) arbitrary OS_AUTH_TYPE
values, though -- there are a whole bunch of plugins we don't remotely
support. But it seems OK to allow any of the password plugins; while we
won't actually use them (currently), we provide roughly equivalent
functionality.
Handful of other drive-bys:
* Use a None sentinel to determine whether keystoneauth1 is installed
instead of trying to catch a NameError.
* Clarify error state when keystoneauth1 is not installed.
* Fix a typo: "sses" -> "sess".
Change-Id: Id7ea9c3ea8278ae86a04d057a472a8f8a87b8eae
Related-Change: I9190e5e7e24b6a741970fa0d0ac792deccf73d25
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/test_shell.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/test_shell.py b/test/unit/test_shell.py index 3c08218..f94e5e2 100644 --- a/test/unit/test_shell.py +++ b/test/unit/test_shell.py @@ -2721,7 +2721,7 @@ class TestParsing(TestBase): str(cm.exception)) os_opts = { - "auth_type": "v3password", + "auth_type": "v3oidcpassword", "application_credential_id": "proejct_id", "application_credential_secret": "secret", "auth_url": "http://example.com:5000/v3"} |