Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- SonarQube Community Edition 8.9.6 build 50800
- what are you trying to achieve
- trying to create SonarQube account using Web API
- GitLab, using as OAuth v2 provider. so SonarQube can using GitLab as OAuth v2 provider
- That SonarQube account must associate by GitLab account
- what have you tried so far to achieve this
- I tried below bash script to create account
curl -s -X POST -u "$sonarce_token:" "$sonarce_url/api/users/create" \ -F login=$gitlab_username \ -F name=$gitlab_name \ -F email@example.com \ -F local=false
- and I tried to as below to update
curl -s -X POST -u "$sonarce_token:" "$sonarce_url/api/users/update" \ -F login=$members_username \ -F name=$members_name \ -F firstname.lastname@example.org
- and update identity provider to gitlab
curl -s -X POST -u "$sonarce_token:" "$sonarce_url/api/users/update_identity_provider" \ -F login=$members_username \ -F newExternalIdentity=$members_username \ -F newExternalProvider=gitlab
so, the account has been shown on SonarQube > Administration > Users. please see below screenshot.
the email@example.com account was created by upper bash script. so purple color painted icon is indicated the GitLab account.
However, using the kdh7565@ gitlab account to login SonarQube, not worked just error popup.
“You’re not authorized to access this page. Please contact the administrator. Reason: Failed to authenticate with login ‘kdh7565’”
Otherside, I can login using GitLab account which created by manually just click UI NOT API.
And, I cannot gathering any information on log files about kdh7565@ login.
(web.log, es.log, ce.log, access.log)