Print

REST API for key rotation

About this task

From Avaya Experience Portal 7.2.3, cloud ASR customers can rotate credentials using a new REST API. Experience Portal supports rotation on DialogFlow and Google Speech. To ensure safety, Google recommends that its customers shuffle the keys periodically.

Use this procedure to rotate the credentials through the new REST API.

Before you begin

Ensure the following:

Procedure

  1. Generate a new key JSON file from the Google Cloud control panel.
  2. Go to the following URL to complete the REST authorization process:

    https://BaseURL/EPWebServices/rest/management/asrservers/credentials/<asrName>.

    Where,

    • BaseURL is the default IP address of your main EPM.

    • <asrName> is the name of the ASR server for which you want to replace the keys.

      noteNote:

      This REST API only supports Google Speech and DialogFlow ASR servers. Any existing MRCP solution is rejected.

  3. Send a PUT call request to the above address with the json request body.

    For example,

    {
      "credentials": "
    {\"type\":\"service_account\",\"project_id\":\"aaep-sample-bot-sv\",\"private_key_id\":\"36b87603a5abd6764463422c20adfbc43efeb564\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nKEYContent\\n-----END PRIVATE KEY-----\\n\",\"client_email\":\"dialogflow-vcotni@aaep-sample-bot-sv.iam.gserviceaccount.com\",\"client_id\":\"107673866867627177364\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"token_uri\":\"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/dialogflow-vcotni%40aaep-sample-bot-sv.iam.gserviceaccount.com\"}
    ",
    "credentialFileName": "test2.json"
    }

    The json request body should contain the following mandatory parameters:

    • credentialFileName: Any string is fine. This is used to identify a key.

    • Credentials: Should contain the whole json credential file content downloaded from Google. Ensure that it is transformed so that it can be treated as a string value in the json format.

    The json request body should have all the " and \ characters escaped. This is done to ensure that the json body is processed correctly as a string and to ensure that special characters are not misinterpreted or cause a format error.

  4. At the prompt, enter your username and password for authentication.

    You must enter the credentials used to log in to the EPM.

    noteNote:

    The cloud provider controls the creation and deletion of the key. Avaya Experience Portal only needs to know which key MPP uses. After key rotation, you must still manually disable and delete the key.

Result

On successful completion, customers receive a 200 response containing the request body. If the process fails, customers receive a 400 or 500 response containing the error message used for the debugging.