savannaclient allows for creation of swift data sources without credentials

Bug #1272130 reported by Matthew Farrellee
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python client library for Sahara
Fix Released
Matthew Farrellee

Bug Description

the savanna-api side validations for data-sources creation require presence of a user and password when a swift type is provided

def _check_swift_data_source_create(data):
    if not ("user" in data["credentials"]
            and "password" in data["credentials"]):
        raise ex.InvalidCredentials("Invalid credentials for Swift")

however, the savannaclient always provides a user and password, even if they are None

    def create(self, name, description, data_source_type,
               url, credential_user, credential_pass):
        data = {
            'name': name,
            'description': description,
            'type': data_source_type,
            'url': url,
            'credentials': {'user': credential_user,
                            'password': credential_pass}
        return self._create('/data-sources', data, 'data_source')

the client effectively cancels out the service validation

Changed in savanna:
assignee: nobody → Matthew Farrellee (mattf)
importance: Undecided → Low
milestone: none → icehouse-3
Revision history for this message
Matthew Farrellee (mattf) wrote :

fixed by -
commit aaab0505fe1547a01a096d5612597f74f9534b29
Author: Matthew Farrellee <email address hidden>
Date: Thu Jan 23 20:58:57 2014 -0500

    Send credentials only when they are provided

    Closes-bug: #1272130

    Change-Id: I9a82e52dcadcdcf02ecbadaf23c42243d59b464a

Changed in savanna:
status: New → Fix Committed
affects: savanna → python-savannaclient
Changed in python-savannaclient:
milestone: icehouse-3 → none
milestone: none → 0.5.0
importance: Low → Medium
Changed in python-savannaclient:
status: Fix Committed → Fix Released
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.