basic auth

Bug #1238965 reported by Kevin Fox
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
keystoneauth
Confirmed
Wishlist
Unassigned
python-keystoneclient
Invalid
Wishlist
Unassigned

Bug Description

Keystone now supports external authentication by embedding keystone within apache and enabling apache authentication modules. Unfortunately, the vast majority of them do not seem to work due to requiring basic auth credential passing which python-keystoneclient does not seem to support.

Something like the following has allowed basic auth plugins to work for me under the keystone and heat cli's. I'm guessing other api versions will need a similar change.

--- /usr/lib/python2.6/site-packages/keystoneclient/v2_0/client.py.orig 2013-10-11 12:57:15.518418172 -0700
+++ /usr/lib/python2.6/site-packages/keystoneclient/v2_0/client.py 2013-10-11 13:28:56.171280226 -0700
@@ -12,6 +12,7 @@
 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 # License for the specific language governing permissions and limitations
 # under the License.
+import base64
 import logging

 from keystoneclient import exceptions
@@ -178,6 +179,7 @@
             headers['X-Auth-Token'] = token
             params = {"auth": {"token": {"id": token}}}
         elif username and password:
+ headers['Authorization'] = "Basic %s" % base64.standard_b64encode("%s:%s" % (username, password))
             params = {"auth": {"passwordCredentials": {"username": username,
                                                        "password": password}}}
         else:

Dolph Mathews (dolph)
affects: keystone → python-keystoneclient
Changed in python-keystoneclient:
importance: Undecided → Wishlist
Changed in python-keystoneclient:
status: New → Confirmed
Changed in python-keystoneclient:
status: Confirmed → Invalid
Changed in keystoneauth:
status: New → Confirmed
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.