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

Authentication Issue with 'open' Sonar having some protected projects #53

Closed
fwelland opened this issue Nov 7, 2016 · 4 comments
Closed

Comments

@fwelland
Copy link

fwelland commented Nov 7, 2016

HI,

I have a sonar whose landing page is un-authenticated and projects and their owners can choose to have sonar stuff public to everyone or private accessible via credentials.

So when I use radar -- it naturally gives me a list of only the projects that are publicly available. However, much if not all the stuff I want to radar on are in projects that I can only see after authentication.

There is no way to provide credentials to radar if the main URL is NOT password protected. So I am kinda stuck. I there anyway around this?

I have hacked around with the done() routine in: src/main/java/qubexplorer/ui/task/TaskExecutor.java and can pull off some trickery to get it to prompt for user/password and even load a list of projects -- that include the private/auth only projects. However, selecting a project causes a project not found issue. I don't know if that is related to my hacks or some other issue.

So is there anyway to specify credentials or force a prompt for credentials to work around this issue?

@hmvictor
Copy link
Owner

Hi, this issue is related to this: #50

I'm currently designing some changes for solving it and hope to resolve it soon.

Thank you.

@hmvictor
Copy link
Owner

@fwelland I'm adding input for credentials when choosing a project from the list.

Work is in the 2.7 branch if you want to try it.

@fwelland
Copy link
Author

hmm...not good. Just tried this. Keep in mind I am doing gradle projects.

So this is what I got (after restarting netbeans after the 2.7 snapshot nbm install -- and right clicking on the project node to get context menu):

INFO [org.netbeans.core.startup.layers.BinaryFS]: value = qubexplorer.ui.Bundle#AdvancedOption_DisplayName_SonarQube from OptionsDialog/Advanced/qubexplorer-ui-SonarQubeOptionsPanelController.instance java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key AdvancedOption_DisplayName_SonarQube at java.util.ResourceBundle.getObject(ResourceBundle.java:450) [catch] at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:719) at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:549)

The whole context menu wouldn't display and even the settings->Misc->Sonar Qube tab was gone.

I built this via cloning the repo; checkout the 2.7 branch and using netbeans to "Build With Dependencies" on that branch.

On a whim, I decided to reload the radar-netbeans project and clean then clean and build; and installed that resulting nbm.

Much better. I guess my first build was a bogus build of the nbm or something.

I can now list issues and see a summary display of issues from server. This seems accurate.

However when I click on a issue I get a stack trace:

ubexplorer.NoSuchProjectException at qubexplorer.server.SonarQube.getIssues(SonarQube.java:103) at qubexplorer.ui.issues.IssuesTask.execute(IssuesTask.java:30) at qubexplorer.ui.issues.IssuesTask.execute(IssuesTask.java:17) at qubexplorer.ui.task.TaskExecutor$TaskWorker.doInBackground(TaskExecutor.java:71) at javax.swing.SwingWorker$1.call(SwingWorker.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at javax.swing.SwingWorker.run(SwingWorker.java:334) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [catch] at java.lang.Thread.run(Thread.java:745)

@hmvictor
Copy link
Owner

hmvictor commented Jul 4, 2017

Related to change in the format of project keys in SonarQube. Fixed now..

@hmvictor hmvictor closed this as completed Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants