Commit Graph

106 Commits

Author SHA1 Message Date
Zuul 28048af959 Merge "Add doc of OAuth 2.0 Mutual-TLS Authenticate" 2023-06-27 15:49:46 +00:00
Zuul 0195cc7ead Merge "Add doc of OAuth2.0 Client Credentials Grant Flow" 2023-06-14 18:29:45 +00:00
Arvid Requate 44e5b2deef New auth plugin v3oidcdeviceauthz
OAuth 2.0 Device Authorization Grant

https://www.rfc-editor.org/rfc/rfc8628

Signed-off-by: Arvid Requate <requate@univention.de>
Change-Id: I8344ee5c9730c1533d58d7ccb04ddc3d2d517ade
2023-02-23 10:09:08 +01:00
sunyonggen ab0beab2c9 Add doc of OAuth 2.0 Mutual-TLS Authenticate
Added a new OAuth2mTlsClientCredential plugin, accessible via the
'v3oauth2mtlsclientcredential' entry point, making possible to
authenticate using an OAuth 2.0 Mutual-TLS client credentials.

Implements: blueprint support-oauth2-mtls
Change-Id: I4b85bcfbfad1e34624b48ecd6476d01a4adba9eb
2022-10-24 11:49:03 +09:00
Yusuke Niimi e8335e56dc Add doc of OAuth2.0 Client Credentials Grant Flow
This patch provides Keystoneauth documents for OAuth2.0 client
authorization. The specification about OAuth2.0 Client Credential Grant
is added to authentication plugins.

Implement: blueprint oauth2-client-credentials-ext
Change-Id: Iefaa997c1e561f51cb0e93d80106ccaa70932755
2022-07-21 05:19:18 +00:00
shanyunfan33 af78d4a22c remove unicode from code
remove unicode from code

Change-Id: I95f201f5678f093981014a553ffadb2a6b2a0453
2022-04-29 15:48:17 +00:00
Lance Bragstad b8ddb3b75f Clarify token_endpoint.Token usecases
This authentication plugin isn't grouped with the other authentication
plugins, but it can be really useful for people writing proxies or
implementing service-to-service calls.

This commit just highlights the usefulness of this plugin with some
example usecases and a code snippet. The current documentation phrases
it such that it's only useful for testing.

Change-Id: I1de4959ccde3fdf8141d8f4949c73542c2200483
2021-01-08 21:57:16 +00:00
Monty Taylor a4ac1ea193 Fix docs builds for modern stevedors
We have a custom doc build extension that scans module names, but
the api for that changed.

Change-Id: If8c08d22dde3e570cdc6fb7092bc131e2e3bcc18
2020-07-27 11:13:15 -05:00
Zuul e0f1d314f4 Merge "Update lower-constraints versions" 2020-06-22 16:43:26 +00:00
Steve Baker ff68663217 Implement HTTP Basic client support in keystoneauth1
A new basic auth plugin is added which enables HTTP Basic
authentication for standalone services. Like the noauth plugin, the
endpoint needs to be specified explicitly, along with the
username and password.

An example of a standalone server implementing HTTP Basic can be seen
in Ironic change https://review.opendev.org/#/c/727467/

Change-Id: Ib3f0a9c518d031a67f9605cf64a8a9cc81131ed3
Story: 2007656
Task: 39741
2020-06-15 10:26:35 +12:00
Sean McGinnis 8915fabc38
Update lower-constraints versions
This updates lower constraints to versions that will work with py38 so
that when we move to running on focal nodes, which has py38 as its
default py3 runtime, the lower-constraints job will continue to pass.

It also cleans out some secondary requirements that are no longer needed
due to our direct dependencies being updated.

Linters are removed that are kept in the global requirements blacklist
as those are not version tracked and are not relevant for our
lower-constraints unit test runs.

