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.
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.
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
From my perspective it would be better if NbAuthenticator didn't exist.
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?
It blocks web feature issue 46123 (planned for 4.2). Could this issue be somehow resolved (e.g. by removing NbAuthenticator class)? Thanks.
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.
> 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.
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.
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!