On Tue, Apr 15, 2014 at 11:33 PM, Punit Dambiwal <hypu...@gmail.com> wrote:
> Hi,
>
> Still i am getting the same error,when i run the following :-
>
> ----------------------
> curl -i 'http://xxx.xlinux.com/admin/usage?format=json' -X GET -H
> 'Authorization: AWS
> YHFQ4D8BM835BCGERHTN:kXpM0XB9UjOadexDu2ZoP8s4nKjuoL0iIZhE\/+Gv' -H 'Host:


Where did you come up with this authorization field? You need to sign
the message appropriately.

Yehuda

> xxx.xlinux.com' -H 'Content-Length: 0'
> HTTP/1.1 403 Forbidden
> Date: Wed, 16 Apr 2014 06:26:45 GMT
>
> Server: Apache/2.2.22 (Ubuntu)
> Accept-Ranges: bytes
> Content-Length: 23
> Content-Type: application/json
>
> {"Code":"AccessDenied"}
> -------------------
>
> Can any body help me to resolve this issue..
>
> Thanks,
> punit
>
>
> On Mon, Apr 14, 2014 at 11:55 AM, Punit Dambiwal <hypu...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am trying to list out all users using the Ceph S3 api and php. These are
>> the lines of code which i used for
>>
>>
>>
>>
>> --------------------------------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> $url = "http://XXXX.Xlinux.com/admin/user?format=json";;
>>
>> $ch = curl_init ($url);
>>
>> curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch,
>> CURLOPT_USERPWD,
>> "P8K3750Z3PP5MGUKQYBL:CB+Ioydr1XsmQF\/gQmE\/X3YsDjtDbxLZzByaU9t\/");
>>
>> curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: AWS
>> P8K3750Z3PP5MGUKQYBL:CB+Ioydr1XsmQF\/gQmE\/X3YsDjtDbxLZzByaU9t\/"));
>>
>> curl_setopt($ch, CURLOPT_HEADER, 0);
>>
>> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,
>> CURLOPT_BINARYTRANSFER,1); $response = curl_exec($ch); $output =
>> json_encode($response);
>>
>>
>>
>>     print_r($output);
>>
>>
>>
>>
>> --------------------------------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> I am getting an error: access denied as output. Could you please check it
>> ?
>>
>>
>>
>> I have also tried the same using the curl command like
>>
>>
>>
>> curl -i 'http://XXX.Xlinux.com/admin/usage?format=json' -X GET -H
>>
>> 'Authorization: AWS
>>
>> P8K3750Z3PP5MGUKQYBL:CB+Ioydr1XsmQF\/gQmE\/X3YsDjtDbxLZzByaU9t\/' -H
>>
>> 'Host: XXX.Xlinux.com' -H 'Content-Length: 0'
>>
>>
>>
>> HTTP/1.1 403 Forbidden
>>
>> Date: Fri, 11 Apr 2014 10:08:20 GMT
>>
>> Server: Apache/2.2.22 (Ubuntu)
>>
>> Accept-Ranges: bytes
>>
>> Content-Length: 23
>>
>> Content-Type: application/json
>>
>>
>>
>> {"Code":"AccessDenied"}
>>
>>
>>
>> Can any body let me know if anything wrong in the above... ??
>>
>>
>>
>>
>>
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to