Hi Yehuda,

I have used the method in this blog to pass the header information
http://blog.defunct.ca/2013/10/10/using-the-radosgw-admin-api/ and gave like

Authorization: AWS {access-key}:{hash-of-header-
and-secret}

and the complete command like

curl -i 'http://gateway.3linux.com/admin/usage?format=json' -X GET -H
'Authorization: AWS KGXJJGKDM5G7G4CNKC7R:
LC7S0twZdhtXA1XxthfMDsj5TgJpeKhZrloWa9WN' -H 'Host: gateway.3linux.com' -H
'Content-Length: 0'

After running the above command execution getting an access denied error
message. Is there any issues in the above header information ? or could you
please explain how we can authenticate using access keys and access tokens
? or how we can pass the header information ?


On Sat, Apr 19, 2014 at 1:05 PM, Punit Dambiwal <hypu...@gmail.com> wrote:

> Hi Yehuda,
>
> I have used the method in this blog to pass the header information
> http://blog.defunct.ca/2013/10/10/using-the-radosgw-admin-api/ and gave
> like
>
> Authorization: AWS {access-key}:{hash-of-header-
> and-secret}
>
> and the complete command like
>
> curl -i 'http://s3.linux.com/admin/usage?format=json' -X GET -H
> 'Authorization: AWS
> KGXJJGKDM5G7G4CNKC7R:LC7S0twZdhtXA1XxthfMDsj5TgJpeKhZrloWa9WN' -H 'Host:
> gateway.3linux.com' -H 'Content-Length: 0'
>
> After running the above command execution getting an access denied error
> message. Is there any issues in the above header information ? or could you
> please explain how we can authenticate using access keys and access tokens
> ? or how we can pass the header information ?
>
>
> On Thu, Apr 17, 2014 at 12:10 AM, Yehuda Sadeh <yeh...@inktank.com> wrote:
>
>> 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