Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnes report download without signing in with credentials. possible ? #322

Open
inugravi opened this issue Jun 8, 2022 · 9 comments
Open
Labels
question Further information is requested

Comments

@inugravi
Copy link

inugravi commented Jun 8, 2022

Before posting a new question, please read the README.md and check existing issues.

Describe what you need to know

Dear Star Team,

We have a setup in our organization where we are downloading the cnes report by signing into sonarqube portal with our credentials.
Now the new requirement is that we want to download the report without signing into the portal because we can't grant administrator permission to everyone in team. Please help in achieving so.

@inugravi inugravi added the question Further information is requested label Jun 8, 2022
@Sancretor
Copy link
Contributor

Hi @inugravi

I'm not sure to fully understand your question... so I try an answer and you'll tell me if it's the one you expected !

So you don't want to log into SonarQube wbe interface to generate reports ? Well, you can use the standalone mode, and generate them from the command line using a SonarQube Token.
Just be sure that the token has the right to access the data from the project you want to generate reports from.

@inugravi
Copy link
Author

inugravi commented Jun 9, 2022

Hi @Sancretor ,

Yes I want to download the report from the portal (not via command line) without signing into it.

In simple words
Our requirement is to visit our site for example www.star-sonarqube.com.
Step-1: Go to More option
Step-2: Select CNES Report and
Step-3: Select Project followed by Branch and then Generate.

However for our existing setup, after the Step-2 we need to login with our credentials.
Our requirement is to bypass this login and directly download the report.

@Sancretor
Copy link
Contributor

Hi @inugravi
I'll have a look into it, but not sure we can change this behaviour.
While using this plugin you may need some permissions, so logging in might be required by SonaQube.
I don't remember exactly how it works, so a little investigation before I come back with some news.

@inugravi
Copy link
Author

sure @Sancretor

No problem. Please take your time :)

@inugravi
Copy link
Author

Hi @Sancretor

Any update on this please.

@Sancretor
Copy link
Contributor

Sancretor commented Jun 20, 2022

Hi @inugravi
No update yet sorry, could not find free time for this lately...
Be sure I'll give you an update when it's done !

Edit...
As soon as I wrote this answer, my curiosity kicked in so...
I checked the way we register this plugin inside SonarQube and we don't explicitly set a restricion to admin users.
Any user should be able to access it... (read rights are still needed to generate the report though)

So if SonarQube requests users to log in, it's not something we ask it to do...
Mght be an internal SonarQube requirement for plugin pages ...?
As I'm not absolutly sure, more investgation it is then.

@meghadadhich
Copy link

Hi @Sancretor,

Plugin is not allowing report download for any non admin users with read access. its failing with error.

@inugravi
Copy link
Author

inugravi commented Jun 23, 2022

Hi @Sancretor,

Plugin is not allowing report download for any non admin users with read access. its failing with error.

Yes @Sancretor
we don't want to by pass login to download cnes report. we just want to download the cnes report for non admin users.

@Sancretor
Copy link
Contributor

Hi !

That's exactly what I understood :)
I tried to reproduce this, but even with a non-admin user but I actually can access the plugin page and generate a report so...
Are you sure the non-admin user has at least "browse" rights on the project you want to generate a report on ?
What error do you have when you try to access the plugin page / generate a report ?

Again, unfortunately, the part of the plugin code that handles the SonarQube plugin registration is not requiring admin privileges. So we're explicitly not requiring anything at all, and we probably can't override the behaviour you have because it is handled by SonarQube itself...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants