Skip to content

Instantly share code, notes, and snippets.

@nathancolgate
Last active September 26, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathancolgate/e9295dccb499b0161c7a to your computer and use it in GitHub Desktop.
Save nathancolgate/e9295dccb499b0161c7a to your computer and use it in GitHub Desktop.
How to Set your Rackspace Temp URL Key (X-Account-Meta-Temp-Url-Key) from the command line
# General Reading: https://developer.rackspace.com/docs/cloud-files/v1/developer-guide/#document-public-access-to-your-cloud-files-account/tempurl
$ curl -v -H "X-Auth-User: <your_rackspace_username>" -H "X-Auth-Key: <your_rackspace_api_key>" https://auth.api.rackspacecloud.com/v1.0
* About to connect() to auth.api.rackspacecloud.com port 443 (#0)
* Trying 67.192.1.11... connected
* Connected to auth.api.rackspacecloud.com (67.192.1.11) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using RC4-SHA
* Server certificate:
* subject: C=US; O=auth.api.rackspacecloud.com; OU=GT47404894; OU=See www.geotrust.com/resources/cps (c)09; OU=Domain Control Validated - QuickSSL(R); CN=auth.api.rackspacecloud.com
* start date: 2009-07-10 11:34:54 GMT
* expire date: 2014-07-11 02:57:59 GMT
* common name: auth.api.rackspacecloud.com (matched)
* issuer: C=US; O=Equifax; OU=Equifax Secure Certificate Authority
* SSL certificate verify ok.
> GET /v1.0 HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: auth.api.rackspacecloud.com
> Accept: */*
> X-Auth-User: <your_rackspace_username>
> X-Auth-Key: <your_rackspace_api_key>
>
< HTTP/1.1 204 No Content
< Server: Apache/2.2.3 (Red Hat)
< vary: X-Auth-User,X-Auth-Key,X-Storage-User,X-Storage-Pass
< X-Storage-Url: <your_x_storage_url_with_the_correct_region_in_the_subdomain>
< Cache-Control: s-maxage=84787
< Content-Type: text/xml
< Date: Wed, 02 Jan 2013 19:05:23 GMT
< X-Auth-Token: <your_x_auth_token>
< X-Server-Management-Url: <your_x_server_management_url>
< X-Storage-Token: <your_x_storage_token>
< Connection: Keep-Alive
< X-CDN-Management-Url: <your_x_cdn_management_url>
< Content-Length: 0
<
* Connection #0 to host auth.api.rackspacecloud.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
$ curl -X POST -H "X-Auth-Token: <your_x_auth_token>" -H "X-Account-Meta-Temp-Url-Key: <your_rackspace_temp_url_key>" -I <your_x_storage_url_with_the_correct_region_in_the_subdomain>
# Any 2xx response indicates success.
# Jan 2016 - Done banging my head against the wall
# The X-Storage-Url that is provided may look like this: https://storage101.iad3.clouddrive.com/v1/MossoCloudFS_9
# But if your containers are in another region,
# You MUST change the subdomain to match: https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_9
# See https://developer.rackspace.com/docs/cloud-files/v1/developer-guide/#service-access-endpoints
# Confirming the change
$ curl -i -X GET <your_x_storage_url_with_the_correct_region_in_the_subdomain> -H "X-Auth-Token: <your_x_auth_token>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment