Search engine
OpenSearch is the search and indexing engine of the platform. It was chosen over Elasticsearch and Apache Solr for its open-source license and for a security plugin that supports OpenID Connect. See ADR 010.
OpenSearch derives from Elasticsearch 7 and keeps its REST API. That is why inherited code and
configuration still use the name elasticsearch (ElasticClientManager, elasticsearchConfig,
ELASTICSEARCH_URL): these refer to the OpenSearch cluster.
Who uses it
| Component | Use | Indexes |
|---|---|---|
explorer module | Indexes the resources and folders of the applications (blog, wiki, mind map, collaborative wall, timeline) and serves their display in the explorer | resource-<application>, and resource-explorer for folders |
search-engine module | Queries the explorer indexes, in addition to the MongoDB and PostgreSQL sources of each module | resource-* |
mediacentre module | Resource search | Its own |
admin-dashboard module | Full-text search proxy and indexing over the event bus | ent-* |
dashboard application | Module catalog with faceted search (Searchkit) | modules-openent |
Explorer and search
The explorer receives the creation, change and deletion of resources and indexes them through an
ingestion job. Each document carries a rights array (creator:<userId>,
user:<userId>:<role>, group:<groupId>:<role>).
Search filters its results on that field: a document is returned only if the member created it,
or it is shared with the member or with one of the member's groups, and never if it is in the
trash. If the elasticsearchConfig block is absent from a module's configuration, that source is
simply disabled.
admin-dashboard module
The module exposes a REST proxy to OpenSearch:
| Method | Path | Role |
|---|---|---|
POST | /admin-dashboard/management/opensearch/search | Full-text search (multi_match with typo tolerance and highlighting) |
GET | /admin-dashboard/management/opensearch/indices | Lists the indexes that match the configured pattern |
GET | /admin-dashboard/management/opensearch/health | Cluster health |
These three routes are reserved for the platform administrator (@AdminFunction("SUPER_ADMIN")),
or for a service call carrying a valid X-Api-Key. The proxy queries OpenSearch with a service
account and does not apply the rights filter, so it must never be opened to other roles.
The index field of a search is restricted to the pattern set in opensearch.default.index
(ent-* by default). An index outside that pattern, such as resource-*, is rejected with a 400
error.
The module also listens on the event bus address fr.tech.openent.opensearch.index. A module can
publish a message there to index or delete a document:
{
"action": "upsert",
"index": "ent-wiki",
"id": "60a1b2c3d4e5f6",
"document": {
"title": "My course",
"content": "...",
"owner": { "userId": "user-uuid", "displayName": "First Last" },
"modified": "2026-05-15T10:00:00.000Z"
}
}
action is upsert or delete. No module of the repository publishes on this address yet.
Configuration
Vert.x modules (ent-core.yaml)
elasticsearchConfig:
uris:
- ${ELASTICSEARCH_URL}
user: ${ELASTICSEARCH_USERNAME}
password: ${ELASTICSEARCH_PASSWORD}
admin-dashboard module (Quarkus)
| Property | Environment variable | Default |
|---|---|---|
opensearch.url | OPENSEARCH_URL | http://ent-opensearch:9200 |
opensearch.username | OPENSEARCH_USERNAME | admin |
opensearch.password | OPENSEARCH_PASSWORD | none |
opensearch.default.index | OPENSEARCH_DEFAULT_INDEX | ent-* |
dashboard application (Next.js)
The application reads OPENSEARCH_URL on the server side, and ELASTICSEARCH_USERNAME and
ELASTICSEARCH_PASSWORD for the Searchkit search.
Installation
Local
Two Docker Compose files exist under starter/:
| File | Image | Security | Use |
|---|---|---|---|
docker-compose.yml (service openent-elasticsearch) | opensearchproject/opensearch:2.8.0 | Security plugin disabled, HTTP on port 9200 | Day-to-day development |
docker-compose-opensearch.yml | opensearchproject/opensearch:2.15.0 and OpenSearch Dashboards 2.15.0 | TLS and security plugin enabled | Working on the security setup |
For the secured setup:
export OPENSEARCH_INITIAL_ADMIN_PASSWORD=<password>
docker-compose -f docker-compose-opensearch.yml up
Certificates are either self-signed (starter/opensearch/self-signed, generated by
script-certificate.sh then convert-pem-keystore.sh) or those of your domain
(starter/opensearch/acme). With domain certificates, call the cluster by a host name covered by
the certificate, not by localhost.
OpenSearch Dashboards listens on port 5601.
Kubernetes
OpenSearch and OpenSearch Dashboards are dependencies of the Helm charts (opensearch 2.26.1 and
opensearch-dashboards 2.24.1), enabled by opensearch.enabled and
opensearch-dashboards.enabled.
| Chart | Configuration |
|---|---|
helm/openent-monolithe | Single node, security plugin disabled, HTTP access inside the cluster through the service opensearch-cluster-master:9200. OpenSearch Dashboards is published under /dashboard-search, protected by basic authentication on the ingress. |
Security
When the security plugin is enabled, OpenSearch is configured with:
- TLS on the transport and HTTP layers;
- OpenID Connect authentication against the platform's identity provider, with
preferred_usernameas the identifier and therolesclaim of the token for roles; - basic authentication against the internal OpenSearch user database as a fallback.
The configuration is in starter/opensearch/opensearch-security/config.yml. Applying it to a
running cluster requires an administration certificate:
/usr/share/opensearch/plugins/opensearch-security/tools/securityadmin.sh \
-cd /usr/share/opensearch/config/opensearch-security -icl -nhnv \
-key /usr/share/opensearch/config/node1-key.pem \
-cert /usr/share/opensearch/config/node1.pem \
-cacert /usr/share/opensearch/config/root-ca.pem
Retrieving self-signed certificates
On a Kubernetes cluster where TLS is enabled, the certificates are in the secret of the master node:
kubectl get secret openent-opensearch-cluster-master-0 -n openent-dev -o jsonpath='{.data.ca\.crt}' | base64 -d > ca.crt
kubectl get secret openent-opensearch-cluster-master-0 -n openent-dev -o jsonpath='{.data.tls\.crt}' | base64 -d > tls.crt
kubectl get secret openent-opensearch-cluster-master-0 -n openent-dev -o jsonpath='{.data.tls\.key}' | base64 -d > tls.key
Calling a self-signed cluster from Bruno
The Bruno collection open-api/Open ENT v3 Search holds the requests that check the cluster and
the module catalog. To call a cluster with a self-signed certificate:
- in the Bruno preferences, enable the use of a custom certificate authority and select
ca.crt; - if the cluster requires a client certificate, declare
tls.crtandtls.keyamong the client certificates of the collection, for the cluster's domain; - set the
hostname_elasticsearchvariable of the environment to thehttps://address of the cluster.