Shell / curl test script for rgw

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

 



I am testing the ldap auth with rgw. But is there a simple shell script 
that I can use to test with? I have problems with the signature in this 
one

#!/bin/bash
#

file=1MB.bin
bucket=test
s3Key="TEST"
s3Secret="test"

host="192.168.1.14"
resource="/${bucket}/${file}"

contentType="application/x-compressed-tar"
dateValue=`date +'%a, %d %b %Y %H:%M:%S %z'`
dateValue=`date -R -u`

stringToSign="GET

${contentType}
${dateValue}
${resource}"

string="GET\n\n${content_type}\n${dateValue}\n${resource}"

signature=`/bin/echo -en "$stringToSign" | openssl sha1 -hmac 
${s3Secret} -binary | base64`

curl -X GET -H "Host: ${bucket}.${host}" \
  -H "Date: ${dateValue}" \
  -H "Content-Type: ${contentType}" \
  -H "Authorization: AWS ${s3Key}:${signature}" \
  https://${host}:7480/${resource} \
  --insecure


_______________________________________________
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