5.7.1 Openstack Keystone

The SDN Controller uses Openstack Keystone as an identity management for managing users, generating tokens, as well as token validation. Upon installation, the SDN Controller creates the following users and roles:

User: sdn – This is the primary user that operates different SDN REST and UI operations. The sdn user has roles sdn-user and sdn-admin.

User: rsdoc – This is the primary user that is associated with API documentation operations. The rsdoc user has sdn-user role.

The Keystone version in use is based on the Folsom release. If a later Keystone version is in use:

Ensure that it supports the Keystone v2.0 REST API.

Configure the token provider to use the UUID token (instead of PKI tokens). This is configurable via /etc/keystone/keystone.conf.

For keystone configuration details, see: http://docs.openstack.org/developer/keystone/configuration.html

The SDN Controller currently does not enforce role-based permissions (RBAC); however, it may do so in the future. Also, applications installed on the SDN Controller may choose to enforce RBAC per their security requirements.

To authenticate, one needs to present username/password to the /auth API as below (using curl as an example):

curl -sk -H 'Content-Type:application/json' -d '{"login":{"user":"sdn","password":"password","domain":"sdn"}}' https://<controller-ip>:8443/sdn/v2.0/auth

CAUTION: Credential information (user name, password, domain, and authentication tokens) used in cURL commands may be saved in the command history. For security reasons, HP recommends that you disable command history prior to executing commands containing credential information.

The above call returns this example JSON data structure that includes the authentication token, which, by default, expires in 24 hours:

{

"record": {

"domainId": "62e312edff47413fad7e1d7fa6ac7bc7",

"domainName": "sdn",

"expiration": 1377917359000,

"expirationDate": "2013-08-30 19-49-19 -0700",

"token": "54a6f80a9ae243db89bfa05de4ced51d",

"userId": "bca3dea8a28b457e99e899ae16b79634",

"userName": "sdn"

}

}

CAUTION: Please guard this token information, as it can be used as an API key to gain access to your SDN Controller REST APIs.

To gain access to the REST API, include the token in the X-Auth-Token header as in the following curl example:

curl -sk -H "X-Auth-Token:54a6f80a9ae243db89bfa05de4ced51d"

https://controller-ip:8443/sdn/v2.0/systems

5.7 REST authentication

67