Skip to main content

Change authentication credentials

Last update:

If you need to manage resources of another account, project, pool, or use another service user, change your authentication credentials.

The process of changing credentials depends on how you configured OpenStack API authentication:

Change authentication credentials in the OS

  1. Open the CLI.

  2. Open the RC file in the nano text editor:

    nano /<directory_name>/<rcfile_name>

    Specify:

    • <directory_name> — name of the directory with the RC file and Dockerfile;
    • <rcfile_name> — name of the RC file that you downloaded to configure OpenStack CLI. The default is rc.sh
  3. Change the authentication credentials in the file:

    export OS_PROJECT_DOMAIN_NAME='<account_id>'
    export OS_PROJECT_ID='<project_id>'
    export OS_TENANT_ID='<project_id>'
    export OS_REGION_NAME='<pool>'

    export OS_USER_DOMAIN_NAME='<account_id>'
    export OS_USERNAME='<user_name>'

    Specify:

    • <account_id> — account ID. You can view it in the control panel in the top-right corner;
    • <project_id> — project ID. You can copy it in the control panel: from the top menu, click Products and select Cloud Servers → open the projects menu (the name of the current project) → in the project line, click ;
    • <pool>pool, for example, ru-2;
    • <user_name> — name of the service user who has access to resource management. You can view it in the control panel: from the top menu, click IAMService Users section.
  4. Exit the nano text editor and save your changes: press Ctrl+X, then Y+Enter.

  5. Apply the environment variables from the RC file:

    source <rcfile_name>

    Specify <rcfile_name> — name of the RC file that you downloaded to configure OpenStack CLI. The default is rc.sh

  6. Enter the OpenStack password — the password of the service user you specified in step 3.

  7. Verify that OpenStack CLI is working. To do this, open the cloud servers list:

    openstack server list

    If cloud servers have been created in the pool and project specified in the variables, their list will appear in the response. If no servers have been created, the response will be an empty line.

Change authentication credentials in the Docker container

  1. Open the CLI.

  2. Open the RC file in the nano text editor:

    nano /<docker_directory>/<rcfile_name>

    Specify:

    • <docker_directory> — name of the directory where you moved the RC file and Dockerfile;
    • <rcfile_name> — name of the RC file that you downloaded to configure OpenStack CLI. The default is rc.sh
  3. Change the authentication credentials in the file:

    export OS_PROJECT_DOMAIN_NAME='<account_id>'
    export OS_PROJECT_ID='<project_id>'
    export OS_TENANT_ID='<project_id>'
    export OS_REGION_NAME='<pool>'

    export OS_USER_DOMAIN_NAME='<account_id>'
    export OS_USERNAME='<user_name>'

    Specify:

    • <account_id> — account ID. You can view it in the control panel in the top-right corner;
    • <project_id> — project ID. You can copy it in the control panel: from the top menu, click Products and select Cloud Servers → open the projects menu (the name of the current project) → in the project line, click ;
    • <pool>pool, for example, ru-2;
    • <user_name> — name of the service user who has access to resource management. You can view it in the control panel: from the top menu, click IAMService Users section.
  4. Exit the nano text editor and save your changes: press Ctrl+X, then Y+Enter.

  5. Run the Docker container:

    docker run -ti --rm -v $(pwd):/workspace osc:dalmatian
  6. Apply the environment variables from the RC file:

    source <rcfile_name>

    Specify <rcfile_name> — name of the RC file that you downloaded to configure OpenStack CLI. The default is rc.sh.

  7. Enter the OpenStack password — the password of the service user for whom the RC file was created.

  8. Verify that OpenStack CLI is working. To do this, open the cloud servers list:

    openstack server list

    If cloud servers have been created in the pool and project specified in the variables, their list will appear in the command output. If no servers have been created, the command output will be an empty line.