Bug 197284 - Unmotivated prompt for proxy login
Summary: Unmotivated prompt for proxy login
Status: CLOSED DUPLICATE of bug 312228
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.5   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 247279 252056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-20 07:53 EDT by Martin Kunert CLA
Modified: 2010-07-07 08:35 EDT (History)
8 users (show)

See Also:


Attachments
completion.jpg (355.89 KB, image/jpeg)
2008-05-28 03:34 EDT, Martin Kunert CLA
no flags Details
prompt.jpg (41.64 KB, image/jpeg)
2008-05-28 03:35 EDT, Martin Kunert CLA
no flags Details
proxySettings.jpg (158.88 KB, image/jpeg)
2008-05-28 03:35 EDT, Martin Kunert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kunert CLA 2007-07-20 07:53:39 EDT
Build ID: I20070625-1500

I set the proxy configuration since I wanted to install and update eclipse itself and several eclipse plugins.
But during continous work with eclipse it prompts for the proxy login and password even if a never clicked on install/update. This interrupts my work and disturbs seriously.
Comment 1 Martin Kunert CLA 2008-05-27 05:00:22 EDT
I recognised that the prompt appears after I pressed Strg + Space for the code completition.
Comment 2 Pascal Rapicault CLA 2008-05-27 21:47:47 EDT
This could be caused when we are looking up for the javadoc.
Comment 3 Dani Megert CLA 2008-05-28 02:52:36 EDT
Yes, if there is no source attached and an URL configured for Javadoc then we will open a connection to that URL.

What password for what? How many times does it ask? Can you attach a screen shot?
Comment 4 Martin Kunert CLA 2008-05-28 03:34:44 EDT
Created attachment 102308 [details]
completion.jpg
Comment 5 Martin Kunert CLA 2008-05-28 03:35:06 EDT
Now I found a reproducable procedure:
The Proxy is set acoording to proxySettings.jpg. The prompt appears even if I set username and password there.

1. Enter 'Mem' and press Strg+Space for Word-Completion.
2. For a very short moment the correct list of completions is shown, but then the prompt for entering username and password for the http proxy appears (see prompt.jpg)
3. After entering username and password it works properly and the completion can be used correctly after pressing Strg+Space again (see completion.jpg)

