Sonarqube behind HTTP Header Authentication delegation and api url from gitlab-ci

Hello, I am using oauth2-proxy for http header auth delegation, but in CI, it seems that it can’t authenticate with the token from the CI variables.
I am wondering if there are some routes with which I should skip oauth2?
Or what is the auth flow using tokens? does it sets the same headers as it except with sso?

Hey @Bastian_Bretagne

It’s not very clear to me what you’re trying to do, and what’s not working. How are you running the analysis (which CI? Have you configured the token?), and what error do you receive?

User Tokens are used to perform basic authentication requests to SonarQube. Nothing more spectacular than that. HTTP Headers are not used at all by the scanner – tokens must be used.

Hello @Colin sorry for the late reply, instead of using a proxy like oauth2-proxy, I decided to use gitlab auth which solves my issue.
The problem was that the API uses token to authenticate, and oauth2proxy will ask to authenticate with header token on all routes.
For those that want to use a oauth proxy in front of Sonar, they will probably need to either whitelist the sonarqube server IP or find-out by themselves the route that the runner will be using to disable oauth on them.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.