Change-Id: I228212d8347a33a6bc2735a8506acffe58bee2ec
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-10 06:42:37 -05:00
Zuul e96c2102ad Merge "Use unittest.mock instead of third party mock" 2020-06-05 04:21:48 +00:00
Sean McGinnis edc2ae4249
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I07d61e1a8f18d65acdf86cdd61f7d9e28157f1d7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-05-29 10:37:58 -05:00
Andreas Jaeger 5b98e12acb Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I23798a960616d53d1cc54342640e670fc677738d
2020-05-21 12:53:08 +02:00
Andreas Jaeger 1accaf2d8a Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme and Sphinx versions
- Remove install_command from tox.ini, the default is fine
- Remove hacking from doc/requirements, we don't need to autodoc it.
- Remove Babel, this repo does not use it.

Change-Id: I8ad7b5e6ef11ea51c587ff58bfc54aee4fcda9da
2020-04-17 18:46:54 +02:00
Vishakha Agarwal aafc90a9c2 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

keystoneauth is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I76ad66b76a85db9609aebc08e1f26a74219402f0
2020-01-07 12:31:09 -05:00
Vishakha Agarwal 0c34f0f8ff Generate pdf documentation
This commit adds a new tox target to build pdf documentation.

Change-Id: I8defd8cb18316956f3f8fdc1af743a4a1123b0a9
2019-09-27 12:58:07 +05:30
Colleen Murphy 249d1e9924 Follow the PTI for docs
Use sphinx-build instead of the pbr sphinx extention for building docs
as instructed by the PTI[1].

This requires using the sphinxcontrib-apidoc plugin rather than the
autodoc pbr extention. We also remove the reference to the ChangeLog
file that is usually generated by pbr and instead refer to the published
reno release notes. Also fixes the header formatting for the index page,
as the headers weren't rendering at all.

[1] https://governance.openstack.org/tc/reference/pti/python.html

Change-Id: Iec8b99fa89877e357cf2e754abad77c9032acad1
2019-09-26 11:11:47 -07:00
Adrian Turjak 6a69e4dfbd add support for auth_receipts and multi-method auth
- new exception when an auth receipt is returned.
- a new method for auth receipt.
- support to existing v3 Auth plugins to add additional methods.
- Added a new MultiFactor plugin with loading support which
  takes method names as strings.

Change-Id: Ie6601a50011118e3a07be9752f747c2298ff5230
Closes-Bug: #1839748
2019-08-14 11:51:28 +12:00
Zuul 1c4334c73d Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-29 18:45:09 +00:00
Zuul af28ae516f Merge "Resolves a typo in a link to use Application Credentials" 2019-05-29 16:59:00 +00:00
caoyuan 0682135749 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ifd65f93e3ddde4ac06a4f37a41238b81d7e03165
Closes-Bug: #1827008
2019-05-29 02:30:15 +00:00
Vishakha Agarwal 70720ff336 Blacklist bandit 1.6.0 & cap sphinx for 2.7
The latest version of bandit has broken directory
exclusion, so multiple test files are getting
flagged. This change blocks version 1.6.0 while
this issue is fixed for 1.6.1.

This change also caps sphinx at <2.0.0 for python version 2.7.

Change-Id: Id4db764200be068df0dbe96306c2d53f79b49af7
2019-05-24 10:06:00 +00:00
Chinmay Naik 2bb7f120c3 Resolves a typo in a link to use Application Credentials
Change-Id: I6a4ab4076e0a0722fdc1ee3b1685cc242b3dac4c
Closes-Bug: #1801101
2019-05-23 06:00:28 +00:00
Zuul 7731e7949c Merge "Update auth plugin name list in document" 2019-04-11 19:09:48 +00:00
ricolin b856b367b8 Update auth plugin name list in document
Change-Id: I6fbd3cac12f0e540a97b5a5a0d038a5931442fd8
2019-04-11 16:05:40 +08:00
zhouxinyong 7939dc7ab9 Replacing the HTTP protocal with HTTPS in using-sessions.rst.
Change-Id: Ib4712414c48ed922ea62460730a4cd5749a3d481
2018-11-17 02:52:04 +00:00
Sean McGinnis 87ca0d72fa Update sphinx extension logging
Sphinx 1.6 deprecated using the application object to perform logging
and it will be removed in the upcoming 2.0 release. This updates our
extensions to use the recommended sphinx.util.logging instead.

