Dell DX6004S DX Object Storage Application Guide - Page 56
Example: Creating Bucket Owners, 4. Examples of Creating Buckets and Named Objects
View all Dell DX6004S manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 56 highlights
An example of creating a bucket and uploading a realm follows: curl -H "Castor-Authorization: authorization-specification/bucket-name" -H "Castor-Stream-Type: admin" --data-binary @realm --anyauth -u "authorizeduser-name:password" --post301 --location-trusted http://node-ip/bucketname [-D log-file-name] An example of getting the authorization list for a bucket follows: curl --anyauth -u "authorized-user-name: password" --location-trusted node-ip/bucket-name [-D log-file-name] 13.3. Example: Creating Bucket Owners The following example creates cluster.example.com/mybucket and enables users in that realm to create named objects in mybucket. Other users in cluster.example.com can perform all other operations in mybucket (such as COPY, APPEND, DELETE, and so on). In the example, cluster.example.com is the default cluster domain so you do not have to explicitly send it as the Host in the request. curl -X POST -H "Castor-Authorization: post=cluster.example.com/mybucket" -H "Castor-Stream-Type: admin" --data-binary @cluster_domain_com_mybucket --anyauth -u "authorized-user-name:password" --location-trusted http:// cluster.example.com/mybucket --post301 -D mybucketrealm.log To update the user list later, use APPEND, which is does not replace an existing user list. PUT replaces the user list, which might disable other users' access to the bucket. If you use APPEND to update a user list, you do not need to set the Castor-Authorization header. 13.4. Examples of Creating Buckets and Named Objects The following examples assume you have privileges to create a bucket named mybucket and to create objects in mybucket. Security assumptions: • Your cluster administrator created one domain named cluster.example.com, which is the default cluster domain. Therefore, you do not need to specify a domain name as the Host in any commands. • Your domain manager created two users named john.rogers and jane.lalane, and the users' passwords are the same as the users' first names. These users can create buckets in cluster.example.com. • You can create your own buckets and set security on your buckets, if desired. • You can set security for named objects you are authorized to create. Other assumptions: • You execute all commands using curl. • You send your commands to a node whose IP address is 172.16.0.35. Copyright © 2010 Caringo, Inc. All rights reserved 51 Version 5.0 December 2010