Generating an Elasticsearch API key for Granta MI

Programmatic access to Elasticsearch from Granta MI is secured using an API key.

  1. On your Elasticsearch server, open the Kibana web application in a browser (http://localhost:5601) and log in using the elastic user credentials.
  2. Open the main menu, scroll down and click Management, then under the Security heading, click API keys.
  3. Click Create API key.
  4. Specify a key name, for example, mi_all.
  5. Select Restrict Privileges then remove the sample JSON and replace it with this:
    {
          "mi_all": {
              "cluster": [
                  "monitor", 
                  "manage_pipeline" 
              ],
              "indices": [
                  {
                      "names": [
                          "mi_*", 
                          "is_*", 
                          "isdb_*", 
                          "al_*" 
                      ],
                      "privileges": [
                          "all" 
                      ]
                  }
              ]
          }
    }
  6. Click Create API Key.
  7. Copy the API key information in Encoded format and paste this into a text editor as well. This is the format required for adding the API key on your MI application servers.