[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-core-dev] URL authentication in headless mode
|
Christophe, Michael,
Thanks a lot. This was indeed very helpful.
Regards,
Thomas Hallgren
Michael Valenta wrote:
Thomas,
The Platform/Core component does provide a means of caching usernames
and paswords in a keyring file (see Platform#addAuthenticationInfo).
The UI/Net plug-in provides a URL authenticator in the manner that
Christophe described (i.e. I don;t know if Christophe is aware that
the code he mentions has been moved to UI/Net). If you want to perform
headless authentication, you would need to provide your own
Authenticator and you could write it to cache that username and
password in the keyring. However, there are a couple of things to be
aware of:
1) The keyring is not a secure store unless Eclipse is started with
the -password command line option (hence the warning on the CVS
authentication dialog). In the future, Eclipse will probably move to
JAAS.
2) I could not find a description of when Java calls back to the
authenticator but it appears that Java calls the authenticator to
obtain a username and password and will not call the authenticator
again unless authentication fails. You would need to write your
authenticator in such a way that it only returns the cached
credentials the first time it was called and prompts on subsequent
calls (or fails if prompting was not possible). The Net/UI plug-in
does not cache passwords in the keyring because of these complications.
3) In case of failure, you would need to provide some way for your
users to change the cached credentials.
Hope this helps,
Michael
*Christophe Elek/Toronto/IBM@IBMCA*
Sent by: platform-core-dev-bounces@xxxxxxxxxxx
27/06/2007 09:30 AM
Please respond to
"Eclipse Platform Core component developers list."
<platform-core-dev@xxxxxxxxxxx>
To
"Eclipse Platform Core component developers list."
<platform-core-dev@xxxxxxxxxxx>
cc
platform-core-dev-bounces@xxxxxxxxxxx, Robert Dale
<robert.dale@xxxxxxxx>, "Eclipse Platform Core component developers
list." <platform-core-dev@xxxxxxxxxxx>
Subject
Re: [platform-core-dev] URL authentication in headless mode
Thomas,
I do not believe Eclipse provides such a mechanism, but I am 99.9% sure it
is technically feasible... if you create your own plugin
If I remember, the authentication is managed by an Authenticator
Authenticator.setDefault (new MyAuthenticator ());
If we manage to register a headless authenticator first, we should be able
to do what we want (meaning we have to code it...)
Check UpdateManagerAuthenticator for a sample
We may need to create our own bundle, that is executed first before any
update code is executed ?
Now, how do we access the keyring...
The code may have changed, but I used to access the Keystore of the
JVM...There may be some code around to show you
Check org.eclipse.update.internal.security.JarVerifier
So in a nutchell, create your osgi bundle, madify the ini to load your
bundle first, in the start register your authenticator, and from there
code
how you want to retrieve the uid/passwd
Does it help (somehow?)
Christophe Elek - Senior Software Analyst
IBM Rational Serviceability Architect
IBM Toronto Lab 8200 Warden Avenue, Markham, Ontario, L6G 1C7
Phone Number: (905) 413-3467
Email: celek@xxxxxxxxxx (Embedded image moved to file: pic06350.gif)
Web:http://www.ibm.com/software/rational/
From: Thomas Hallgren <thomas@xxxxxxx>
To: "Eclipse Platform Core component developers list."
<platform-core-dev@xxxxxxxxxxx>
Cc: Robert Dale <robert.dale@xxxxxxxx>
Date: 06/27/2007 06:17 AM
Subject: [platform-core-dev] URL authentication in headless mode
Hi,
We are trying to figure out the best way to access URL's that require
authentication from a headless execution environment. The environment
has access to the eclipse resource framework but not to any of the UI
components.
My question is, what capabilities can we reuse so that we avoid storing
names and passwords in multiple places? Can we use the Eclipse keyring
from headless mode? How is it accessed? Where do we find the API's?
Kind Regards,
Thomas Hallgren
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev