Dell DX6004S DX Object Storage Application Guide - Page 62

Updating a Realm Using PUT

Page 62 highlights

curl -I --anyauth -u "fred.bell:fred" --location-trusted "http://172.16.0.35/_administrators" -D get-mgr-realm.log The Castor-Authorization header in this example is: Castor-Authorization: cluster.example.com/_administrators The Castor-Authorization header indicates your cluster manager gave the domain manager realm complete control over the realm. The domain manager realm is associated with the cluster's _administrators bucket. 3. APPEND the user list to the realm using the following command: curl -X APPEND --data-binary @cluster_example_com_administrators -anyauth -u "fred.bell:fred" --location-trusted "http://172.16.0.35/ _administrators" --post301 -D domain-mgr-realm.log 4. GET the updated user list. curl --anyauth -u "larry.green:larry" --location-trusted "http://172.16.0.35/_administrators" -D get-mgr-realm2.log The domain realm displays: fred.bell:cluster.example.com/ _administrators:88582109557482d06f848e0547cad4e8 jeannie.clark:cluster.example.com/ _administrators:2ca704efc81815306542605e581e9145 larry.green:cluster.example.com/ _administrators:43f8a5b20226bbecccd059e484309468 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. 14.3.3. Updating a Realm Using PUT To replace a user list with another user list, you must use PUT instead of APPEND. However, because PUT also replaces headers (in particular the Castor-Authorization header), you must use PUT with caution. Improper use of PUT can prevent users from authenticating. To use PUT, first use a HEAD request to get the current Castor-Authorization header on the object and then pass the same header in with the PUT command. To update a realm using PUT: 1. Use the following commands to create a new domain realm: htdigest -c cluster_example_com cluster.example.com john.rogers htdigest cluster_example_com cluster.example.com jane.lalane 2. Dell strongly recommends you HEAD the domain to get the Castor-Authorization header for the domain as follows: curl -I --anyauth -u "larry.green:larry" --location-trusted "http://172.16.0.35?domain=cluster.example.com" -D get-domain-realm3.log Copyright © 2010 Caringo, Inc. All rights reserved 57 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
57
Version 5.0
December 2010
curl -I --anyauth -u "fred.bell:fred" --location-trusted
The
Castor-Authorization
header in this example is:
Castor-Authorization: cluster.example.com/_administrators
The
Castor-Authorization
header indicates your cluster manager gave the domain manager
realm complete control over the realm. The domain manager realm is associated with the
cluster's
_administrators
bucket.
3. APPEND the user list to the realm using the following command:
curl -X APPEND --data-binary @cluster_example_com_administrators --
anyauth -u "fred.bell:fred" --location-trusted "http://172.16.0.35/
_administrators" --post301 -D domain-mgr-realm.log
4. GET the updated user list.
curl --anyauth -u "larry.green:larry" --location-trusted
The domain realm displays:
fred.bell:cluster.example.com/
_administrators:88582109557482d06f848e0547cad4e8
jeannie.clark:cluster.example.com/
_administrators:2ca704efc81815306542605e581e9145
larry.green:cluster.example.com/
_administrators:43f8a5b20226bbecccd059e484309468
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.
14.3.3. Updating a Realm Using PUT
To replace a user list with another user list, you must use PUT instead of APPEND. However,
because PUT also replaces headers (in particular the
Castor-Authorization
header), you must
use PUT with caution. Improper use of PUT can prevent users from authenticating.
To use PUT, first use a HEAD request to get the current
Castor-Authorization
header on the
object and then pass the same header in with the PUT command.
To update a realm using PUT:
1. Use the following commands to create a new domain realm:
htdigest -c cluster_example_com cluster.example.com john.rogers
htdigest cluster_example_com cluster.example.com jane.lalane
2. Dell strongly recommends you HEAD the domain to get the
Castor-Authorization
header
for the domain as follows:
curl -I --anyauth -u "larry.green:larry" --location-trusted