I have a docker setup for sonarqube to run some tests locally. I use the sonar.properties value sonar.forceAuthentication=false to reduce the amount of setup for my tests.
It works with SQ version 7.6 but does not work anymore - i think starting with 9.0.
Was this removed or is the property named differently now? I could not find a lot of info about it in the docs.
Thanks in advance
Hi @stefanrinderle ,
how do you start your container? i did a manual test with our latest docker images and it is working just fine:
docker run -it --rm -e SONAR_FORCEAUTHENTICATION=false -p 9000:9000 --pull always sonarqube
thanks for your input. It works with the environment variable. I used the following code in the Dockerfile before:
RUN echo "sonar.forceAuthentication=false" >> /opt/sonarqube/conf/sonar.properties
I think you are running into SONAR-11818. let me try to explain;
currently there is a mixture of properties that are displayed in the UI which persist in the database and these should not be able to be configured via properties or environment variables as the behavior of SQ would depend on data in the database AND on the current configuration. with the resolvement of the mentioned ticket it should no longer be possible to change properties that persist in the database with any other way than to use the API or the web UI.
As this ticket is still open you have been using a “bug” (or undocumented feature if you so will) to configure SQ.
In the long run you should migrate to an API based approach to set something via SQ in the database using
hope that clarifies the situation