keystoneauth1 5.1.2__tar.gz → 5.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/.zuul.yaml +1 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/AUTHORS +7 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/ChangeLog +21 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/PKG-INFO +3 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/authentication-plugins.rst +1 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/_fair_semaphore.py +1 -3
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/_utils.py +2 -3
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/access/access.py +8 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/access/service_catalog.py +1 -4
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/discover.py +3 -4
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/oidc.py +9 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/_saml2/v3/adfs.py +1 -2
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/serializer.py +2 -3
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/v3.py +17 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/__init__.py +9 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/base.py +3 -6
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/generic/base.py +3 -6
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v2.py +1 -4
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/__init__.py +5 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/base.py +3 -8
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/federation.py +5 -5
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/k2k.py +1 -3
- keystoneauth1-5.2.1/keystoneauth1/identity/v3/oauth2_mtls_client_credential.py +122 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/oidc.py +141 -10
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/tokenless_auth.py +1 -4
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/identity/v3.py +54 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/base.py +1 -3
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/session.py +10 -18
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/oauth1/test_oauth1.py +1 -2
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/test_auth_adfs.py +1 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_identity_common.py +4 -6
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_identity_v3.py +243 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_identity_v3_federation.py +10 -8
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_identity_v3_oidc.py +1 -2
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_v3.py +88 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/oidc_fixtures.py +3 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_fair_sempahore.py +1 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_fixtures.py +14 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_session.py +16 -16
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/utils.py +8 -6
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/PKG-INFO +3 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/SOURCES.txt +5 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/entry_points.txt +2 -0
- keystoneauth1-5.2.1/keystoneauth1.egg-info/pbr.json +1 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/requires.txt +0 -1
- keystoneauth1-5.2.1/releasenotes/notes/bp-support-oauth2-mtls-177cda05265ae65c.yaml +10 -0
- keystoneauth1-5.2.1/releasenotes/notes/bug-1998366-27cd486b46fb56b0.yaml +6 -0
- keystoneauth1-5.2.1/releasenotes/source/2023.1.rst +6 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/index.rst +2 -0
- keystoneauth1-5.2.1/releasenotes/source/zed.rst +6 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/requirements.txt +0 -5
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/setup.cfg +4 -1
- keystoneauth1-5.1.2/keystoneauth1.egg-info/pbr.json +0 -1
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/.coveragerc +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/.mailmap +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/.stestr.conf +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/CONTRIBUTING.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/HACKING.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/LICENSE +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/README.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/bindep.txt +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/.gitignore +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/Makefile +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/ext/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/ext/list_plugins.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/requirements.txt +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/conf.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/extras.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/images/graphs_authComp.svg +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/images/graphs_authCompDelegate.svg +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/index.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/migrating.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/plugin-options.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/doc/source/using-sessions.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/access/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/access/service_providers.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/adapter.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/auth.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/auth_plugins.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/base.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/catalog.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/connection.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/discovery.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/http.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/response.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/exceptions/service_providers.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/_saml2/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/_saml2/_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/_saml2/v3/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/_saml2/v3/base.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/_saml2/v3/saml2.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/kerberos/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/kerberos/_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/oauth1/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/oauth1/_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/extras/oauth1/v3.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/discovery.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/exception.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/hooks.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/keystoneauth_betamax.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/plugin.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/fixture/v2.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/hacking/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/hacking/checks.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/http_basic.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/access.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/generic/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/generic/password.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/generic/token.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/application_credential.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/multi_factor.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/oauth2_client_credential.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/password.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/receipt.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/token.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/identity/v3/totp.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/admin_token.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/http_basic.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/identity/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/identity/generic.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/identity/v2.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_plugins/noauth.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/_utils.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/adapter.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/cli.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/conf.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/identity.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/opts.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/loading/session.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/noauth.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/plugin.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/service_token.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/access/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/access/test_v2_access.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/access/test_v2_service_catalog.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/access/test_v3_access.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/access/test_v3_service_catalog.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/client_fixtures.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/README +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/keystone_v2_sample_request.json +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/keystone_v2_sample_response.json +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/keystone_v3_sample_request.json +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/keystone_v3_sample_response.json +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/ksa_betamax_test_cassette.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/ksa_serializer_data.json +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/data/test_pre_record_hook.json +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/exceptions/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/exceptions/test_exceptions.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/base.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/test_fedkerb_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/test_kerberos_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/test_mapped.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/test_v3.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/kerberos/utils.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/oauth1/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/oauth1/test_oauth1_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/examples/xml/ADFS_RequestSecurityTokenResponse.xml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/examples/xml/ADFS_fault.xml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/fixtures/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/fixtures/templates/authn_request.xml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/fixtures/templates/saml_assertion.xml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/fixtures/templates/soap_response.xml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/test_auth_saml2.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/extras/saml2/utils.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_access.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_identity_v2.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_password.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_token.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/test_tokenless_auth.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/identity/utils.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/k2k_fixtures.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/keystoneauth_fixtures.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/__init__.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_adapter.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_cli.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_conf.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_entry_points.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_fixtures.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_generic.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_loading.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/test_session.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/loading/utils.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/matchers.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_betamax_fixture.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_betamax_hooks.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_betamax_serializer.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_discovery.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_hacking_checks.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_http_basic.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_matchers.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_noauth.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_service_token.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_token_endpoint.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/tests/unit/test_utils.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1/token_endpoint.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/dependency_links.txt +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/not-zip-safe +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/keystoneauth1.egg-info/top_level.txt +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/.placeholder +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/1583780-700f99713e06324e.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/add-oidc-client-credentials-2be065926ba4b849.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/add-oidc-discovery-document-support-b07fe54f83286d62.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/add-prompt-to-opt-d083acc357a7f07b.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/add-totp-auth-plugin-0650d220899c25b7.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/additional-headers-f2d16f85f5abe942.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/allow_version_hack-flag-9b53b72d9b084c04.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/api-sig-error-guideline-handler.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/basic-http-auth-45bea4298209df75.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bp-application-credentials-416a1f8bb2311e04.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bp-oauth2-client-credentials-ext-06271700d4f33a7e.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bp-system-scope-29e9c597039ddb1e.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1582774-49af731b6dfc6f2f.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1614688-c4a1bd54f4ba5644.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1616105-cc8b85eb056e99e2.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1654847-acdf9543158329ec.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1689424-set-adfspassword-endpointreference-f186d84a54007b09.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1733052-1b4af3b3fe1b05bb.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1766235wq-0de60d0f996c6bfb.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1839748-5d8dfc99c43aaefc.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1840235-ef2946d149ac329c.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/bug-1876317-1db97d1b12a3e4b4.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/cache-trailing-slash-3663c86cd9754379.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/client-side-rate-limiting-dec43fc9b54f5b70.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/collect-timing-85f007f0d86c8b26.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/drop-py-2-7-f90c67a5db0dfeb8.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/drop-python-3-6-and-3-7-c407d5898c5eafec.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/drop-python-3.5-362bb9d47f830353.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/expose-endpoint-status-6195a6b76d8a8de8.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/filter-versions-service-type-763af68092344b7a.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/fix-get-all-version-data-a01ee58524755b9b.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/get-auth-ref-7418e13bd0942060.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/global_request_id-per-request-bd66c7e0f1a71d9f.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/improve-http-error-handling.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/ironic-discovery-fe41793ef97027bf.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/ironic-microversions-a69bf92ab21f0cf5.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/ksa_2.2.0-81145229d4b43043.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/microversion-header-support-901acd820a21d788.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/noauth-discovery-c26d82a32c36d41d.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/none-auth-dab13ab9af6f5c86.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/oslo-config-split-loggers-6bda266d657fe921.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/retries-limit-dbaedcb3207934ae.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/retries-options-99e4dbc240941557.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/retry-authenticated-discovery-19c4354ff983f507.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/retry-delay-68d0c0a1dffcf2fd.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/serice-type-aliases-249454829c57f39a.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/status-code-retries-75052a43efa4edb2.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/support-api-wg-discovery-2cb4b0186619e124.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/user-agent-generation-b069100508c06177.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/notes/version-between-b4b0bcf4cecfb9e4.yaml +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/_static/.placeholder +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/_templates/.placeholder +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/conf.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/mitaka.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/newton.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/ocata.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/pike.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/queens.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/rocky.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/stein.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/train.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/unreleased.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/ussuri.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/victoria.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/wallaby.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/xena.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/releasenotes/source/yoga.rst +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/setup.py +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/test-requirements.txt +0 -0
- {keystoneauth1-5.1.2 → keystoneauth1-5.2.1}/tox.ini +0 -0
|
@@ -16,6 +16,7 @@ Andreas Jaeger <aj@suse.com>
|
|
|
16
16
|
Andrey Kurilin <akurilin@mirantis.com>
|
|
17
17
|
Antoni Segura Puimedon <antonisp@celebdor.com>
|
|
18
18
|
Antoni Segura Puimedon <toni@midokura.com>
|
|
19
|
+
Arvid Requate <requate@univention.de>
|
|
19
20
|
Ben Nemec <bnemec@redhat.com>
|
|
20
21
|
Bernhard M. Wiedemann <bwiedemann@suse.de>
|
|
21
22
|
Bhuvan Arumugam <bhuvan@apache.org>
|
|
@@ -44,6 +45,7 @@ Cyril Roelandt <cyril.roelandt@enovance.com>
|
|
|
44
45
|
Cyril Roelandt <cyril@redhat.com>
|
|
45
46
|
Dan Prince <dprince@redhat.com>
|
|
46
47
|
Dave Chen <wei.d.chen@intel.com>
|
|
48
|
+
Dave Wilde <dwilde@redhat.com>
|
|
47
49
|
David Stanek <dstanek@dstanek.com>
|
|
48
50
|
Dean Troyer <dtroyer@gmail.com>
|
|
49
51
|
Dirk Mueller <dirk@dmllr.de>
|
|
@@ -129,6 +131,7 @@ Ngo Quoc Cuong <cuongnq@vn.fujitsu.com>
|
|
|
129
131
|
Ondřej Nový <ondrej.novy@firma.seznam.cz>
|
|
130
132
|
OpenStack Release Bot <infra-root@openstack.org>
|
|
131
133
|
Pavlo Shchelokovskyy <shchelokovskyy@gmail.com>
|
|
134
|
+
Pete Zaitcev <zaitcev@kotori.zaitcev.us>
|
|
132
135
|
Pradeep Kilambi <pkilambi@cisco.com>
|
|
133
136
|
Prosunjit Biswas <prosun.csedu@gmail.com>
|
|
134
137
|
Q.hongtao <qihongtao@inspur.com>
|
|
@@ -151,9 +154,11 @@ Sean Perry <sean.perry@hpe.com>
|
|
|
151
154
|
Sergey Kraynev <skraynev@mirantis.com>
|
|
152
155
|
Sergio Cazzolato <sergio.j.cazzolato@intel.com>
|
|
153
156
|
Simon Li <libo04@inspur.com>
|
|
157
|
+
Stephen Finucane <stephenfin@redhat.com>
|
|
154
158
|
Steve Baker <sbaker@redhat.com>
|
|
155
159
|
Steve Martinelli <s.martinelli@gmail.com>
|
|
156
160
|
Steve Martinelli <stevemar@ca.ibm.com>
|
|
161
|
+
Steve Relf <s.relf@eschercloud.ai>
|
|
157
162
|
Steven Hardy <shardy@redhat.com>
|
|
158
163
|
Stuart McLaren <stuart.mclaren@hp.com>
|
|
159
164
|
Sushil Kumar <sushil.kumar2@globallogic.com>
|
|
@@ -206,6 +211,7 @@ lin-hua-cheng <lin-hua.cheng@hp.com>
|
|
|
206
211
|
lin-hua-cheng <os.lcheng@gmail.com>
|
|
207
212
|
liuqing <jing.liuqing@99cloud.net>
|
|
208
213
|
liushuobj <liushuobj@inspur.com>
|
|
214
|
+
ljhuang <huang.liujie@99cloud.net>
|
|
209
215
|
llg8212 <lilinguo@huawei.com>
|
|
210
216
|
maaoyu <maaoyu@inspur.com>
|
|
211
217
|
melanie witt <melwittt@gmail.com>
|
|
@@ -214,6 +220,7 @@ ricolin <rico.lin.guanyu@gmail.com>
|
|
|
214
220
|
ricolin <rico.lin@easystack.cn>
|
|
215
221
|
shanyunfan33 <shanyunfan@inspur.com>
|
|
216
222
|
sridhargaddam <sridhar.gaddam@enovance.com>
|
|
223
|
+
sunyonggen <sunyonggen@fujitsu.com>
|
|
217
224
|
wanghong <w.wanghong@huawei.com>
|
|
218
225
|
wangqiangbj <wangqiangbj@inspur.com>
|
|
219
226
|
wangxiyuan <wangxiyuan1007@gmail.com>
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
5.2.1
|
|
5
|
+
-----
|
|
6
|
+
|
|
7
|
+
* Remove last reference to the python six package
|
|
8
|
+
* Make v3oidcpassword send client\_id
|
|
9
|
+
* Add RFC required headers and data to the request
|
|
10
|
+
|
|
11
|
+
5.2.0
|
|
12
|
+
-----
|
|
13
|
+
|
|
14
|
+
* Update master for stable/2023.1
|
|
15
|
+
* Fix up some packaging metadata
|
|
16
|
+
* New auth plugin v3oidcdeviceauthz
|
|
17
|
+
* OAuth 2.0 Mutual-TLS Support
|
|
18
|
+
|
|
4
19
|
5.1.2
|
|
5
20
|
-----
|
|
6
21
|
|
|
@@ -10,13 +25,19 @@ CHANGES
|
|
|
10
25
|
-----
|
|
11
26
|
|
|
12
27
|
* Allow passing of version header
|
|
28
|
+
* Remove six
|
|
29
|
+
* setup.cfg: Restore python\_requires after a typo
|
|
30
|
+
* Allow federation to work with unversioned auth\_url
|
|
13
31
|
* Enforce scope mutual exclusion for system
|
|
14
32
|
* Fix linters and bindep on jammy
|
|
33
|
+
* Switch to 2023.1 Python3 unit tests and generic template name
|
|
34
|
+
* Update master for stable/zed
|
|
15
35
|
|
|
16
36
|
5.1.0
|
|
17
37
|
-----
|
|
18
38
|
|
|
19
39
|
* OAuth2.0 Client Credentials Grant Flow Support
|
|
40
|
+
* Replace abc.abstractproperty with property and abc.abstractmethod
|
|
20
41
|
|
|
21
42
|
5.0.0
|
|
22
43
|
-----
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: keystoneauth1
|
|
3
|
-
Version: 5.1
|
|
3
|
+
Version: 5.2.1
|
|
4
4
|
Summary: Authentication Library for OpenStack Identity
|
|
5
5
|
Home-page: https://docs.openstack.org/keystoneauth/latest/
|
|
6
6
|
Author: OpenStack
|
|
@@ -56,6 +56,8 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
56
56
|
Classifier: Programming Language :: Python :: 3
|
|
57
57
|
Classifier: Programming Language :: Python :: 3.8
|
|
58
58
|
Classifier: Programming Language :: Python :: 3.9
|
|
59
|
+
Requires-Python: >=3.8
|
|
60
|
+
Description-Content-Type: text/x-rst
|
|
59
61
|
Provides-Extra: betamax
|
|
60
62
|
Provides-Extra: kerberos
|
|
61
63
|
Provides-Extra: oauth1
|
|
@@ -426,6 +426,7 @@ authentication plugins that are available in `keystoneauth` are:
|
|
|
426
426
|
- v3oauth1: :py:class:`keystoneauth1.extras.oauth1.v3.OAuth1`
|
|
427
427
|
- v3oidcaccesstoken: :py:class:`keystoneauth1.identity.v3:OpenIDConnectAccessToken`
|
|
428
428
|
- v3oidcauthcode: :py:class:`keystoneauth1.identity.v3:OpenIDConnectAuthorizationCode`
|
|
429
|
+
- v3oidcdeviceauthz: :py:class:`keystoneauth1.loading._plugins.identity.v3:OpenIDConnectDeviceAuthorization`
|
|
429
430
|
- v3oidcclientcredentials: :py:class:`keystoneauth1.identity.v3:OpenIDConnectClientCredentials`
|
|
430
431
|
- v3oidcpassword: :py:class:`keystoneauth1.identity.v3:OpenIDConnectPassword`
|
|
431
432
|
- v3samlpassword: :py:class:`keystoneauth1.extras._saml2.v3.Password`
|
|
@@ -10,13 +10,11 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
import queue
|
|
13
14
|
import threading
|
|
14
15
|
import time
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
from six.moves import queue
|
|
18
|
-
|
|
19
|
-
|
|
20
18
|
class FairSemaphore(object):
|
|
21
19
|
"""Semaphore class that notifies in order of request.
|
|
22
20
|
|
|
@@ -14,7 +14,6 @@ import datetime
|
|
|
14
14
|
import logging
|
|
15
15
|
|
|
16
16
|
import iso8601
|
|
17
|
-
import six
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
def get_logger(name):
|
|
@@ -38,9 +37,9 @@ def parse_isotime(timestr):
|
|
|
38
37
|
try:
|
|
39
38
|
return iso8601.parse_date(timestr)
|
|
40
39
|
except iso8601.ParseError as e:
|
|
41
|
-
raise ValueError(
|
|
40
|
+
raise ValueError(str(e))
|
|
42
41
|
except TypeError as e:
|
|
43
|
-
raise ValueError(
|
|
42
|
+
raise ValueError(str(e))
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
def from_utcnow(**timedelta_kwargs):
|
|
@@ -782,3 +782,11 @@ class AccessInfoV3(AccessInfo):
|
|
|
782
782
|
@_missingproperty
|
|
783
783
|
def bind(self):
|
|
784
784
|
return self._data['token']['bind']
|
|
785
|
+
|
|
786
|
+
@property
|
|
787
|
+
def oauth2_credential(self):
|
|
788
|
+
return self._data['token']['oauth2_credential']
|
|
789
|
+
|
|
790
|
+
@_missingproperty
|
|
791
|
+
def oauth2_credential_thumbprint(self):
|
|
792
|
+
return self._data['token']['oauth2_credential']['x5t#S256']
|
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
import abc
|
|
20
20
|
import copy
|
|
21
21
|
|
|
22
|
-
import six
|
|
23
|
-
|
|
24
22
|
from keystoneauth1 import discover
|
|
25
23
|
from keystoneauth1 import exceptions
|
|
26
24
|
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
class ServiceCatalog(object):
|
|
26
|
+
class ServiceCatalog(metaclass=abc.ABCMeta):
|
|
30
27
|
"""Helper methods for dealing with a Keystone Service Catalog."""
|
|
31
28
|
|
|
32
29
|
def __init__(self, catalog):
|
|
@@ -23,10 +23,9 @@ raw data specified in version discovery responses.
|
|
|
23
23
|
|
|
24
24
|
import copy
|
|
25
25
|
import re
|
|
26
|
+
import urllib
|
|
26
27
|
|
|
27
28
|
import os_service_types
|
|
28
|
-
import six
|
|
29
|
-
from six.moves import urllib
|
|
30
29
|
|
|
31
30
|
from keystoneauth1 import _utils as utils
|
|
32
31
|
from keystoneauth1 import exceptions
|
|
@@ -208,7 +207,7 @@ def normalize_version_number(version):
|
|
|
208
207
|
|
|
209
208
|
# If it's a non-string iterable, turn it into a string for subsequent
|
|
210
209
|
# processing. This ensures at least 1 decimal point if e.g. [1] is given.
|
|
211
|
-
if not isinstance(ver,
|
|
210
|
+
if not isinstance(ver, str):
|
|
212
211
|
try:
|
|
213
212
|
ver = '.'.join(map(_str_or_latest, ver))
|
|
214
213
|
except TypeError:
|
|
@@ -219,7 +218,7 @@ def normalize_version_number(version):
|
|
|
219
218
|
# float string. This ensures 1 decimal point.
|
|
220
219
|
# If it's a float as a string, don't do that, the split/map below will do
|
|
221
220
|
# what we want. (Otherwise, we wind up with 3.20 -> (3, 2))
|
|
222
|
-
if isinstance(ver,
|
|
221
|
+
if isinstance(ver, str):
|
|
223
222
|
# trim the v from a 'v2.0' or similar
|
|
224
223
|
ver = ver.lstrip('v')
|
|
225
224
|
try:
|
|
@@ -36,6 +36,15 @@ class OidcAuthorizationEndpointNotFound(auth_plugins.AuthPluginException):
|
|
|
36
36
|
message = "OpenID Connect authorization endpoint not provided."
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
class OidcDeviceAuthorizationEndpointNotFound(
|
|
40
|
+
auth_plugins.AuthPluginException):
|
|
41
|
+
message = "OpenID Connect device authorization endpoint not provided."
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class OidcDeviceAuthorizationTimeOut(auth_plugins.AuthPluginException):
|
|
45
|
+
message = "Timeout for OpenID Connect device authorization."
|
|
46
|
+
|
|
47
|
+
|
|
39
48
|
class OidcGrantTypeMissmatch(auth_plugins.AuthPluginException):
|
|
40
49
|
message = "Missmatch between OpenID Connect plugin and grant_type argument"
|
|
41
50
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import datetime
|
|
14
|
+
import urllib
|
|
14
15
|
import uuid
|
|
15
16
|
|
|
16
17
|
try:
|
|
@@ -18,8 +19,6 @@ try:
|
|
|
18
19
|
except ImportError:
|
|
19
20
|
etree = None
|
|
20
21
|
|
|
21
|
-
from six.moves import urllib
|
|
22
|
-
|
|
23
22
|
from keystoneauth1 import access
|
|
24
23
|
from keystoneauth1 import exceptions
|
|
25
24
|
from keystoneauth1.extras._saml2.v3 import base
|
|
@@ -16,7 +16,6 @@ import json
|
|
|
16
16
|
import os
|
|
17
17
|
|
|
18
18
|
import betamax.serializers.base
|
|
19
|
-
import six
|
|
20
19
|
import yaml
|
|
21
20
|
|
|
22
21
|
|
|
@@ -52,7 +51,7 @@ def _indent_json(val):
|
|
|
52
51
|
return json.dumps(
|
|
53
52
|
json.loads(val), indent=2,
|
|
54
53
|
separators=(',', ': '), sort_keys=False,
|
|
55
|
-
default=
|
|
54
|
+
default=str)
|
|
56
55
|
|
|
57
56
|
|
|
58
57
|
def _is_json_body(interaction):
|
|
@@ -82,7 +81,7 @@ class YamlJsonSerializer(betamax.serializers.base.BaseSerializer):
|
|
|
82
81
|
|
|
83
82
|
yaml.representer.BaseRepresenter.represent_scalar = _represent_scalar
|
|
84
83
|
|
|
85
|
-
MyDumper.add_representer(
|
|
84
|
+
MyDumper.add_representer(str, _unicode_representer)
|
|
86
85
|
|
|
87
86
|
return yaml.dump(
|
|
88
87
|
cassette_data, Dumper=MyDumper, default_flow_style=False)
|
|
@@ -65,7 +65,8 @@ class Token(dict):
|
|
|
65
65
|
application_credential_access_rules=None,
|
|
66
66
|
oauth_access_token_id=None, oauth_consumer_id=None,
|
|
67
67
|
audit_id=None, audit_chain_id=None,
|
|
68
|
-
is_admin_project=None, project_is_domain=None
|
|
68
|
+
is_admin_project=None, project_is_domain=None,
|
|
69
|
+
oauth2_thumbprint=None):
|
|
69
70
|
super(Token, self).__init__()
|
|
70
71
|
|
|
71
72
|
self.user_id = user_id or uuid.uuid4().hex
|
|
@@ -129,6 +130,9 @@ class Token(dict):
|
|
|
129
130
|
if is_admin_project is not None:
|
|
130
131
|
self.is_admin_project = is_admin_project
|
|
131
132
|
|
|
133
|
+
if oauth2_thumbprint:
|
|
134
|
+
self.oauth2_thumbprint = oauth2_thumbprint
|
|
135
|
+
|
|
132
136
|
@property
|
|
133
137
|
def root(self):
|
|
134
138
|
return self.setdefault('token', {})
|
|
@@ -395,6 +399,18 @@ class Token(dict):
|
|
|
395
399
|
def is_admin_project(self):
|
|
396
400
|
self.root.pop('is_admin_project', None)
|
|
397
401
|
|
|
402
|
+
@property
|
|
403
|
+
def oauth2_thumbprint(self):
|
|
404
|
+
return self.root.get('oauth2_credential', {}).get('x5t#S256')
|
|
405
|
+
|
|
406
|
+
@oauth2_thumbprint.setter
|
|
407
|
+
def oauth2_thumbprint(self, value):
|
|
408
|
+
self.root.setdefault('oauth2_credential', {})['x5t#S256'] = value
|
|
409
|
+
|
|
410
|
+
@property
|
|
411
|
+
def oauth2_credential(self):
|
|
412
|
+
return self.root.get('oauth2_credential')
|
|
413
|
+
|
|
398
414
|
def validate(self):
|
|
399
415
|
project = self.root.get('project')
|
|
400
416
|
domain = self.root.get('domain')
|
|
@@ -49,6 +49,9 @@ V3OidcAuthorizationCode = oidc.OidcAuthorizationCode
|
|
|
49
49
|
V3OidcAccessToken = oidc.OidcAccessToken
|
|
50
50
|
"""See :class:`keystoneauth1.identity.v3.oidc.OidcAccessToken`"""
|
|
51
51
|
|
|
52
|
+
V3OidcDeviceAuthorization = oidc.OidcDeviceAuthorization
|
|
53
|
+
"""See :class:`keystoneauth1.identity.v3.oidc.OidcDeviceAuthorization`"""
|
|
54
|
+
|
|
52
55
|
V3TOTP = v3.TOTP
|
|
53
56
|
"""See :class:`keystoneauth1.identity.v3.TOTP`"""
|
|
54
57
|
|
|
@@ -64,6 +67,9 @@ V3MultiFactor = v3.MultiFactor
|
|
|
64
67
|
V3OAuth2ClientCredential = v3.OAuth2ClientCredential
|
|
65
68
|
"""See :class:`keystoneauth1.identity.v3.OAuth2ClientCredential`"""
|
|
66
69
|
|
|
70
|
+
V3OAuth2mTlsClientCredential = v3.OAuth2mTlsClientCredential
|
|
71
|
+
"""See :class:`keystoneauth1.identity.v3.OAuth2mTlsClientCredential`"""
|
|
72
|
+
|
|
67
73
|
__all__ = ('BaseIdentityPlugin',
|
|
68
74
|
'Password',
|
|
69
75
|
'Token',
|
|
@@ -74,8 +80,10 @@ __all__ = ('BaseIdentityPlugin',
|
|
|
74
80
|
'V3OidcPassword',
|
|
75
81
|
'V3OidcAuthorizationCode',
|
|
76
82
|
'V3OidcAccessToken',
|
|
83
|
+
'V3OidcDeviceAuthorization',
|
|
77
84
|
'V3TOTP',
|
|
78
85
|
'V3TokenlessAuth',
|
|
79
86
|
'V3ApplicationCredential',
|
|
80
87
|
'V3MultiFactor',
|
|
81
|
-
'V3OAuth2ClientCredential'
|
|
88
|
+
'V3OAuth2ClientCredential',
|
|
89
|
+
'V3OAuth2mTlsClientCredential')
|
|
@@ -17,8 +17,6 @@ import hashlib
|
|
|
17
17
|
import json
|
|
18
18
|
import threading
|
|
19
19
|
|
|
20
|
-
import six
|
|
21
|
-
|
|
22
20
|
from keystoneauth1 import _utils as utils
|
|
23
21
|
from keystoneauth1 import access
|
|
24
22
|
from keystoneauth1 import discover
|
|
@@ -28,8 +26,7 @@ from keystoneauth1 import plugin
|
|
|
28
26
|
LOG = utils.get_logger(__name__)
|
|
29
27
|
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
class BaseIdentityPlugin(plugin.BaseAuthPlugin):
|
|
29
|
+
class BaseIdentityPlugin(plugin.BaseAuthPlugin, metaclass=abc.ABCMeta):
|
|
33
30
|
|
|
34
31
|
# we count a token as valid (not needing refreshing) if it is valid for at
|
|
35
32
|
# least this many seconds before the token expiry time
|
|
@@ -647,9 +644,9 @@ class BaseIdentityPlugin(plugin.BaseAuthPlugin):
|
|
|
647
644
|
for k, v in sorted(elements.items()):
|
|
648
645
|
if v is not None:
|
|
649
646
|
# NOTE(jamielennox): in python3 you need to pass bytes to hash
|
|
650
|
-
if isinstance(k,
|
|
647
|
+
if isinstance(k, str):
|
|
651
648
|
k = k.encode('utf-8')
|
|
652
|
-
if isinstance(v,
|
|
649
|
+
if isinstance(v, str):
|
|
653
650
|
v = v.encode('utf-8')
|
|
654
651
|
|
|
655
652
|
hasher.update(k)
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import abc
|
|
14
|
-
|
|
15
|
-
import six
|
|
16
|
-
import six.moves.urllib.parse as urlparse
|
|
14
|
+
import urllib.parse
|
|
17
15
|
|
|
18
16
|
from keystoneauth1 import _utils as utils
|
|
19
17
|
from keystoneauth1 import discover
|
|
@@ -24,8 +22,7 @@ from keystoneauth1.identity import base
|
|
|
24
22
|
LOG = utils.get_logger(__name__)
|
|
25
23
|
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
class BaseGenericPlugin(base.BaseIdentityPlugin):
|
|
25
|
+
class BaseGenericPlugin(base.BaseIdentityPlugin, metaclass=abc.ABCMeta):
|
|
29
26
|
"""An identity plugin that is not version dependent.
|
|
30
27
|
|
|
31
28
|
Internally we will construct a version dependent plugin with the resolved
|
|
@@ -144,7 +141,7 @@ class BaseGenericPlugin(base.BaseIdentityPlugin):
|
|
|
144
141
|
'contacting %s. Attempting to parse version from URL.',
|
|
145
142
|
self.auth_url)
|
|
146
143
|
|
|
147
|
-
url_parts =
|
|
144
|
+
url_parts = urllib.parse.urlparse(self.auth_url)
|
|
148
145
|
path = url_parts.path.lower()
|
|
149
146
|
|
|
150
147
|
if path.startswith('/v2.0'):
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
import abc
|
|
14
14
|
|
|
15
|
-
import six
|
|
16
|
-
|
|
17
15
|
from keystoneauth1 import _utils as utils
|
|
18
16
|
from keystoneauth1 import access
|
|
19
17
|
from keystoneauth1 import exceptions
|
|
@@ -22,8 +20,7 @@ from keystoneauth1.identity import base
|
|
|
22
20
|
_logger = utils.get_logger(__name__)
|
|
23
21
|
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
class Auth(base.BaseIdentityPlugin):
|
|
23
|
+
class Auth(base.BaseIdentityPlugin, metaclass=abc.ABCMeta):
|
|
27
24
|
"""Identity V2 Authentication Plugin.
|
|
28
25
|
|
|
29
26
|
:param string auth_url: Identity service endpoint for authorization.
|
|
@@ -24,6 +24,7 @@ from keystoneauth1.identity.v3.token import * # noqa
|
|
|
24
24
|
from keystoneauth1.identity.v3.totp import * # noqa
|
|
25
25
|
from keystoneauth1.identity.v3.tokenless_auth import * # noqa
|
|
26
26
|
from keystoneauth1.identity.v3.oauth2_client_credential import * # noqa
|
|
27
|
+
from keystoneauth1.identity.v3.oauth2_mtls_client_credential import * # noqa
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
__all__ = ('ApplicationCredential',
|
|
@@ -59,4 +60,7 @@ __all__ = ('ApplicationCredential',
|
|
|
59
60
|
'MultiFactor',
|
|
60
61
|
|
|
61
62
|
'OAuth2ClientCredential',
|
|
62
|
-
'OAuth2ClientCredentialMethod',
|
|
63
|
+
'OAuth2ClientCredentialMethod',
|
|
64
|
+
|
|
65
|
+
'OAuth2mTlsClientCredential',
|
|
66
|
+
)
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
import abc
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
-
import six
|
|
17
|
-
|
|
18
16
|
from keystoneauth1 import _utils as utils
|
|
19
17
|
from keystoneauth1 import access
|
|
20
18
|
from keystoneauth1 import exceptions
|
|
@@ -25,8 +23,7 @@ _logger = utils.get_logger(__name__)
|
|
|
25
23
|
__all__ = ('Auth', 'AuthMethod', 'AuthConstructor', 'BaseAuth')
|
|
26
24
|
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
class BaseAuth(base.BaseIdentityPlugin):
|
|
26
|
+
class BaseAuth(base.BaseIdentityPlugin, metaclass=abc.ABCMeta):
|
|
30
27
|
"""Identity V3 Authentication Plugin.
|
|
31
28
|
|
|
32
29
|
:param string auth_url: Identity service endpoint for authentication.
|
|
@@ -224,8 +221,7 @@ class Auth(BaseAuth):
|
|
|
224
221
|
return params
|
|
225
222
|
|
|
226
223
|
|
|
227
|
-
|
|
228
|
-
class AuthMethod(object):
|
|
224
|
+
class AuthMethod(metaclass=abc.ABCMeta):
|
|
229
225
|
"""One part of a V3 Authentication strategy.
|
|
230
226
|
|
|
231
227
|
V3 Tokens allow multiple methods to be presented when authentication
|
|
@@ -284,8 +280,7 @@ class AuthMethod(object):
|
|
|
284
280
|
raise NotImplementedError()
|
|
285
281
|
|
|
286
282
|
|
|
287
|
-
|
|
288
|
-
class AuthConstructor(Auth):
|
|
283
|
+
class AuthConstructor(Auth, metaclass=abc.ABCMeta):
|
|
289
284
|
"""Abstract base class for creating an Auth Plugin.
|
|
290
285
|
|
|
291
286
|
The Auth Plugin created contains only one authentication method. This
|
|
@@ -12,16 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
import abc
|
|
14
14
|
|
|
15
|
-
import six
|
|
16
|
-
|
|
17
15
|
from keystoneauth1.identity.v3 import base
|
|
18
16
|
from keystoneauth1.identity.v3 import token
|
|
19
17
|
|
|
20
18
|
__all__ = ('FederationBaseAuth',)
|
|
21
19
|
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
class _Rescoped(base.BaseAuth):
|
|
21
|
+
class _Rescoped(base.BaseAuth, metaclass=abc.ABCMeta):
|
|
25
22
|
"""A plugin that is always going to go through a rescope process.
|
|
26
23
|
|
|
27
24
|
The original keystone plugins could simply pass a project or domain to
|
|
@@ -103,8 +100,11 @@ class FederationBaseAuth(_Rescoped):
|
|
|
103
100
|
@property
|
|
104
101
|
def federated_token_url(self):
|
|
105
102
|
"""Full URL where authorization data is sent."""
|
|
103
|
+
host = self.auth_url.rstrip('/')
|
|
104
|
+
if not host.endswith('v3'):
|
|
105
|
+
host += '/v3'
|
|
106
106
|
values = {
|
|
107
|
-
'host':
|
|
107
|
+
'host': host,
|
|
108
108
|
'identity_provider': self.identity_provider,
|
|
109
109
|
'protocol': self.protocol
|
|
110
110
|
}
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
-
import six
|
|
14
|
-
|
|
15
13
|
from keystoneauth1 import access
|
|
16
14
|
from keystoneauth1 import exceptions
|
|
17
15
|
from keystoneauth1.identity.v3 import federation
|
|
@@ -119,7 +117,7 @@ class Keystone2Keystone(federation._Rescoped):
|
|
|
119
117
|
if not resp.text:
|
|
120
118
|
raise exceptions.InvalidResponse(resp)
|
|
121
119
|
|
|
122
|
-
return
|
|
120
|
+
return str(resp.text)
|
|
123
121
|
|
|
124
122
|
def _send_service_provider_ecp_authn_response(self, session, sp_url,
|
|
125
123
|
sp_auth_url):
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Copyright 2022 OpenStack Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
4
|
+
# not use this file except in compliance with the License. You may obtain
|
|
5
|
+
# a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
11
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
12
|
+
# License for the specific language governing permissions and limitations
|
|
13
|
+
# under the License.
|
|
14
|
+
|
|
15
|
+
import abc
|
|
16
|
+
|
|
17
|
+
from keystoneauth1 import access
|
|
18
|
+
from keystoneauth1 import exceptions
|
|
19
|
+
from keystoneauth1.identity.v3 import base
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class OAuth2mTlsClientCredential(base.BaseAuth, metaclass=abc.ABCMeta):
|
|
23
|
+
"""A plugin for authenticating via an OAuth2.0 mTLS client credential.
|
|
24
|
+
|
|
25
|
+
:param string auth_url: keystone authorization endpoint.
|
|
26
|
+
:param string oauth2_endpoint: OAuth2.0 endpoint.
|
|
27
|
+
:param string oauth2_client_id: OAuth2.0 client credential id.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
def __init__(self, auth_url, oauth2_endpoint, oauth2_client_id,
|
|
31
|
+
*args, **kwargs):
|
|
32
|
+
super(OAuth2mTlsClientCredential, self).__init__(
|
|
33
|
+
auth_url, *args, **kwargs)
|
|
34
|
+
self.auth_url = auth_url
|
|
35
|
+
self.oauth2_endpoint = oauth2_endpoint
|
|
36
|
+
self.oauth2_client_id = oauth2_client_id
|
|
37
|
+
self.oauth2_access_token = None
|
|
38
|
+
|
|
39
|
+
def get_auth_ref(self, session, **kwargs):
|
|
40
|
+
"""Obtain a token from an OpenStack Identity Service.
|
|
41
|
+
|
|
42
|
+
This method is overridden by the various token version plugins.
|
|
43
|
+
|
|
44
|
+
This function should not be called independently and is expected to be
|
|
45
|
+
invoked via the do_authenticate function.
|
|
46
|
+
|
|
47
|
+
This function will be invoked if the AcessInfo object cached by the
|
|
48
|
+
plugin is not valid. Thus plugins should always fetch a new AccessInfo
|
|
49
|
+
when invoked. If you are looking to just retrieve the current auth
|
|
50
|
+
data then you should use get_access.
|
|
51
|
+
|
|
52
|
+
:param session: A session object that can be used for communication.
|
|
53
|
+
:type session: keystoneauth1.session.Session
|
|
54
|
+
|
|
55
|
+
:raises keystoneauth1.exceptions.response.InvalidResponse:
|
|
56
|
+
The response returned wasn't appropriate.
|
|
57
|
+
:raises keystoneauth1.exceptions.http.HttpError:
|
|
58
|
+
An error from an invalid HTTP response.
|
|
59
|
+
:raises keystoneauth1.exceptions.ClientException:
|
|
60
|
+
An error from getting OAuth2.0 access token.
|
|
61
|
+
|
|
62
|
+
:returns: Token access information.
|
|
63
|
+
:rtype: :class:`keystoneauth1.access.AccessInfo`
|
|
64
|
+
"""
|
|
65
|
+
# Get OAuth2.0 access token and add the field 'Authorization' when
|
|
66
|
+
# using the HTTPS protocol.
|
|
67
|
+
data = {'grant_type': 'client_credentials',
|
|
68
|
+
'client_id': self.oauth2_client_id}
|
|
69
|
+
resp = session.post(url=self.oauth2_endpoint,
|
|
70
|
+
authenticated=False,
|
|
71
|
+
raise_exc=False,
|
|
72
|
+
data=data)
|
|
73
|
+
if resp.status_code == 200:
|
|
74
|
+
oauth2 = resp.json()
|
|
75
|
+
self.oauth2_access_token = oauth2.get('access_token')
|
|
76
|
+
else:
|
|
77
|
+
error = resp.json()
|
|
78
|
+
msg = error.get('error_description')
|
|
79
|
+
raise exceptions.ClientException(msg)
|
|
80
|
+
|
|
81
|
+
headers = {'Accept': 'application/json',
|
|
82
|
+
'X-Auth-Token': self.oauth2_access_token,
|
|
83
|
+
'X-Subject-Token': self.oauth2_access_token}
|
|
84
|
+
|
|
85
|
+
token_url = '%s/auth/tokens' % self.auth_url.rstrip('/')
|
|
86
|
+
if not self.auth_url.rstrip('/').endswith('v3'):
|
|
87
|
+
token_url = '%s/v3/auth/tokens' % self.auth_url.rstrip('/')
|
|
88
|
+
resp = session.get(url=token_url,
|
|
89
|
+
authenticated=False,
|
|
90
|
+
headers=headers,
|
|
91
|
+
log=False)
|
|
92
|
+
try:
|
|
93
|
+
resp_data = resp.json()
|
|
94
|
+
except ValueError:
|
|
95
|
+
raise exceptions.InvalidResponse(response=resp)
|
|
96
|
+
if 'token' not in resp_data:
|
|
97
|
+
raise exceptions.InvalidResponse(response=resp)
|
|
98
|
+
|
|
99
|
+
return access.AccessInfoV3(auth_token=self.oauth2_access_token,
|
|
100
|
+
body=resp_data)
|
|
101
|
+
|
|
102
|
+
def get_headers(self, session, **kwargs):
|
|
103
|
+
"""Fetch authentication headers for message.
|
|
104
|
+
|
|
105
|
+
:param session: The session object that the auth_plugin belongs to.
|
|
106
|
+
:type session: keystoneauth1.session.Session
|
|
107
|
+
|
|
108
|
+
:returns: Headers that are set to authenticate a message or None for
|
|
109
|
+
failure. Note that when checking this value that the empty
|
|
110
|
+
dict is a valid, non-failure response.
|
|
111
|
+
:rtype: dict
|
|
112
|
+
"""
|
|
113
|
+
# get headers for X-Auth-Token
|
|
114
|
+
headers = super(OAuth2mTlsClientCredential, self).get_headers(
|
|
115
|
+
session, **kwargs)
|
|
116
|
+
|
|
117
|
+
# add OAuth2.0 access token to the headers
|
|
118
|
+
if headers:
|
|
119
|
+
headers['Authorization'] = f'Bearer {self.oauth2_access_token}'
|
|
120
|
+
else:
|
|
121
|
+
headers = {'Authorization': f'Bearer {self.oauth2_access_token}'}
|
|
122
|
+
return headers
|