https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/other_authentication_methods
Other authentication methods in the Elasticsearch Java REST 5 client | Java
If you want the client to authenticate with an Elasticsearch access token, set the relevant HTTP request header. If the client makes requests on behalf...
other authentication methodselasticsearchjavarestclient