Description

Admin authentication tokens are necessary for troubleshooting tasks that require manipulating the Contrail Service Orchestration (CSO) database.

This article documents how to generate this token.

Note: These steps are applicable to both Contrail Service Orchestration (CSO) 5.x and 6.x releases.

Solution

To generate the authentication token, perform the following steps:

  1. Log in to the CSO installer. In an AWS installation, search for the installer in the EC2 instances to get the IP address.

  2. Search for python.sh file, which should be in the /opt/cso/Contrail_Service_Orchestration_5.1.2 directory.

Run the following from the root directory:

find . -name "python.sh"

root@CSO_COMPUTE:~# find . -name "python.sh"  
./Contrail_Service_Orchestration_5.1.2/python.sh
  1. Run the following command to get the authentication token from the above specified directory:

./python.sh -c 'from common.utils import get_auth_token;print get_auth_token()' 

root@CFTSBM7CMP:~# ./Contrail_Service_Orchestration_5.1.2/python.sh -c 'from common.utils import get_auth_token;print get_auth_token()'
gAAAAABhgQuAb0ZiOtRtDTboJdZ7mX0MJ-L2EW5PakFlf9G5Yvwb1vHApEUHr-zO7PEgwKDL2BJsRbw7y_cgwCr1wrdntw9VyS3N7EuHbq0_Kd1Jz-uwNoDaQZsxCei-FTL-Fpbf0O0XH0X4UfVI5hHdpLOGGLeZY2BtwgF0VKF8mVyN-Ao34_M