Currently there is no possibility to force the authentication on Add Hudson Instance dialog.
Consider the following use case:
Hudson is secured and would use project based security matrix. For some reason the Anonymous user needs to have read
permission. In this case NetBeans hudson plugin automatically to the hudson instance as Anonymous user and there is no
possibility to see those Jobs which require some authentication.
Currently the IDE only prompts for auth when it gets back a 403 from the server for some operation. (In fact it needs to
do at least one anon access so it can get a session cookie to log in to!) If $hudson/xml/api with no auth gives a 200
but an incomplete job list, that is arguably a problem in Hudson's design. Would rather have Hudson itself indicate in
the XML API that more could be seen with a login. TBD.
I've filed an issue with a proposed solution to Hudson.
Could IDE let user trigger authentication if he wants to (item in hudson service popup menu)?
(In reply to comment #2)
(In reply to comment #3)
> Could IDE let user trigger authentication if he wants to (item in hudson
> service popup menu)?
Should be possible, I think. Would certainly prefer for Hudson to indicate that authentication is needed to see everything.
Managed to write an action which lets you log in (even if Hudson does not request authentication to view any reachable page).
An outstanding problem is that if your login fails (e.g. incorrect password), it does not notice: ServletConnectionAuthenticator does not try to screen-scrape the output of /j_acegi_security_check, nor does it double-check /user/$username/configure to see if you are really logged in. Not clear if this problem can be fixed without introducing other problems in unusual setups, or if it is even worth fixing.
(In reply to comment #4)
> Now: http://issues.hudson-ci.org/browse/HUDSON-3924
Implemented in Hudson 2.1.0-SNAPSHOT; still open: https://issues.jenkins-ci.org/browse/JENKINS-3924
Integrated into 'main-golden'
User: Jesse Glick <email@example.com>
Log: #167585: action to log in.
Also displaying jobs inaccessible via current authentication (where supported).