Authenticating with Model Endpoints using UI

You can generate credentials to authenticate application requests or test model endpoints directly from the Model Endpoint Details page in the Cloudera AI console. Using the Generate Key / Token menu, you can obtain Knox API keys or short-lived JWT tokens without leaving the interface.

To generate API Keys, the Cloudera Runtime must be 7.1.9 SP2 or Cloudera 7.3.2 or higher versions. For further prerequsites for using API keys also see Prerequisites for using API key.

Table 1. Credential options for authentication
Credential type Use case Lifetime
Knox API Key Production applications, long-term automation, and background services.

Long-lived

It can be revoked from the Knox UI.

UMS JWT Token Ad-hoc testing, debugging, and interactive command-line requests.

Short-lived

It can be configured using the cdpcli, as a global value for the Cloudera Control Plane. The default validity period is 1 hour.

  1. In the Cloudera console, click the Cloudera AI tile.

    The Cloudera AI Workbenches page is displayed.

  2. Click Model Endpoints in the Deployments section on the left navigation menu.

    The Model Endpoints landing page is displayed.

  3. On the Model Endpoints landing page, select the specific endpoint you want to access.
    The Model Endpoint Details page is displayed.
  4. In the page header, click the Generate Key / Token dropdown menu and select one of the following options:
    • Generate API Key: Select this for long-lived, programmatic access by external applications or services.

      • A dialogue window opens to provide the user pasword.

      • The key is automatically copied to your clipboard, and a success notification is displayed.
    • Generate JWT Token: Select this for short-lived, temporary authentication, such as manual testing using curl or a REST client.
      • Cloudera AI reuses the UMS JWT token from your current UI session.
      • The token is copied to your clipboard, and a confirmation notification is displayed.
    • Open Knox UI: Select this to revoke or delete generated API keys for the user.
      • The Knox integration page opens in a new browser tab.