Dell DX6004S DX Object Storage Application Guide - Page 57

CAStor Error

Page 57 highlights

1. Use the following commands to create the /mybucket realm: htdigest -c cluster_example_com_mybucket cluster.example.com/mybucket john.rogers htdigest cluster_example_com_mybucket cluster.example.com/mybucket jane.lalane 2. Create mybucket with its own authorization list. Restrict the ability to create objects to user john.rogers and allow any user in the realm to change the bucket. curl -i -X POST -H "Castor-Authorization: post=owner@, change=@owner" -H "Castor-Stream-Type: admin" --data-binary @cluster_example_com_mybucket --anyauth -u "john.rogers:john" --post301 --location-trusted http://172.16.0.35/mybucket -D bucket.log A CAStor Error might indicate that the preceding command has not been updated from the content cache. Try the command again. If errors persist, verify your command syntax. Remember that you cannot prepend or append anything to owner@ or @owner. 3. Verify the command completed successfully. curl --anyauth -u "john.rogers:john" --location-trusted http://172.16.0.35/mybucket -D get.log The user list displays. john.rogers:cluster.example.com/ mybucket:899524c39111f8118d9ee52e3f3ffaf9 jane.lalane:cluster.example.com/ mybucket:97a14750c583b02c0cbd47e9fb25d810 If an error displays, repeat the preceding command and make sure you did not specify a different domain name on the command line. In other words, verify you created the bucket in the cluster.example.com domain. 4. Create a named object in mybucket. curl -X POST -i -d "Hello world" -H "Castor-Authorization: change=owner@" -H "Castor-Stream-Type: admin" -H "Content-type: text/html" --anyauth -u "john.rogers:john" --location-trusted http://172.16.0.35/mybucket/file.html --post301 -D write.log 5. Verify the object in a web browser. Start a web browser and enter the following URL in its location or address field: http://172.16.0.35/mybucket/file.html Hello World displays. 6. Create another object in mybucket with a different authorization specification. curl -X POST -i -d "Hello world" -H "Castor-Authorization: change=cluster.example.com/mybucket, view=cluster.example.com" -H "Castor-Stream-Type: admin" -H "Content-type: text/html" --anyauth - Copyright © 2010 Caringo, Inc. All rights reserved 52 Version 5.0 December 2010

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81

Copyright © 2010 Caringo, Inc.
All rights reserved
52
Version 5.0
December 2010
1. Use the following commands to create the
/mybucket
realm:
htdigest -c cluster_example_com_mybucket cluster.example.com/mybucket
john.rogers
htdigest cluster_example_com_mybucket cluster.example.com/mybucket
jane.lalane
2. Create
mybucket
with its own authorization list. Restrict the ability to create objects to user
john.rogers
and allow any user in the realm to
change
the bucket.
curl -i -X POST -H "Castor-Authorization: post=owner@, change=@owner" -H
"Castor-Stream-Type: admin" --data-binary @cluster_example_com_mybucket
--anyauth -u "john.rogers:john" --post301 --location-trusted
A
CAStor Error
might indicate that the preceding command has not been updated from the
content cache. Try the command again. If errors persist, verify your command syntax.
Remember that you cannot prepend or append anything to
owner@
or
@owner
.
3. Verify the command completed successfully.
curl --anyauth -u "john.rogers:john" --location-trusted
The user list displays.
john.rogers:cluster.example.com/
mybucket:899524c39111f8118d9ee52e3f3ffaf9
jane.lalane:cluster.example.com/
mybucket:97a14750c583b02c0cbd47e9fb25d810
If an error displays, repeat the preceding command and make sure you did not specify a
different domain name on the command line. In other words, verify you created the bucket in the
cluster.example.com
domain.
4. Create a named object in
mybucket
.
curl -X POST -i -d "<h1>Hello world</h1>" -H "Castor-Authorization:
change=owner@" -H "Castor-Stream-Type: admin" -H "Content-type:
text/html" --anyauth -u "john.rogers:john" --location-trusted
5. Verify the object in a web browser.
Start a web browser and enter the following URL in its location or address field:
Hello World
displays.
6. Create another object in mybucket with a different authorization specification.
curl -X POST -i -d "<h1>Hello world</h1>" -H "Castor-Authorization:
change=cluster.example.com/mybucket, view=cluster.example.com" -H
"Castor-Stream-Type: admin" -H "Content-type: text/html" --anyauth -