Re: Shell / curl test script for rgw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux