adisreyaj / vscode-sonarqube-status

Get the result of the Sonar Qube analysis from your CICD pipeline right inside VSCode.
https://marketplace.visualstudio.com/items?itemName=adisreyaj.sonarqube-status
8 stars 8 forks source link

Use Sonar Token instead of login/password #24

Closed fredericdasilva closed 2 years ago

fredericdasilva commented 2 years ago

Hello,

I would try to use this pluggin to connect to my sonar server for which I am using token. Is it possible to use token instead of login/password ? exemple : { "project": "adisreyaj_compito", "sonarURL": "https://sonarcloud.io", "auth": { "token": "fkqsfbsdkfn6789dlqsfsldnfsd", } } Thanks FD

adisreyaj commented 2 years ago

Hi @fredericdasilva,

Will check the possibility and add it in the next release.

adisreyaj commented 2 years ago

According to the API, one should be able to use a token in place of the username. https://next.sonarqube.com/sonarqube/documentation/extend/web-api/

Can you try attaching the token to the username and leaving the password field as empty string?

fredericdasilva commented 2 years ago

Hello Thanks. Sorry but the extension is not working even with token used as username. I can see "Refreshing Sonarqube report" only and no information in the console.

adisreyaj commented 2 years ago

@fredericdasilva Will check out on my side and hopefully come with with a way to use it.

rick-cgi commented 2 years ago

Suspect the issue is in your sonarqube-sdk repository, where it looks like the validator utils are expecting both a username and password to be not null. If either is null then an error is thrown. See https://github.com/adisreyaj/sonarqube-sdk/blob/main/src/utils/validator.util.ts

JoeEarly commented 2 years ago

Ran into this issue for a private org repo...any plans to update soon?

adisreyaj commented 2 years ago

Suspect the issue is in your sonarqube-sdk repository, where it looks like the validator utils are expecting both a username and password to be not null. If either is null then an error is thrown. See https://github.com/adisreyaj/sonarqube-sdk/blob/main/src/utils/validator.util.ts

Looks like it. Will work this weekend to push the update.

clown-helang commented 2 years ago

I have the same demand and hope to support you as soon as possible