Powerful list, please help!
I have spent hours on figuring out why server always responds with 403 for the
following request:
GET /{admin}/usage?format=json HTTP/1.1
Host: {fqdn}
s3Key=someKey
s3Secret=someSecret
dateValue=`TZ=GMT date +"%a, %d %b %Y %T"`
dateValue="$dateValue GMT"
host=http://192.168.57.101
if [ "$1" = "--get-usage" ]; then
resource="/admin/usage?format=json"
stringToSign="GET\n\n\n${dateValue}\n${resource}"
signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary |
base64`
curl -L -v --post301 --post302 -i -X GET \
-H "Date: ${dateValue}" \
-H "Authorization: AWS ${s3Key}:${signature}" \
${host}${resource}
fi
I have found some help examples:
The official:
https://github.com/ceph/ceph/blob/master/src/test/test_rgw_admin_log.cc
The community starred:
https://github.com/dyarnell/rgwadmin/blob/master/rgwadmin/rgw.py
And i made my authentication just like theirs, with the language only
difference (I think).
Thanks!
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com