Search code examples
rubyibm-cloud-infrastructureobject-storage

How can I generate TempURL for object on Object Storage of SoftLayer


How can I generate TempURL for object on Object Storage of SoftLayer?

I currently use Ruby API and I can access my object after authenticate. But for external End Users, I need to generate public URL for that object which is can be accessed without authentication process.

I tried to generate Temp URL with expiration, but I cannot find key for hexdigest() of HMAC. How can I found it? or is there any other way to get same result?


Solution

  • Answer myself.

    I finally wrote a code for it, after doing some more search on it including:

    1. read related API codes from https://github.com/softlayer/softlayer-object-storage-ruby
    2. read http://sldn.softlayer.com/es/blog/waelriac/Managing-SoftLayer-Object-Storage-Through-REST-APIs
    3. after that, I found some hint from middle of the second document: the response Header contains this key!
      • X-Account-Meta-Temp-URL-Key

    So, I wrote a code(method) for it and make pull request(https://github.com/softlayer/softlayer-object-storage-ruby/pull/10), and I hope it will merged soon. anyway, If it is not accepted (yet), you can found my code at https://github.com/c12g/softlayer-object-storage-ruby