Change-Id: I3abce4e3c147befd0235820cb8850fe18f6dee42
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-16 14:21:45 -05:00
Colleen Murphy 3c9746ae34 Add Keystone2Keystone example
Since we removed the keystoneauth example in the main docs in favor of
an openstackclient example[1] add an example of using the
Keystone2Keystone auth plugin.

[1]  https://review.openstack.org/591587

Change-Id: I5815fecbfe53d8a191a8a64912dac17e66ca928a
2018-08-21 14:49:13 +02:00
OpenStack Proposal Bot f04d1d0ed6 Updated from global requirements
Change-Id: I9bb8a55936d85d75631d7d729e5205e9faf3c024
2018-03-23 01:02:37 +00:00
OpenStack Proposal Bot ce78397bff Updated from global requirements
Change-Id: I02b333b1cf75419bfad64159976f5aba0f304125
2018-03-15 07:03:34 +00:00
Zuul 43698b65c9 Merge "Split request logging into four different loggers" 2018-02-15 21:14:28 +00:00
Monty Taylor 56b2c89c39
Split request logging into four different loggers
Python logging is pretty amazingly flexible, and allows us to emit
to arbitrary logging domains so that a consumer can direct log output
with specificity.

Turning on HTTP debug logging currently produces an avalanche of output,
when sometimes just seeing that the requests were made and responded to
is perfectly fine.

Split the loggers used into four - one for request ids, one for request
commands, one for response headers and one for response body content.
Make them subloggers of keystoneauth.session so that if a user does nothing,
their existing logging config will be unchanged.

If someone passes in a logger, behave as before logging all things to
the provided logger.

While we're at it, document this in the using-sessions document, so that
people know that the loggers exist and what they do.

NOTE:
The tox (>=1.7.0) by default sets a random python hash seed which
causes ordering of dicts and sets to be different between tests runs.
Disabled the random python hash seed by setting PYTHONHASHSEED=0 to
fix the random failure of below test:

keystoneauth1.tests.unit.test_session.SessionAuthTests.
test_split_loggers

The PYTHONHASHSEED=0 is removed in the followup patch so that we can
separate the tracking down of ordering issues in tests from this patch.

Change-Id: Ide7dac8adf5c76c9019c35867cda632aff39770f
2018-01-31 11:51:59 -06:00
OpenStack Proposal Bot 932aa61c98 Updated from global requirements
Change-Id: I5cf4332db4fadd403cfa2720be74f028892bc387
2018-01-24 00:57:18 +00:00
Zuul d4a552c2f3 Merge "Add documentation and release note for app creds" 2018-01-20 23:09:53 +00:00
Lance Bragstad 3bd74f28ca Add documentation and release note for app creds
Now that we can authenticate with application credentials using ksa,
we should add some documentation and a release note for users.

bp application-credentials

Change-Id: I5584b93a987246f9d527e22a13fb1b13df701822
2018-01-20 20:01:28 +01:00
OpenStack Proposal Bot ff44f4f242 Updated from global requirements
Change-Id: I01a4608fae8a381ca9dd80a94e0e7d88be173b0c
2018-01-17 20:37:08 +00:00
OpenStack Proposal Bot e1243d924b Updated from global requirements
Change-Id: I609492b0cbe42b5112eb0af6803962c812a801ce
2017-12-21 00:21:57 +00:00
Colleen Murphy 48829139d3 Fix docs builds
With the new way of generating docs in the gate[1] our autodoc builds
are slightly broken. Put the required dependencies for doc building and
autodoc generation into doc/requirements.txt. We can also now remove
docs-related requirements from test-requirements.txt.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I77a09349304451041491893466ca98ba6ebdf96b
2017-12-19 22:31:15 +01:00
Eric Fried bd9a9eb7c2 Nits in using-sessions.rst
Fix punctuation and formatting nits from [1].

