As administrator not able save any configuration in SonarQube 8.4

I am using SonarQube where as an administrator , cannot save any configuration (Permission, Create Project). Every time I am getting HTTP 401 status code.

But I am able to login with the default credentials (admin/admin). I can visit every page but not able chnage any configuration.
Version - SonarQube 8.4

Kindly suggest me what should I do in this scenario.

Hi,

Welcome to the community!

You shouldn’t be getting the interface if you’re truly unauthorized. However, in my testing I’ve seen that I can get unauthorized access to the interface under these conditions:

  • log in with all perms
  • while you’re logged in, your perms are reduced (by another user? by you in another browser?)
  • without logging out you load an admin interface & submit changes
  • -> unauthorized error

Can you do a force/hard refresh in your browser to make sure the interface reloads properly and/or double-check your permissions? Additionally, it might be worth checking SonarQube’s access logs to verify that this is a 401 coming from SonarQube rather than from some intermediary on your network.

 
Ann

Hi,

I tried with your steps. Unfortunately those are not working.

I logged in with default admin (admin/admin) and found Project create permission is not checked. So I tried to give the access but redirected to login page.

Access Log -
127.0.0.1 - - [22/Sep/2020:08:30:53 +0000] “POST /sonar/api/projects/create HTTP/1.1” 401 - “/sonar/admin/projects_management” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36” “AXSl75hQ44r4j9AnAADa”

Chiranjit

Hi @Chiranjit_Roy_Chowdh,

Could you please describe how do you authenticate on SonarQube, when not using admin/admin account?

Thanks.
Regards,
Julien Lancelot

Hi @julienlancelot,

Currently I am only using admin and trying to create a new Project.

Chiranjit

Hum, ok this is very strange, could you please try on another web browser?

Hi, i have the same problem, it’s like i can’t create a user, anyone can assign a issue to himself…
all we got is a redirect to login page with a 401 status.

all users admin or developers have the same issue, sonarqube 8.0 Community Edition

since 20 sept aprox

Hi @rhormigo,

Could you please try to authenticate on SonarQube using a private session?
There may be an issue with the authentication cookie.

Thanks.

What do you mean by a private session?

On Chrome, it’s called “New Incognito Window”, and on Firefox “New Private Window”

Yeah, thanks, we solve it, it was the HttpOnly; condition in the cookie, you just need to disabled it, i used a curl -u user:password “https://sonar…/api/change_log_level” with level=DEBUG.
then i saw a error: login failure [cause|Wrong CSFR in request]
this derivate to: Wrong CSFR in request

I hope this helps someone

Good news @rhormigo, thanks for explaining how you’ve solved your issue!

1 Like