Getting Started with ECS - Java + Swift (JOSS)

If you have an existing application written against the Swift API using JOSS, you can easily reconfigure it to connect to EMC ECS.  You will need the following information from your Administrator:


  1. Your ECS Username (generally in user@domain format)
  2. Your Swift password
  3. Your ECS endpoint information


Note that you will need JOSS v0.9.2+ for a ECS-specific authentication fix.


When connecting with JOSS, we will be using the "Keystone" style of authentication for Swift.  In this configuration, your endpoint will generally be in the form of https://<host>/v2.0/tokens.  If you are connecting directly to a ECS node, Swift runs on port 9024 for HTTP and 9025 for HTTPS.  In those cases, the endpoint would be https://<host>:9025/v2.0/tokens.


Once you have the appropriate information, connecting to Swift is easy:


            AccountConfig config = new AccountConfig();
            config.setAuthUrl("http://" + dataNode + ":9024/v2.0/tokens");
            account = new AccountFactory(config).createAccount();


If you are connecting directly to an ECS node for testing, the host's SSL certificate will likely be self-signed.  You can disable SSL authentication by adding the following line before the createAccount() method call:




Note that disabling SSL validation is not suitable for production environments.