We are using Sonarqube Community Edition Version 9.9.2.
When user tying to connect measurement and component in API using Bearer Token authentication is not working . But its working with Basic Auth with username and password .
This is the curl command user trying to connect for bearer token .
I confirm this issue with EE 9.9.3
curl --header ‘Authorization: Bearer squ_XXX’ https://<sonarqube_hostname>/api/user_tokens/search does not work (results in 401) (access.log contains request also with 401)
whereas
curl -u squ_XXX: https://<sonarqube_hostname>/api/user_tokens/search works and returns sucessfully with response and 200
The token is the same just one time as request header with bearer token (not successful), the other time as basic auth (used as user as documented and empty pw, sucessful).
After deeper investigation, we found that Bearer authentication was implemented only in version 10.0 and upwards. For version 9.9 or under we do only accept HTTP basic auth or User token
You can find the documentation regarding authentication for version 9.9 here