Hi Mark

But is there a simple shell script
that I can use to test with? I have problems with the signature in this
one


This is 100% working test admin api (uid should have caps="buckets=read").


#!/bin/bash
s3_access_key=""
s3_secret_key=""
s3_host="objects-us-west-1.dream.io"
query="admin/bucket"
method="GET"
date=$(for i in $(date -u "+%H") ; do date "+%a, %d %b %Y $(( 10#$i )):%M:%S +0000" ; done)
header="${method}\n\n\n${date}\n/${query}"
sig=$(echo -en ${header} | openssl sha1 -hmac ${s3_secret_key} -binary | base64)

curl -s -H "Date: ${date}" \
-H "Authorization: AWS ${s3_access_key}:${sig}" \
-H "Host: ${s3_host}" \
-X ${method} \
"https://${s3_host}/${query}?format=json&stats=True";




k
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to