diff options
author | Steve Baker <sbaker@redhat.com> | 2020-05-19 10:50:28 +1200 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2020-06-05 01:15:08 +1200 |
commit | c6112b01c38285bbad0e056700deaeaf291db1d4 (patch) | |
tree | 8c9ec995a32ea0348c119fa6b675f245fb3b31e3 /requirements.txt | |
parent | 3daffe07a834ae4814e932a7ab5fb006bff21cdb (diff) | |
download | ironic-c6112b01c38285bbad0e056700deaeaf291db1d4.tar.gz |
Enable Basic HTTP authentication middleware
When the config option ``auth_strategy`` is set to ``http_basic`` then
non-public API calls require a valid HTTP Basic authentication header
to be set. The config option ``http_basic_auth_user_file`` defaults to
``/etc/ironic/htpasswd`` and points to a file which supports the
Apache htpasswd syntax[1]. This file is read for every request, so no
service restart is required when changes are made.
The only password digest supported is bcrypt, and the ``bcrypt``
python library is used for password checks since it supports ``$2y$``
prefixed bcrypt passwords as generated by the Apache htpasswd utility.
To try HTTP basic authentication, the following can be done:
* Set ``/etc/ironic/ironic.conf`` ``DEFAULT`` ``auth_strategy`` to ``http_basic``
* Populate the htpasswd file with entries, for example:
``htpasswd -nbB myName myPassword >> /etc/ironic/htpasswd``
* Make basic authenticated HTTP requests, for example:
``curl --user myName:myPassword http://localhost:6385/v1/drivers``
[1] https://httpd.apache.org/docs/current/misc/password_encryptions.html
Change-Id: I7b89155d8bbd2f48e186c12adea9d6932cd0bfe2
Story: 2007656
Task: 39825
Depends-On: https://review.opendev.org/729070
Diffstat (limited to 'requirements.txt')
-rw-r--r-- | requirements.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/requirements.txt b/requirements.txt index 602487484..9a59e6777 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0 python-neutronclient>=6.7.0 # Apache-2.0 python-glanceclient>=2.8.0 # Apache-2.0 keystoneauth1>=3.18.0 # Apache-2.0 -ironic-lib>=2.17.1 # Apache-2.0 +ironic-lib>=4.3.0 # Apache-2.0 python-swiftclient>=3.2.0 # Apache-2.0 pytz>=2013.6 # MIT stevedore>=1.20.0 # Apache-2.0 |