<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, <div><br></div><div>just to explain little more. using S3 python API this header works perfectly fine </div><div><br></div><div>'GET /rootContainer/AFile.root HTTP/1.1\r\nHost: swift.uppmax.se\r\nAccept-Encoding: identity\r\nDate: Wed, 09 Nov 2011 22:19:43 GMT\r\nAuthorization: AWS system:root:k1lEc9aqTTX+54492q29OPZCq18=\r\n\r\n'</div><div><br></div><div>But when I use this same header within C++ simple code to it didn't work. </div><div><br></div><div>Can some point what I am doing wrong? </div><div><br></div><div>Regards. </div><div>Salman. </div><div><br><div><div>On Nov 9, 2011, at 11:15 PM, Salman Zubair Toor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Marcelo,<div><br></div><div>Thanks for the reply. </div><div><br></div><div>With curl I manage to access the file. </div><div><br></div><div><div># curl -v -k -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' <a href="https://swift.uppmax.se:443/auth/v1.0">https://swift.uppmax.se:443/auth/v1.0</a></div><div><br></div><div># curl -v -k -H "GET HTTP/1.1" -H 'X-Auth-Token: AUTH_tk63e5a2291f9b44a1ab5afb9674c05779' <a href="https://swift/">https://swift</a>.<a href="http://uppmax.se/">uppmax.se</a>/v1/AUTH_286270d2-3d18-46f5-a5dc-7c6c88da1e7d/rootContainer/eventdata.root</div></div><div><div><br></div><div>following is the correct header </div><div><br></div><div><br></div><div>> GET /v1/AUTH_286270d2-3d18-46f5-a5dc-7c6c88da1e7d/rootContainer/eventdata.root HTTP/1.1</div><div>> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15</div><div>> Host: swift.<a href="http://uppmax.se/">uppmax.se</a></div><div>> Accept: */*</div><div>> X-Auth-Token: AUTH_tk63e5a2291f9b44a1ab5afb9674c05779</div><div><br></div><div><br></div><div>Actually my original task is a bit different. I am working on a project where we already have S3 plugin available and I want to access SWIFT using S3 plugin, </div><div>Thats why I want to use Authentication rather than X-Auth-Token. </div><div><br></div><div>With this solution I can continue but is there anything else you want me to try ? </div><div><br></div><div>Regards..</div><div>Salman. </div><div><br></div><div><br></div><div><br><div><div>On Nov 9, 2011, at 3:53 PM, Marcelo Martins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Hi Salman,</div><div><br></div><div>My first suggestion is use curl .. I assume you are using telnet here. If you are using telnet and still want to try things out with it, you should be passing the "X-Auth-Token" header and not the "Authorization" .</div><div><br></div><div>Example:</div><div>================================</div><div><div>root@saio-2:~# telnet 127.0.0.1 8080</div><div>Trying 127.0.0.1...</div><div>Connected to 127.0.0.1.</div><div>Escape character is '^]'.</div><div>GET /v1/AUTH_100d771c-d41e-4614-8370-8848e63a7b1b</div><div>Host: 127.0.0.1:8080</div><div>X-Auth-Token: AUTH_tk03eebc77f9d4432cbc223f08f4b24cf5</div><div><br></div><div>HTTP/1.1 200 OK</div><div>X-Account-Object-Count: 0</div><div>X-Account-Bytes-Used: 0</div><div>X-Account-Container-Count: 1</div><div>Accept-Ranges: bytes</div><div>Content-Length: 8</div><div>Content-Type: text/plain; charset=utf-8</div><div>X-Trans-Id: tx7d2415d0e2dd4bd8ba8adaadb8d3deef</div><div>Date: Wed, 09 Nov 2011 14:46:20 GMT</div><div>Connection: close</div><div><br></div><div>test900</div><div>Connection closed by foreign host.</div></div><div>================================</div><div><br></div><div>Also the Bexar docs are pretty old, if you are using 1.4.X check out <a href="http://docs.openstack.org/diablo/openstack-object-storage/admin/content/">http://docs.openstack.org/diablo/openstack-object-storage/admin/content/</a></div><div><br></div><div><br></div><div><br></div><div><br></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Marcelo Martins</div><div>Openstack-swift</div><div><a href="mailto:btorch-os@zeroaccess.org">btorch-os@zeroaccess.org</a></div><div><br></div><div><div>“Knowledge is the wings on which our aspirations take flight and soar. When it comes to surfing and life if you know what to do you can do it. If you desire anything become educated about it and succeed. “</div></div><div><br></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br><div><div>On Nov 9, 2011, at 6:13 AM, Salman Zubair Toor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, <div><br></div><div>I am trying to get the object from Swift store using GET request header but facing some problem, </div><div><br></div><div>I read from the following document </div><div><br></div><div><a href="http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html">http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html</a></div><div><br></div><div>That the header should look like this </div><div><br></div><div><pre class="literallayout"><a id="d5e627">GET /<api version>/<account>/<container>/<object> HTTP/1.1
Host: storage.swiftdrive.com
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
</a></pre><div><br></div><div>I did the same and make my GET request something like this</div><div> </div><div>----------------------------------------------------------------------------------</div><div><div>GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: <a href="http://swift.uppmax.se/">swift.uppmax.se</a></div><div>Authorization: AWS system:root:VTbBHyLrCdLnxClvd1bVFZcLpy8=</div><div><br></div><div>----------------------------------------------------------------------------------</div><div><br></div><div>Not that the last line is empty right after the Authentication. But it just hangs. no answer form the server. I try to change the header to get it working but no success :-( . <b>Try-4 is interesting</b>. </div><div><br></div><div>Following are my tries.. </div><div><br></div><div>Try -1</div><div><br></div><div>----------------------------------------------------------------------------------</div><div><div>GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: <a href="http://swift.uppmax.se/">swift.uppmax.se</a></div><div>Authorization: AWS system:root:yR7OHVFGgsZ4xHJp7RKHv9CuNtY=</div><div><br></div><div><br></div></div><div>----------------------------------------------------------------------------------</div><div>Now two empty line in the end. and I got the following response. </div><div><br></div><div><div>HTTP/1.1 403 Forbidden</div><div>Content-Type: text/xml; charset=UTF-8</div><div>Content-Length: 124</div><div>Date: Wed, 09 Nov 2011 11:47:47 GMT</div><div><br></div></div><div><br></div><div>Try-2 </div><div><br></div><div>----------------------------------------------------------------------------------</div><div><div>GET /v1.0/root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: swift.<a href="http://uppmax.se/">uppmax.se</a></div><div>Authorization: AWS system:root:R9She9vkYVXQszVMfDqaeTNtUhQ=</div><div><br></div></div><div>----------------------------------------------------------------------------------</div><div>change account from system:root to root (I don't know why but just want to try) .... </div><div><br></div><div><div>HTTP/1.1 403 Forbidden</div><div>Content-Type: text/xml; charset=UTF-8</div><div>Content-Length: 124</div><div>Date: Wed, 09 Nov 2011 11:47:47 GMT</div><div><br></div><div><br></div><div>Try-3 </div><div><br></div><div><div>----------------------------------------------------------------------------------</div><div>GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: swift.<a href="http://uppmax.se/">uppmax.se</a></div><div>Date: Wed, 09 Nov 2011 12:03:06 GMT</div><div>Range: bytes=0-3</div><div>Authorization: AWS system:root:pHhOqVriW4zNmBW9MO1a7rNhHjI=</div><div><br></div><div><br></div><div>----------------------------------------------------------------------------------</div><div><br></div><div><div>HTTP/1.1 403 Forbidden</div><div>Content-Type: text/xml; charset=UTF-8</div><div>Content-Length: 124</div><div>Date: Wed, 09 Nov 2011 11:47:47 GMT</div></div></div></div></div></div><div><br></div><div><br></div><div>Try-4</div><div><br></div><div>----------------------------------------------------------------------------------</div><div><div>GET /rootContainer/eventdata.root HTTP/1.1 </div><div>Host: swift.<a href="http://uppmax.se/">uppmax.se</a></div><div>Date: Wed, 09 Nov 2011 12:04:57 GMT</div><div>Range: bytes=0-3</div><div>Authorization: AWS system:root:oQX68HKwnH1OnBJhTmHGz3cm4b4=</div><div><br></div><div><br></div></div><div>----------------------------------------------------------------------------------</div><div>I have removed the <b>version and the account details</b> and then at least the request message get changed. No more forbidden response. But now its "206 Partial Content" and after getting the headers the read bytes are 0. </div><div><br></div><div><br></div><div><div>HTTP/1.1 206 Partial Content</div><div>n: 44</div><div>line: Last-Modified: Tue, 01 Nov 2011 16:13:21 GMT</div><div>n: 17</div><div>line: Content-Length: 4</div><div>n: 38</div><div>line: Etag: f3e0c75e57766c5581a6978e2b70698f</div><div>n: 38</div><div>line: Content-Type: application/octet-stream</div><div>n: 35</div><div>line: Date: Wed, 09 Nov 2011 12:01:30 GMT</div><div>n: 0</div><div>line: </div><div>n: 4</div><div>line: root</div><div>n: 0</div><div>line: </div><div><br></div><div>Then I send only HEAD request without version and account and that runs successfully</div><div><br></div><div>------------------------------------------------------------------------------------------</div><div><div>HEAD /rootContainer/eventdata.root HTTP/1.1</div><div>Host: <a href="http://swift.uppmax.se/">swift.uppmax.se</a></div><div>Date: Wed, 09 Nov 2011 12:14:11 GMT</div><div>Authorization: AWS system:root:dAWDu4I8SJyY02HEIirYejDWn2w=</div><div><br></div><div><br></div></div><div>------------------------------------------------------------------------------------------</div><div><br></div><div><div>gDebug Header: HTTP/1.1 200 OK</div><div>gDebug Header: Last-Modified: Tue, 01 Nov 2011 16:13:21 GMT</div><div>gDebug Header: Content-Length: 13</div><div>gDebug Header: Etag: f3e0c75e57766c5581a6978e2b70698f</div><div>gDebug Header: Content-Type: text/plain</div><div>gDebug Header: Date: Wed, 09 Nov 2011 12:10:45 GMT</div><div><br></div></div><div><br></div><div><br></div></div><div>If I use command line tool everything is working fine. Can someone please point out what is wrong or how should I modify things. </div><div><br></div><div>Thanks. </div><div><br></div><div><br><div>
<div>Salman Zubair Toor</div><div>Ph.Lic. Scientific Computing</div><div>Ph.D candidate</div><div>Division of Scientific Computing </div><div>Uppsala University, Sweden </div><div><a href="mailto:salman.toor@it.uu.se">salman.toor@it.uu.se</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></div>_______________________________________________<br>Openstack-operators mailing list<br><a href="mailto:Openstack-operators@lists.openstack.org">Openstack-operators@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br></blockquote></div><br></div></blockquote></div><br><div>
<div>Salman Zubair Toor</div><div>Ph.Lic. Scientific Computing</div><div>Ph.D candidate</div><div>Division of Scientific Computing </div><div>Uppsala University, Sweden </div><div><a href="mailto:salman.toor@it.uu.se">salman.toor@it.uu.se</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></div></div></blockquote></div><br><div>
<div>Salman Zubair Toor</div><div>Ph.Lic. Scientific Computing</div><div>Ph.D candidate</div><div>Division of Scientific Computing </div><div>Uppsala University, Sweden </div><div><a href="mailto:salman.toor@it.uu.se">salman.toor@it.uu.se</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></body></html>