Swift.py does not respect the OPENSTACK_SSL_NO_VERIFY setting for use with self signed certs

Bug #1311357 reported by Darryl Weaver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Chuck Short

Bug Description

The swift api client connection does not respect the OPENSTACK_SSL_NO_VERIFY setting in local_settings.py.
This results in a test deployment with self signed certificates not being able to use the Horizon project containers web interface with an SSL verification error.

A patch would be something like this:

diff -Naur openstack-dashboard/openstack_dashboard/api/swift.py openstack-dashboard.new/openstack_dashboard/api/swift.py
--- openstack-dashboard/openstack_dashboard/api/swift.py 2014-04-22 21:44:37.293082690 +0000
+++ openstack-dashboard.new/openstack_dashboard/api/swift.py 2014-04-22 21:47:57.541082727 +0000
@@ -108,6 +108,7 @@

 def swift_api(request):
     endpoint = base.url_for(request, 'object-store')
+ insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
     cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
     LOG.debug('Swift connection created using token "%s" and url "%s"'
               % (request.user.token.id, endpoint))
@@ -117,6 +118,7 @@
                                          preauthtoken=request.user.token.id,
                                          preauthurl=endpoint,
                                          cacert=cacert,
+ insecure=insecure,
                                          auth_version="2.0")

Revision history for this message
Julie Pichon (jpichon) wrote :

Thanks for the bug report and patch Daryl. Could you submit the patch to Gerrit following the OpenStack process described at https://wiki.openstack.org/wiki/HowToContribute#If_you.27re_a_developer ? If you hit any issue or have a question, feel free to pop up on IRC at #openstack-horizon, people are happy to help.

Revision history for this message
Julie Pichon (jpichon) wrote :
Julie Pichon (jpichon)
Changed in horizon:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Chuck Short (zulcss)
milestone: none → juno-1
Julie Pichon (jpichon)
Changed in horizon:
milestone: juno-1 → juno-2
Changed in horizon:
milestone: juno-2 → juno-3
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-3 → juno-rc1
David Lyle (david-lyle)
Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
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.