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 2 authentication

ECS includes limited support for OpenStack Version 2 (Keystone) authentication.

ECS provides an implementation of the OpenStack Swift V2 identity service which enables a Swift application that uses V2 authentication to authenticate users. Users must be ECS object users who have been assigned OpenStack Swift credentials which enable them to access the ECS object store using the Swift protocol.

Only tokens that are scoped to an ECS namespace (equivalent to a Swift project) can be used to make Swift API calls. An unscoped token can be obtained and used to access the identity service in order to retrieve the tenant identity before obtaining a token scoped to a tenant and a service endpoint.

The scoped token and service endpoint can be used to authenticate with ECS as described in the previous section describing V1 authentication.

The two articles listed below provide important background information.

  1. To obtain an unscoped token from ECS you can use the /v2.0/tokens API and supply a username and password for the ECS Swift service.
    curl -v -X POST -H 'ACCEPT: application/json' -H "Content-Type: application/json" -d '{"auth": 
    {"passwordCredentials" : {"username" : "swift_user", "password" : "123"}}}' http://203.0.113.10:9024/v2.0/tokens 
    		  
    The response looks like the following. The unscoped token is preceded by id and tokens generated by ECS are preceded by the "ecs_" prefix.
    {"access": {"token": {"id":"ecs_d668b72a011c4edf960324ab2e87438b","expires":"1376633127950"l},"user": 
                     {"name": "sysadmin", "roles":[ ], "role_links":[ ] },"serviceCatalog":[ ] }} , } 
    		  
  2. Retrieve tenant information associated with the unscoped token.
    curl -v http://203.0.113.10:9024/v2.0/tenants -H 'X-Auth-Token: d668b72a011c4edf960324ab2e87438b' 
    		  
    The response looks like the following.
    {"tenants_links":[], "tenants":[{"description":"s3","enabled":true, "name": "s3"}]}
     
    		  
  3. Retrieve the scoped token along with the storageUrl.
    curl -v -X POST -H 'ACCEPT: application/json' -H "Content-Type: application/json" -d '{"auth": {"tenantName" : "s3", 
                              "token":{"id" : ecs_d668b72a011c4edf960324ab2e87438b"}}}' http://203.0.113.10:9024/v2.0/tokens 
    		  
    An example response follows. The scoped token is preceded by id.
    {"access":{"token":{"id":"ecs_baf0709e30ed4b138c5db6767ba76a4e
    ","expires":"1376633255485","tenant":{"description":"s3","enabled":true,"name":"s3"}},
    "user":{"name":"swift_admin","roles":[{"name":"member"},{"name":"admin"}],"role_links":[]},
          "serviceCatalog":[{"type":"object-store", "name":"Swift","endpoints_links":[],"endpoint":[{"internalURL":
           "http://203.0.113.10:9024/v1/s3","publicURL":"http://203.0.113.10:9024/v1/s3"}]}]}}
  4. Use the scoped token and the service endpoint URL for Swift authentication. This step is the same as in V1 of OpenStack.
    curl -v -H "X-Auth-Token: baf0709e30ed4b138c5db6767ba76a4e" http://203.0.113.10:9024/v1/s3/{container}/{object} 
    		  

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: <>()\