Create, provision, authorize known LDAP accounts in advance

ldap
sonarqube

(Chai Yingchao) #1

Hi all:
I want to group and authorize the known LDAP accounts in advance.

Version:SonarQube 6.7.5

SonarQube LDAP I want to Search for a Account in SonarQube

Administration -> Security -> User ->Search

The premise is that this account has not been logged in SonarQube. But the account exists in LDAP. But if the account has been logged in SonarQube ,it can be searched.

My goal is to group and authorize the known LDAP accounts in advance.
Thanks so much


(Colin Mueller) #2

Chai,

Ever since SONAR-8715 was implemented in 6.3, it has been possible to provision non-local users. Your use-case is pretty well described in that ticket, and you can make use of the POST api/users/create Web API. This is only possible through the Web API, not the UI.

Once your users are created, they can be assigned permissions that persist when a user logs in for the first time.

Check out your own instance’s Web API documentation for the most relevant information for your version of SonarQube.

Colin


(Chai Yingchao) #3

Dear Colin.
According to your instruction, my problem has been solved.
e.g. #curl -X POST -v -u admin:admin ‘http://localhost:9000/api/users/create?login=Chai&local=false&name=ChaiYingchao

thank you so much.