Description

This article explains how to authenticate to the CSO keystone API in order to obtain access keys for CSO API calls.

Symptoms

Using the guidance in the document, Contrail Service Orchestration (CSO) HTTP API Reference and Developer Guide , connectivity was attempted to both:

  • http:// <ipaddress> :5000/v3/auth/tokens - There is no response, the Cloud CSO does not appear to be listening on Port 5000 as per the standard Juniper API documentation.
And
  • https:// <ipaddress> /v3/auth/tokens - The CSO returns a 500 error.

Both posts were using the JSON format:

{
    "auth": {
        "scope": {
            "project": {
                "domain": {
                    "id": "<domain-id>"
            },
        "name": "<name>"
        }
    },
    "identity": {
        "password": {
            "user": {
                "domain": {
                    "id": "<domain-id>"
                },
            "password": "<password>",
            "name": "<name>"
        }
    },
    "methods": [
        "password"
    ]
  }
}
}

Solution

Connectivity works on: https:// <ip-address> /v3/auth/tokens

Valid JSON should look like the following:

{
    "auth": {
        "scope": {
            "project": {
                "domain": {
                    "id": "default"
                },
                "name": "{{CSO_OPCO.EN_US}}"
            }
        },
        "identity": {
            "password": {
                "user": {
                    "domain": {
                        "id": "default"
                    },
                    "password": "{{CSO_PASSWORD.EN_US}}",
                    "name": "{{CSO_USER.EN_US}}"
                }
            },
            "methods": [
                "password"
            ]
        }
    }
}

Where:

  • {{CSO_OPCO.EN_US}} should be replaced with opco or tenant name
  • {{CSO_PASSWORD.EN_US}} should be replaced with your password
  • {{CSO_USER.EN_US}} should be replaced with your username

Check the value against Key X-Subject-Token to use as Auth token.