Re: Ceph cluster access using s3 api with curl

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

 



Hi Tim,

Try the following:

curl -D - -H "X-Auth-User: rados:swift" -H "X-Auth-Key: 123" http://10.113.193.189/auth

You should then see X-Storage-Url, X-Storage-Token, and X-Auth-Token in the returned headers.

Regards,
Matt


On Wed, Oct 16, 2013 at 10:05 PM, Snider, Tim <Tim.Snider@xxxxxxxxxx> wrote:
Rookie question: What's the curl command / URL / steps to get an authentication token from the cluster without using the swift debug command first.
Using the swift_key values should work but I haven't found the right combination /url.
Here's what I've done:
1: Get user info from ceph cluster:
        # radosgw-admin user info --uid rados
        2013-10-16 13:29:42.956578 7f166aeef780  0 WARNING: cannot read region map
        { "user_id": "rados",
          "display_name": "rados",
          "email": "none@xxxxxxxx",
          "suspended": 0,
          "max_buckets": 1000,
          "auid": 0,
          "subusers": [],
          "keys": [
                { "user": "rados",
                  "access_key": "V92UJ5F24DF2CDGQINTK",
                  "secret_key": "uzWaCMQnZ8uxyR3zte2Dthxbca\/H4qsm3p0QI29f"}],
          "swift_keys": [
                { "user": "rados:swift",
                  "secret_key": "123"}],
          "caps": [],
          "op_mask": "read, write, delete",
          "default_placement": "",
          "placement_tags": []}

2:  Jump thru the (unnecessary) Swift deubg hoop. Debug truncated the http command that holds the key:
        # swift --verbose --debug -V 1.0 -A http://10.113.193.189/auth -U rados:swift  -K 123 list
        DEBUG:swiftclient:REQ: curl -i http://10.113.193.189/auth -X GET

        DEBUG:swiftclient:RESP STATUS: 204

        DEBUG:swiftclient:REQ: curl -i http://10.113.193.189/swift/v1?format=json -X GET -H "X-Auth-Token: AUTH_rgwtk0b0000007261646f733a73776966740ddca424fed74e69be4860524846912b0f99a7531ecda91ae47684ebd6b69e40f1dc6b45"

        DEBUG:swiftclient:RESP STATUS: 200

        DEBUG:swiftclient:RESP BODY: []

3: I should be able to pass user and password values from the user info command. I haven't found the correct url or path to use.  This command (and variations : auth/v1.0 ...) fails. Is the directory structure / URL to get an authentication token documented somewhere?
        # curl -i http://10.113.193.189/auth -X GET -H 'X-Storage-User: rados:swift' -H 'X-Storage-Pass: 123'
        HTTP/1.1 403 Forbidden
        Date: Wed, 16 Oct 2013 20:33:31 GMT
        Server: Apache/2.2.22 (Ubuntu)
        Accept-Ranges: bytes
        Content-Length: 23
        Content-Type: application/json

        {"Code":"AccessDenied"}

Thanks,
Tim
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
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