Hi, I'm trying to use the Curl for rados admin ops requests.
I have problems with the keys, you use this autorizacción Authorization: AWS
{access-key}: {hash-of-header-and-secret}.
Where I can get the hash-of-header-and-secret?
Info of user:
radosgw-admin user info --uid=usuario1
{
"user_id": "usuario1",
"display_name": "usuario1",
"email": "",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{
"user": "usuario1",
"access_key": "claveacceso",
"secret_key": "temporal"
}
],
"swift_keys": [],
"caps": [
{
"type": "usage",
"perm": "write"
},
{
"type": "user",
"perm": "write"
}
],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"temp_url_keys": []
}
I made this scrip :
#!/bin/bash
token="claveacceso"
secret="temporal"
query=$1
date=`date -Ru`
header="PUT\n${content_md5}\n${content_type}\n${date}\n${query}"
sig=`echo -en ${header} | openssl sha1 -hmac ${secret} -binary | base64`
curl -i -X GET "http://10.0.2.10/admin/usage?format=json" -H "Date: ${date}" \
-H "Authorization: AWS ${token}:${sig}" -H 'Host: adminnode'
The result is:
sh prueba3.sh
HTTP/1.1 403 Forbidden
Date: Fri, 03 Jul 2015 11:41:17 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips
Accept-Ranges: bytes
Content-Length: 32
Content-Type: application/json
Version of ceph is: ceph version 0.94.2
(5fb85614ca8f354284c713a2f9c610860720bbf3)
Version CentOS Linux release 7.1.1503 (Core)
could give me documentation of how to use them?
Thanks, Oscar.
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com