Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-968

Creating containers with azure fails with InvalidCredsError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.13.3
    • None
    • Storage
    • None
    • Mac OS X. Python 2.7 virtual environment running.

    Description

      I'm trying to use the storage API to connect to Azure blob storage.

      Trying to create a bucket fails. Trying to list buckets fails. I copied my credentials directly from the Azure portal.

      Hopefully this is just a configuration error on my end. Is anyone else experiencing this?

      {{PyDev console: using IPython 5.5.0
      Python 2.7.13 (default, Jul 18 2017, 09:17:00)
      Type "copyright", "credits" or "license" for more information.
      IPython 5.5.0 – An enhanced Interactive Python.
      ? -> Introduction and overview of IPython's features.
      %quickref -> Quick reference.
      help -> Python's own help system.
      object? -> Details about 'object', use 'object??' for extra details.
      Python 2.7.13 (default, Jul 18 2017, 09:17:00)
      [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
      from libcloud.storage.types import Provider
      from libcloud.storage.providers import get_driver
      driver = get_driver(Provider.AZURE_BLOBS)(key='MY_ACCOUNT_NAME', secret='MY_SECRET_KEY_1')
      driver.create_container('test-container123')
      Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2882, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-4-c40d0dcc5541>", line 1, in <module>
      driver.create_container('test-container123')
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/storage/drivers/azure_blobs.py", line 495, in create_container
      method='PUT')
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/common/base.py", line 637, in request
      response = responseCls(**kwargs)
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/common/base.py", line 157, in _init_
      message=self.parse_error())
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/common/azure.py", line 84, in parse_error
      raise InvalidCredsError(error_msg)
      InvalidCredsError: 'AuthenticationFailed: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.'
      for c in driver.iterate_containers():
      print c

      Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2882, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-5-3936d68a1d1c>", line 1, in <module>
      for c in driver.iterate_containers():
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/storage/drivers/azure_blobs.py", line 368, in iterate_containers
      response = self.connection.request('/', params)
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/common/base.py", line 637, in request
      response = responseCls(**kwargs)
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/common/base.py", line 157, in _init_
      message=self.parse_error())
      File "/Users/jesse/Documents/genomics/toil/gcs/lib/python2.7/site-packages/libcloud/common/azure.py", line 84, in parse_error
      raise InvalidCredsError(error_msg)
      InvalidCredsError: 'AuthenticationFailed: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.'}}

      Attachments

        Activity

          People

            Unassigned Unassigned
            jessebrennan Jesse Brennan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: