SonarQube authentication via GitLab does not work when running SonarQube under SSL

Must-share information:

  • SonarQube Community edition v25.2.0.102705
  • Deployed: zip, SonarQube SSL via IIS reverse proxy
  • Trying to authentication using GitLab credentials

I’m getting the same issue as this 2022 post: Cannot log-in via https proxy

Under http, SonarQube correctly generates the URL
https://gitlab.mydomain.com/oauth/authorize?response_type=code
to do the authentication, but under https, it generates
https://sonar.mydomain.com/oauth/authorize?response_type=code
and results in a page not found.
I notice the 2022 post has not been resolved, and this still seems to be an issue with the latest builds of SonarQube. Has anyone looked into this or am I doing something wrong? Configuration in SonarQube and GitLab is correct according to Setting up GitLab authentication | SonarQube Server Documentation

Thank you!

In the meantime to get past this issue with SonarQube I had to add the following additional rule to my IIS reverse proxy’s Web.config:

<rule name="Redirect Wrong SonarQube Auth URL" stopProcessing="true">
	<match url="^oauth/authorize" />
	<conditions>
		<add input="{HTTP_HOST}" pattern="^sonar\.mydomain\.com$" />
	</conditions>
	<action type="Redirect" url="https://gitlab.mydomain.com/{R:0}" redirectType="Permanent" />
</rule>