There are no URLs to any javadoc set.
For some of the classes in the completion list there is source attached.
Comment 6 Martin Kunert CLA 2008-05-28 03:35:33 EDT
Created attachment 102309 [details]
prompt.jpg
Comment 7 Martin Kunert CLA 2008-05-28 03:35:55 EDT
Created attachment 102310 [details]
proxySettings.jpg
Comment 8 Dani Megert CLA 2008-05-28 03:40:21 EDT
But you are only asked once, right?
Comment 9 Martin Kunert CLA 2008-05-28 04:22:57 EDT
(In reply to comment #8)
> But you are only asked once, right?
> 

I'm asked since I once enter my correct username and password
Comment 10 Dani Megert CLA 2008-05-28 04:34:02 EDT
Sorry, I don't quite understand your last answer.
Comment 11 Martin Kunert CLA 2008-05-28 06:31:34 EDT
(In reply to comment #10)
> Sorry, I don't quite understand your last answer.
> 

The prompt appears as long as I do not enter the correct login. If I cancel the prompt it would appear again (at Strg+Space) and I would never be able to use word completion.
If I enter the correct login the prompt does not appear for the current Eclipse session and I can use word completion.

To my mind the prompt should never appear if I configured the proxy settings correctly with username and password, like I did.
Comment 12 John Arthorne CLA 2008-05-28 10:07:30 EDT
You'll get this prompt if there is a URL.openStream on a site that requires authenticated login. This comes from the java.net.Authenticator hook added by org.eclipse.ui.net. Is there any way the user can configure it to not look for javadoc, or to configure where javadoc comes from?
Comment 13 Dani Megert CLA 2008-05-28 10:16:12 EDT
>You'll get this prompt if there is a URL.openStream on a site that requires
>authenticated login.
Why? Shouldn't it take the user and password from the preference? Moving to UI.

>Is there any way the user can configure it to not look for
>javadoc, or to configure where javadoc comes from?
Yes, on each JAR you can configure source and Javadoc locations.
Comment 14 John Arthorne CLA 2008-05-28 10:20:20 EDT
Bug 229374 covers using secure storage to store/retrieve authenticated login details. I think this bug can be closed as "working as designed". Martin, you must have a JAR in your workspace that has a javadoc or source location set to a URL that requires authenticated login.
Comment 15 Dani Megert CLA 2008-05-28 10:26:35 EDT
John, I think Martin's problem is that he has defined a proxy via Eclipse settings and he gave the user and password there. But at the time the proxy is needed we ask for the password instead of using the information provided in the preferences.
Comment 16 John Arthorne CLA 2008-05-28 10:28:27 EDT
Ok, I'm not familiar with how that proxy login information is used. Moving to Team for comment.
Comment 17 Martin Kunert CLA 2008-05-28 10:33:44 EDT
(In reply to comment #14)
> Bug 229374 covers using secure storage to store/retrieve authenticated login
> details. I think this bug can be closed as "working as designed". Martin, you
> must have a JAR in your workspace that has a javadoc or source location set to
> a URL that requires authenticated login.

Unfortunately not. All references to source or javadoc in my classpath are set relatively to one project in the eclipse workspace, locally on the harddrive.
May there be other references from other external libraries to www urls?
Comment 18 Michael Valenta CLA 2008-05-28 10:43:20 EDT
Does the javadoc support use java's URL support to retrieve the javadoc? If so, then you will be prompted once per session. The reason is that the Java support for authentication does not differentiate a failed login from an initial login attempt so clients have now way of knowing whether they can supply cached information or if new information is required.

The Authenticator registered by the Net plug-in could be smarter and supply the cached information the first time it is called and prompt if it is asked again. This makes the assumption that the Java URL support caches the password once it gets it which seems to be the case but is not documented as part of the API.
Comment 19 Dani Megert CLA 2008-05-28 10:48:26 EDT
>May there be other references from other external libraries to www urls?
Are you sure rt.jar for example has source and/or Javadoc locally?

>so clients have now way of knowing whether they can supply cached
>information or if new information is required.
Why cached? I would expect that for the first try the password from the prefs is used and that this just works. Of course if the pw is wrong then a dialog is needed.

>Does the javadoc support use java's URL support to retrieve the javadoc?
Adding Olivier who implemented this in JDT Core land.
Comment 20 Martin Kunert CLA 2008-06-03 06:41:45 EDT
(In reply to comment #19)
> >May there be other references from other external libraries to www urls?
> Are you sure rt.jar for example has source and/or Javadoc locally?
> >so clients have now way of knowing whether they can supply cached
> >information or if new information is required.
> Why cached? I would expect that for the first try the password from the prefs
> is used and that this just works. Of course if the pw is wrong then a dialog is
> needed.
> >Does the javadoc support use java's URL support to retrieve the javadoc?
> Adding Olivier who implemented this in JDT Core land.

You were right, the packages from the choosen JRE have had javadoc attached. I removed it now it works.
But I'd like to raise this behaviour as improvement: If I set my proxy settings properly the word completion should not prompt for username and password again.
Comment 21 John Arthorne CLA 2008-09-16 11:54:41 EDT
*** Bug 247279 has been marked as a duplicate of this bug. ***
Comment 22 Emil Obermayr CLA 2008-09-16 15:00:35 EDT
the authentication for the proxy is asked every time even for regular updates; see 247279

I hardly can find a case where the information in the preferences is used; looks like a real bug in the handling of a proxy

just to make that clear: we are talking about authentication to my local proxy and not about authentication to a remote server, right?
Comment 23 John Arthorne CLA 2008-10-26 22:36:17 EDT
*** Bug 252056 has been marked as a duplicate of this bug. ***
Comment 24 Martin Kunert CLA 2008-12-19 03:19:47 EST
(In reply to comment #22)
> the authentication for the proxy is asked every time even for regular updates;
> see 247279
> 
> I hardly can find a case where the information in the preferences is used;
> looks like a real bug in the handling of a proxy
> 
> just to make that clear: we are talking about authentication to my local proxy
> and not about authentication to a remote server, right?
> 

Yes, it's the local proxy of our business site. 

It would be great of you could solve this bug soon, since typing the proxy authentication after each start of eclipse twice is very unhandy.
Comment 25 Martin Kunert CLA 2009-06-24 11:57:08 EDT
I checked it again in 20090619-0625. Works good, if you use Manual Proxy Settings.
THX
Comment 26 Martin Kunert CLA 2010-07-07 08:11:05 EDT
(In reply to comment #25)
> I checked it again in 20090619-0625. Works good, if you use Manual Proxy
> Settings.
> THX

I just downloaded and installed Helios. Unfortunately I found another procedure which does not work:
- Start Eclipse
- Mouse over e.g. import java.io.File
- Proxy Authentication appears
Seems as if the hovers do not use the proxy settings either.

By the way, the content assist does not work either, this bug is still not solved.

The Eclipse Preferences should be used for all Internet access:
- Javadoc
- Hovers
- Content Assist

Please fix this soon, I'm going crazy with this.

THX
Comment 27 Pawel Pogorzelski CLA 2010-07-07 08:35:01 EDT
This is tracked on bug 312228. Marking as a duplicate of a bug with higher number since the code chages are discussed there.

*** This bug has been marked as a duplicate of bug 312228 ***