This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 46331 - NbAuthenticator doesn't make possible to obtain supplied username and password
Summary: NbAuthenticator doesn't make possible to obtain supplied username and password
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2004-07-20 13:34 UTC by Sherold Dev
Modified: 2008-12-22 17:12 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sherold Dev 2004-07-20 13:34:55 UTC
NbAuthenticator should provide a way how to obtain
supplied username and password after successful
authentication. Without this possibility, there is
currently no way how to save those values. See
issue 46123.

It is required to associate username and password
with the particular connection (based on host,
port and prompt string for example) to prevent
obtaining u/p from another connection.
Comment 1 _ ttran 2004-07-20 14:27:34 UTC
this is API RFE not a bug.  too late to do anything for Promotion D. 
You'll have to find a way how to work around the limitation in your module
Comment 2 Sherold Dev 2004-07-20 16:53:30 UTC
From my perspective it would be better if NbAuthenticator didn't exist.
Comment 3 Pavel Buzek 2005-03-23 16:32:12 UTC
Ok, not promoD. When can the future be expected to come? :-)

We are still having problems related to this (see issue 56814). 
Is is going to be fixed or you consider this invalid?
Comment 4 zikmund 2005-05-12 14:35:35 UTC
It blocks web feature issue 46123 (planned for 4.2). Could this issue be somehow
resolved (e.g. by removing NbAuthenticator class)? Thanks.
Comment 5 Petr Nejedly 2005-05-12 14:38:49 UTC
I know very little about NbAuthenticator.
It may make sense to remove it from core completly and let some module provide
its own, considering that very few people seriously use internal web browser for
browsing random password protected sites.
Will think about it for 4.2

Anyway, any module can in fact install their own authenticator that will
override core's one. Any module can even install null authenticator if they wish.
Comment 6 Sherold Dev 2005-05-12 17:40:04 UTC
> Anyway, any module can in fact install their own authenticator that will
> override core's one. Any module can even install null authenticator if they wish.

This is actually what the appserver plugin does. It registers it own
authenticator, however, it is just a workaround which does not work for other
plugins. There was a suggestion to move it to the j2eeserver but it wouldn't
work too. Here is a snippet from the previous discussion:

> I don't think that we should move the Authenticator (the ask for password
> dialog) to j2eeserver. Saving username and password from this Authenticator
> would not work reliably since the only info the Authenticator has about the http
> connection is host name, port number and the prompt string. With this info we
> cannot say for sure to which server instance this username & password belongs. 
> 
> Sticking with the current heuristic which is: take all registered server
> instances and if host name and port number match those from the Authenticator
> change the username and password for such instance, will result in new issues. 
> 
> Here is an example: have an appserver and an external tomcat installed, both
> sharing the same port 8080. Now, if the authenticator pops up its dialog when
> starting the appserver and you choose to store username and password these
> values will be set for tomcat as well. Next time you will start tomcat, the
> authentication dialog will appear again since the appserver's u/p will not work.

Btw, if we registered the null authenticator it would disable the default
NbAuthenticator and in such case there would be no point in having it at all, I
assume.
Comment 7 Petr Nejedly 2005-06-01 13:20:48 UTC
So what do you suggest and what's your request?

> Btw, if we registered the null authenticator it would disable the default
> NbAuthenticator and in such case there would be no point in having it
> at all, I assume.

Disagreed. Believe it or not, some users are running the IDE (or platform)
without your modules, and for such users, having some working Authenticator
installed by default is usefull.

Based on the previous discussion, I came to conclusion it is best to leave
NbAuthenticator in place and working as of now. You can register your own,
platform users have one good enough. For different plugins, you can create an
SPI in your j2eeserver module, but having two services configured for the same
port is not nice setup anyway.

Please reopen if you disagree.
Comment 8 zikmund 2005-06-02 13:51:04 UTC
OK, J2EE module will register its own NbAuthenticator which will pass non-server
connections to the general one.
Nothing is needed in core.

Thanks Petre for your help!