Authenticating to a Cloudera AI Workbench in Anywhere Cloud using cdswctl

Authenticate to a Cloudera AI Workbench using cdswctl command and the --awc flag to enable Bearer-token authentication through the Knox gateway.

Before authenticating, you must have the following information available:
  • Your Cloudera AI Workbench URL.
  • Your username.
  • Your Cloudera AI Workbench API key.
  1. Select Apps in the left navigation pane on the Anywhere Cloud Console.
  2. Search for the required Cloudera AI Workbench instance.

    Ensure that the status of the instance is Deployed.

  3. Click on the name of the required instance.

    A pane opens displaying the available information for the selected instance.

  4. Click the URL of the selected Cloudera AI Workbench instance.

    The Cloudera AI Workbench home page is displayed.

  5. Obtain your API key from the Cloudera AI Workbench.
  6. Open a terminal on your local workstation, and run the cdswctl login command with the --awc flag.
    cdswctl login \
      --awc \
      -u https://[***WORKBENCH HOST***] \
      -n [***USERNAME***] \
      -y '[***API KEY***]'
    
    Provide the values described in the following table:
    • [***WORKBENCH HOST***] - The hostname of the Cloudera AI Workbench.
    • [***USERNAME***]- The username for the Cloudera AI Workbench.
    • [***API KEY***] - The API key copied verbatim from the Cloudera AI Workbench.

    Specify the --awc flag only during initial login. The authentication configuration is saved to your local profile and applied automatically to subsequent requests for both API v1 and API v2.

  7. Verify your session by running any cdswctl command.
    See the following example:
    cdswctl projects list
    cdswctl sessions list -p <project-name>
    cdswctl ssh-endpoint -p <project-name> -s <existing-session-id>