Docker-sonarqube: Health check request requires authentication

Created on 9 Feb 2019  路  2Comments  路  Source: SonarSource/docker-sonarqube

On my docker-compose file I added a healthcheck, but it fails because Sonarqube requires authentication...

It doesn't work:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/api/system/health"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 5

I did manage to make it work when I added the admin user. However, I don't understand why a simple health check requires the user to be authenticated. The "status" endpoint doesn't require...

It does work:
curl -f -u admin:admin http://localhost:9000/api/system/health

Most helpful comment

The reason is that api/system/health displays sensitive information. I suggest to replace this call with the API api/system/status. It does not require special permissions and returns {"status": "UP" } when everything is good.
Meanwhile I close this issue. Thanks for your understanding.

All 2 comments

The reason is that api/system/health displays sensitive information. I suggest to replace this call with the API api/system/status. It does not require special permissions and returns {"status": "UP" } when everything is good.
Meanwhile I close this issue. Thanks for your understanding.

@simonbrandhof Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carloscds picture carloscds  路  3Comments

mmaier2 picture mmaier2  路  6Comments

jasonrhaas picture jasonrhaas  路  9Comments

alexsuter picture alexsuter  路  3Comments

rschlick picture rschlick  路  10Comments