deepy / sonar-crowd

GNU Lesser General Public License v3.0
32 stars 37 forks source link

Periodic synchronization with Crowd #20

Open canardi opened 6 years ago

canardi commented 6 years ago

Dear all,

I'm opening a discussion in order to implement a new functionality on this plugin. A periodic synchronization with CROWD configurable (parameter like every 1 hour).

From that moment, CROWD will be the only source to manage permissions. We will use the "Developer Edition" of SonarQube, meaning that one project contains multiple branches. This project is existing in the CROWD with a specific group, containing people having access to sonar.

The goal will be to sync SonarQube permissions/project every hour, analyzing if a new project is configured in the crowd and/or if new people were added/removed from the specific group.

What do you think about it ?

KR, Dimitri

flopma commented 6 years ago

After checking the code source, it looks like the cheapest way to solve this issue is to change the method org.sonar.server.authentication.UserIdentityAuthenticator#syncGroups to allow it to create missing groups in Sonarqube's DB. Of course the scope of the change is not anymore into the plugin, but more in Sonarqube itself.

flopma commented 6 years ago

Pull request sent https://github.com/SonarSource/sonarqube/pull/3182