Bug 148831 - Provide an extension point or a service around Authenticator
Summary: Provide an extension point or a service around Authenticator
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 22108 174129 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-27 11:32 EDT by Pascal Rapicault CLA
Modified: 2019-09-06 04:25 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2006-06-27 11:32:15 EDT
The Authenticator mechanism of java has not been designed with replaceability in mind (only one authenticator can be specified in the system, note that it can be replaced). Therefore people are fighting over the setting which sometimes results in failing authentication.
In order to avoid this problem, I think eclipse should provide an extensibility mechanism around the authenticator.
Comment 1 John Arthorne CLA 2006-06-27 15:12:27 EDT
*** Bug 22108 has been marked as a duplicate of this bug. ***
Comment 2 Jeff McAffer CLA 2006-06-27 15:56:11 EDT
can you add more detail here about hte Authenticator?  What is it?  Where is it? what is it used for?  how does it affect us or Eclipse developers/users?
Comment 3 Pascal Rapicault CLA 2006-07-05 16:16:41 EDT
To clarify, I'm talking about the java.net.Authenticator class. It is used to "represents an object that knows how to obtain authentication for a network connection. Usually, it will do this by prompting the user for information." (from the spec: http://java.sun.com/j2se/1.4.2/docs/api/).

In the JRE itself, it is used by the implementation of http to get the user information when connecting to a secure server or when login information is requested. 

It affect eclipse because it is a singleton and various plug-ins fight over it, which cause authentication to fail if the wrong Authenticator is used (from the javadoc: Applications use this class by creating a subclass, and registering an instance of that subclass with the system with setDefault()).
Comment 4 Thomas Watson CLA 2006-07-06 12:17:24 EDT
This is similar to the singleton aspect of URLStreamHandlerFactory.  In OSGi the URLStreamHandlerFactory is supported by a singleton object that proxies the calls to services registered with the framework.

I know next to nothing about the Authenticator API but a quick look at the class indicates that a similar thing could be done.  The approach would use a "white board" model.  I would prefer to use an extension point vs the service registry to support something like this.  Extensions could specify the protocol they support, or maybe some of the other arguments passed to 

requestPasswordAuthentication(
  InetAddress addr,int port,String protocol,String prompt,String scheme)
Comment 5 Christophe Elek CLA 2006-07-06 12:23:55 EDT
I think we looked at a similar approach based on realm.
The issue will then be userid/password management ala Single Sign On
then the other one will be: what is multiple people register the same realm

The *easy* way is to force a UI/Headless Authenticator in eclipse. 
But then we will need to manage the uid/password somehow unless we want prompt the user *everytime* we get a 407
Comment 6 John Arthorne CLA 2007-02-16 09:59:07 EST
*** Bug 174129 has been marked as a duplicate of this bug. ***
Comment 7 Phill Perryman CLA 2007-02-16 11:10:54 EST
The duplicate was raised as part of the bug to consolidate to a single preference page (bug 154100) for proxy settings.
The platform should provide an authenticator which first checks the settings on the common preference page. If that fails it should consult any registered (via extension) authenticators to see if they will return a username/password. If not it should prompt the user via a dialog for a username and password which it should cache in memory.
The Platform should also provide a persistance store for username/password with an API so that plug-ins can store username and password. These would be consulted by the platform authenticator. This would aviod having to load plug-ins which needed to provide authentication that they have already obtained.
Comment 8 Lars Vogel CLA 2019-09-06 04:25:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it and remove the stalebug whiteboard tag. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.