Skip to content

Managed secret providers

Elasticsearch

Connect Elasticsearch to Alter Vault for secure API access

Use Elasticsearch credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDelasticsearch
CategorySearch
Credential TypeEncoded API Key

Log in to Elastic Cloud

Log in to Elastic Cloud and open the deployment.

Create an API key

In Kibana, go to Stack Management > Security > API keys and click Create API key.

Copy the encoded value

Copy the Encoded value — it is the base64 form used directly after ApiKey in the Authorization header, and is only shown once.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Elasticsearch

Go to Managed Secrets > Add Provider > Elasticsearch.

Enter credentials

Paste your Encoded API Key into the credential field.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.POST,
"https://YOUR-DEPLOYMENT.es.us-east-1.aws.elastic.cloud/my-index/_search",
grant_id="YOUR_GRANT_ID",
json={"query": {"match": {"title": "vector search"}}, "size": 5},
)
  • The credential is injected as Authorization: ApiKey <encoded> — store the encoded form of the key.