Dell DX6004S DX Object Storage Application Guide - Page 62
Updating a Realm Using PUT
View all Dell DX6004S manuals
Add to My Manuals
Save this manual to your list of manuals |
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