This refers to SonarQube 8.6 developer edition.
I’m running sonar behind an NGINX proxy in order to use https:. That works. I’m now attempting to integrate sonarqube with our gitlab server for authentication, group sharing, etc…
I followed the instructions to set up the application on both gitlab and sonar.
When I attempt to sign in using my gitlab account, I receive the “Redirect URI included is not valid”
I pulled the gitlab logs for the request and found the following:
“GET /oauth/authorize?response_type=code&client_id=<TOKEN_OMITTED>&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2Foauth2%2Fcallback%2Fgitlab&scope=read_user&state=f2gfcctjlnt1kbk59og3felnqu HTTP/2.0” 200 8312 “https://sonar.powercastco.com/sessions/new” “Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0” 3.80
While I’m not sure what the %3A stuff is, the redirect_uri as reported by gitlab seems to be
http://localhost:9000/
This is the port that sonar itself is executing on, locally behind the nginx proxy.
Can someone who has successfully configured sonar behind an nginx proxy and gotten gitlab oauth2 to work done this post their nginx.conf file that they use on their sonar server? I suspect that the problem is with that because that’s the place where https://sonar.myhost/ is mapped to http://localhost:9000.