Add ApiKey authentication to Elasticsearch Node so it works with serverless

This suggested feature request is for the Elasticsearch Node Credentials.

The idea is:

To add ApiKey authentication to the elasticsearch node credentials.

My use case:

I am using Elasticsearch Serverless. I cannot use a username and password for api access because they are now enforcing MFA. The best security practice for all Elasticsearch is to use an expiring ApiKey for access. This is the same structure that is used for Elastic Security, so you already have the API.

I think it would be beneficial to add this because:

It won’t work for anyone using Elasticsearch Serverless

Any resources to support this?

Elasticsearch serverless api access

Are you willing to work on this?

I think you have all of the code already for this in Elasticsearch Security. I can help anyone working on it, but don’t have time to develop it myself.