Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

ECS 3.6.2 Data Access Guide

PDF

OpenStack Version 1 authentication

You can authenticate with the ECS OpenStack Swift service using V1 of the authentication protocol.

  1. Acquire a UID and password for an ECS object user.

    You can do this from the ECS Portal (see Create Swift users in the ECS Portal) or you can call the following ECS REST API to generate a password.

    Request:
    PUT /object/user-password/myUser@emc.com
        <user_password_create>
        <password>myPassword</password>
        <namespace>EMC_NAMESPACE</namespace>
        </user_password_create>
    Response:
    HTTP 200
  2. Call the OpenStack authentication REST API shown below. Use port 9024 for HTTP, or port 9025 for HTTPS.
    Request:
    GET /auth/v1.0
      X-Auth-User: myUser@emc.com
      X-Auth-Key: myPassword
    Response:
    HTTP/1.1 
       204 No
       Content
       Date: Mon, 12 Nov 2010 15:32:21 GMT
       Server: Apache
    
       X-Storage-Url: https://{hostname}/v1/account
       X-Auth-Token: ECS_e6384f8ffcd849fd95d986a0492ea9a6
       Content-Length: 0
If the UID and password are validated by ECS, the storage URL and token are returned in the response header. Further requests are authenticated by including this token. The storage URL provides the host name and resource address. You can access containers and objects by providing the following X-Storage-Url header:
X-Storage-Url: https://{hostname}/v1/{account}/{container}/{object}

The generated token expires 24 hours after creation. If you repeat the authentication request within the 24 hour period using the same UID and password, OpenStack will return the same token. Once the 24 hour expiration period expires, OpenStack will return a new token.

In the following simple authentication example, the first REST call returns an X-Auth-Token. The second REST call uses that X-Auth-Token to perform a GET request on an account.
$ curl -i -H "X-Storage-User: tim_250@sanity.local" -H "X-Storage-Pass: 1fO9X3xyrVhfcokqy3U1UyTY029gha5T+k+vjLqS" 
                                                                           http://ecs.yourco.com:9024/auth/v1.0
 HTTP/1.1 204 No Content
    X-Storage-Url: http://ecs.yourco.com:9024/v1/s3
    X-Auth-Token: ECS_8cf4a4e943f94711aad1c91a08e98435
    Server: Jetty(7.6.4.v20120524)
$ curl -v -X GET -s -H "X-Auth-Token: 8cf4a4e943f94711aad1c91a08e98435" 
                                                      http://ecs.yourco.com:9024/v1/s3
* About to connect() to ecs.yourco.com port 9024 (#0)
    * Trying 203.0.113.10...
    * Adding handle: conn: 0x7f9218808c00
    * Adding handle: send: 0
    * Adding handle: recv: 0
    * Curl_addHandleToPipeline: length: 1
    * - Conn 0 (0x7f9218808c00) send_pipe: 1, recv_pipe: 0
    * Connected to ecs.yourco.com (203.0.113.10) port 9024 (#0)

    > GET /v1/s3 HTTP/1.1
    > User-Agent: curl/7.31.0
    > Host: ecs.yourco.com:9024
    > Accept: */*
    > X-Auth-Token: 8cf4a4e943f94711aad1c91a08e98435
    >
    < HTTP/1.1 204 No Content
    < Date: Mon, 16 Sep 2013 19:31:45 GMT
    < Content-Type: text/plain
    * Server Jetty(7.6.4.v20120524) is not blacklisted
    < Server: Jetty(7.6.4.v20120524)
    <

    * Connection #0 to host ecs.yourco.com left intact

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\