-
-
Notifications
You must be signed in to change notification settings - Fork 261
[FEATURE] Healthcheck fails when admin interface credentials are enabled #4587
Copy link
Copy link
Open
Description
Describe the bug
The container's healthcheck script does not support authentication. When basic auth credentials are configured for Solr's admin interface, the healthcheck endpoint receives a 401 Unauthorized response, causing the container to be marked as unhealthy.
To Reproduce
- Pull and run typo3solr/ext-solr:13.1.1
- Enable basic authentication for the Solr admin interface*
- Restart the container
- Observe the container health status via docker inspect --format='{{.State.Health.Status}}'
*To enable authentication for the Solr admin interface follow these steps:
Create security.json on your host
{
"authentication": {
"blockUnknown": true,
"class": "solr.BasicAuthPlugin",
"credentials": {
"solr": "<YOUR ENCODED PASSWORD>"
},
"realm": "My Solr users",
"forwardCredentials": false
},
"authorization": {
"class": "solr.RuleBasedAuthorizationPlugin",
"permissions": [
{ "name": "security-edit", "role": "admin" }
],
"user-role": {
"solr": "admin"
}
}
}To create the password you can use this tool.
Mount via docker-compose.yaml
services:
solr:
container_name: typo3s-solr-server
image: typo3solr/ext-solr:<VERSION>
ports:
- "8983:8983"
volumes:
- typo3s-solr-server-data:/var/solr
- ./security.json:/var/solr/data/security.json
volumes:
typo3s-solr-server-data:
driver: local
driver_opts:
type: none
device: $PWD/.solrdata
o: bindMake sure the file is readable by UID 8983 (the Solr user inside the container):
chmod 644 security.jsonExpected behavior
The healthcheck should succeed even when admin credentials are enabled. Possible approaches:
- Support passing credentials to the healthcheck script via environment variables (e.g., SOLR_HEALTH_USER, SOLR_HEALTH_PASS)
- Use an unauthenticated health endpoint that bypasses admin auth
Used versions (please complete the following information):
- Container image: typo3solr/ext-solr:13.1.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels