JetBrains / TeamCity.SonarQubePlugin

A plugin for TeamCity server allowing you to configure and run SonarQube analysis from the CI
Apache License 2.0
53 stars 32 forks source link

Provide Option for Token Authentication? #48

Open cameronpresleypfj opened 6 years ago

cameronpresleypfj commented 6 years ago

Background I'm setting up SonarQube integration for multiple TeamCity projects and for authenticating to the SonarQube server, I'm using a service account.

Problem When configuring a connection, you have to provide both the username and password of the account to access. This is problematic because if the account or password were to change, I'd need to update the project connection.

Proposed Solution Similar to the Visual Studio Team Services plugin for SonarQube, it'd be convenient if we could provide the authentication token that way I only need to change one piece of information (instead of two).

Thoughts?

Linfar commented 6 years ago

As far as I understand SonarQube documentation tokens should be used as an username without password. Since current UI in the plugin doesn't require password you can already use the token. It isn't convenient enough so I'll probably add a switch to use 'token authentication' mode.

gaurav1264 commented 4 years ago

Could you please plan to include this feature. Token must not be visible anywhere once configured.

Problem - We use external authentication system (say crowd), and chances are for single point of failure. With this failure, user can not login to sonar web using user/password combination, But user can run analysis, make REST calls using token without an issue.

Linfar commented 4 years ago

I've implemented this feature, now it's possible to set token authentication for the connection. It's integrated both to 2017.1 and 2020.1 branches (please note that Sonar Runner plugin 2017.1 is incompatible with TeamCity 2020.1).