Using HTTP Basic Authentication to access Elasticsearch - Using HTTP Basic Authentication to access Elasticsearch - Alfresco - Alfresco Search Enterprise - Alfresco/Alfresco-Search-Enterprise/4.2/Alfresco-Search-Enterprise/Configure/Overview/Using-HTTP-Basic-Authentication-to-access-Elasticsearch - 4.2 - 4.2

Alfresco Search Enterprise

Platform
Alfresco
Product
Alfresco Search Enterprise
Release
4.2
License
ft:lastPublication
2026-10-22T08:26:09.664000
ft:locale
en-US

When using the Elasticsearch server with the HTTP Basic Authentication protocol you must add your Elasticsearch credentials to the alfresco-global.properties configuration file.

elasticsearch.user=elastic
elasticsearch.password=bob123

Additionally, for every “live-indexing” service from the Elasticsearch connector the same credentials must be configured. Use Java and the following global properties:

SPRING_ELASTICSEARCH_REST_USERNAME=elastic
SPRING_ELASTICSEARCH_REST_PASSWORD=bob123

The environment variables can be passed as a command line argument when running the Spring boot application locally or they can be added to the environment service section when using Docker Compose. The example above connects to an Elasticsearch server configured with the following values:

elasticsearch:
  image: elasticsearch:7.10.2
  environment:
    - discovery.type=single-node
    - xpack.security.enabled=true
    - ELASTIC_PASSWORD=bob123

You must also add these credentials to the Kibana app.

kibana:
   image: kibana:7.10.1
   environment:
     - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
     - ELASTICSEARCH_USERNAME=elastic
     - ELASTICSEARCH_PASSWORD=bob123