[1] https://review.openstack.org/#/c/477566/11/doc/source/using-sessions.rst

Change-Id: I3987d317f2a858cf7cb6a66dfa90fa88cba5e94c
2017-09-01 17:14:09 -05:00
Jenkins 353b926042 Merge "Fixed minor review comments and updated docs" 2017-07-20 21:55:44 +00:00
Monty Taylor 5058d40c51 Fixed minor review comments and updated docs
The previous microversion patch had some review comments from samuel and
colleen that this addresses. Also, add a release note.

Change-Id: Id83643ee5a00abc5134a88dfa5bc8ddb4f5a247a
2017-07-20 18:36:12 +00:00
Jenkins fc950862c3 Merge "Add ability to specify a microversion in a request" 2017-07-19 16:39:13 +00:00
Jenkins f83094ba06 Merge "Enable sphinx todo extension" 2017-07-19 08:50:42 +00:00
Monty Taylor 218adc333e
Add ability to specify a microversion in a request
The user now has the ability to know what microversions are available,
but needs to be able to send a microversion header with their request.

Add a microversion parameter to Session that will construct and send the
header. The microversion header requires a service_type. One should be
available but it's possible for it to be missing if someone is using an
endpoint_override. Provide a parameter to let the user specify a
service_type for the microversion call in such cases.

Change-Id: I63cdd67701749630228f9496eda82b3c8747a608
2017-07-19 02:51:49 +09:00
Gage Hugo 0948e5e6da Enable sphinx todo extension
In a previous change [0] when warning-is-error was added, the
sphinx todo extension was causing errors with duplicate
registration. However with the recent changes between pbr and
sphinx, this extension no longer throws a duplicate error when
using warning-is-error and we can add it back in.

[0] https://review.openstack.org/#/c/439797/

Change-Id: I2c3c44015f5b961c56360f44b52c56629760de43
2017-07-17 11:16:19 -05:00
Monty Taylor 24b09f4088 Add support for next_min_version and not_before
The API-WG just approved the spec for version discovery documents to
optionally provide "next_min_version" and "not_before" information.

  http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery

The intended use of these is to communicate that at a point in the
future the service plans to raise the minimum microversion. It can't say
when that will happen, as a service does not know when deployers will
decide to upgrade their services. But it can communicate the earliest
date it's possible to happen, which would be the first date the service
itself would raise the minimum.

This can be used to emit warnings to users who are using a microversion
less than the next_min_version and to tell them how long they have to
think about it.

Currently keystoneauth will not consume these for that purpose. This
patch is merely about collecting the information from the discovery
document if it is there so a consumer can take action on it if they
wish.

Change-Id: Ibc404ef55eeae721a0d1d16e4e3e51ad77b5a75c
2017-07-15 14:29:24 +00:00
Monty Taylor de41fec992 Remove kwargs from adapter.get_endpoint_data
get_endpoint_data on an adapater is intended to return the endpoint_data
for the endpoint the adapter is mounted to, so passing in additional
kwargs doesn't make any sense. What's more, the interaction between the
existing values and the passed in values is hard to reason about.

Update the docs on using get_endpoint_data to highlight this.

Change-Id: I851c615407bc3e22af4350a4facf8488fa9c7945
2017-07-15 14:27:28 +00:00
Monty Taylor 05c3a471ae
Add paragraph clarifying major and micro versions
People get confused with major version discovery vs. microversion usage.
Try to make it very clear what's going on.

Change-Id: I2be8670998f531ee4777876413979a63279a59ab
2017-07-14 14:32:41 -05:00
Monty Taylor 416675f619
Update docs and add a release note
We added a bunch of new capabilities around discovery. Document them.

Change-Id: Ie0fa47e0cee918d7b8a9069eaf01931f64a54e58
2017-07-14 09:47:36 -05:00