Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » JAAS set-up
JAAS set-up [message #125249] Tue, 17 March 2009 12:12 Go to next message
Tiago Nunes is currently offline Tiago NunesFriend
Messages: 4
Registered: July 2009
Junior Member
Hello,

I'm trying to set up authorization and authentication in a RAP project,
using JAAS. I'm having trouble setting the platform up though.

The RAP target platform doesn’t include the org.eclipse.equinox.security
plugins. I installed them there manually (hoping it would be alright to do
so), and it solves a few issues, but now I’m having access restriction
problems with several classes that Eclipse is resolving in the
javax.security packages. For example, for the Callback class (with import
javax.security.auth.callback.Callback), I get:

Access restriction: The type Callback is not accessible due to restriction
on required library C:\Program Files\Java\jdk1.6.0_07\jre\lib\rt.jar

How should I set everything up to be able to use JAAS in a RAP application?

Thank you :-) Keep up the great work!

Tiago
Re: JAAS set-up [message #125294 is a reply to message #125249] Tue, 17 March 2009 13:50 Go to previous messageGo to next message
p-lex is currently offline p-lexFriend
Messages: 18
Registered: July 2009
Junior Member
Try to add the package of this type Callback in the plugin manifest under
"Imported Packages" in the Dependencies Tab of the manifest editor.

I hope it works, i had a simular problem with an other Class.

best regards,

p-lex
Re: JAAS set-up [message #125332 is a reply to message #125294] Tue, 17 March 2009 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: roland.muecke.itemis.de

p-lex schrieb:

> Try to add the package of this type Callback in the plugin manifest
> under "Imported Packages" in the Dependencies Tab of the manifest editor.

If you add the plugin org.eclipse.equinix.security unter "Required
plugins" and enable option "Reexport this dependency" you get the import
of "javax.security.auth.callback" and many other imports for free.

Wheter this is a good idea may be debatable, but it eases developement
of JAAS login modules.

If the access restriction problem persists check your execution
environment. Maybe it is not sufficient to provide the javax.security
packages (see http://www.eclipsezone.com/eclipse/forums/t97259.html).


--
Roland Mücke
Consultant & Coach

itemis AG
Niederlassung Leipzig
Ludwig-Erhard-Straße 51
04103 Leipzig

Rechtlicher Hinweis:
Registergericht: Amtsgericht Dortmund HRB 20621
Sitz der Gesellschaft: 44536 Lünen, Am Brambusch 15-24
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Prof. Dr. Burkhard Igel (Vorsitzender), Stephan Grollmann,
Michael Neuhaus
Re: JAAS set-up [message #125342 is a reply to message #125332] Tue, 17 March 2009 15:46 Go to previous messageGo to next message
Tiago Nunes is currently offline Tiago NunesFriend
Messages: 4
Registered: July 2009
Junior Member
Roland Mücke wrote:

> p-lex schrieb:

>> Try to add the package of this type Callback in the plugin manifest
>> under "Imported Packages" in the Dependencies Tab of the manifest editor.

> If you add the plugin org.eclipse.equinix.security unter "Required
> plugins" and enable option "Reexport this dependency" you get the import
> of "javax.security.auth.callback" and many other imports for free.

p-lex, Roland, thank you for your replies. I experimented with both your
hints, but the javax.security.* packages do not appear as options in the
Imported Packages dialog in either way. I tried adding them manually in
the MANIFEST.MF file, but even though Eclipse did not complain about it, I
still have the same issue.

> If the access restriction problem persists check your execution
> environment. Maybe it is not sufficient to provide the javax.security
> packages (see http://www.eclipsezone.com/eclipse/forums/t97259.html).

My execution environment for this plug-in is OSGI/Minimum-1.1. Thank you
for the link Roland, I will investigate.
Re: JAAS set-up [message #125834 is a reply to message #125342] Fri, 20 March 2009 15:56 Go to previous messageGo to next message
Tiago Nunes is currently offline Tiago NunesFriend
Messages: 4
Registered: July 2009
Junior Member
Tiago Nunes wrote:

> Roland Mücke wrote:

>> If the access restriction problem persists check your execution
>> environment. Maybe it is not sufficient to provide the javax.security
>> packages (see http://www.eclipsezone.com/eclipse/forums/t97259.html).

> My execution environment for this plug-in is OSGI/Minimum-1.1. Thank you
> for the link Roland, I will investigate.

Still no luck. Apparently OSGI/Minimum-1.1 is not sufficient, and CDC
would be. Is this a valid workaround? Will I be able to deploy the plug-in
onto an equinox container?

TIA,

Tiago
Re: JAAS set-up [message #125918 is a reply to message #125834] Mon, 23 March 2009 11:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: roland.muecke.itemis.de

Tiago Nunes schrieb:

>>> If the access restriction problem persists check your execution
>>> environment. Maybe it is not sufficient to provide the javax.security
>>> packages (see http://www.eclipsezone.com/eclipse/forums/t97259.html).
>
>> My execution environment for this plug-in is OSGI/Minimum-1.1. Thank
>> you for the link Roland, I will investigate.
>
> Still no luck. Apparently OSGI/Minimum-1.1 is not sufficient, and CDC
> would be. Is this a valid workaround? Will I be able to deploy the
> plug-in onto an equinox container?

I think so. Depending on the installed JRE your equinox may support even
JavaSE-1.6.

Roland


--
Roland Mücke
Consultant & Coach

itemis AG
Niederlassung Leipzig
Ludwig-Erhard-Straße 51
04103 Leipzig

Rechtlicher Hinweis:
Registergericht: Amtsgericht Dortmund HRB 20621
Sitz der Gesellschaft: 44536 Lünen, Am Brambusch 15-24
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Prof. Dr. Burkhard Igel (Vorsitzender), Stephan Grollmann,
Michael Neuhaus
Re: JAAS set-up [message #126145 is a reply to message #125918] Tue, 24 March 2009 16:07 Go to previous messageGo to next message
Tiago Nunes is currently offline Tiago NunesFriend
Messages: 4
Registered: July 2009
Junior Member
Thank you Roland.

I am getting closer, changing the execution environment to CDC Foundation
(1.1) gave me access to some classes (e.g ILoginContext and
LoginContextFactory in org.eclipse.equinox.security.auth).

I still don't have access to Callback, CallbackHandler or
UnsupportedCallbackException, for example.

I am requiring the plug-ins org.eclipse.equinox.security and
org.eclipse.equinox.security.ui. Are there others that I should require?

I find it interesting that other people have managed to implement this use
case without mentioning these issues, there must be something I have
overlooked.

Thank you,

Tiago
Re: JAAS set-up [message #126221 is a reply to message #126145] Wed, 25 March 2009 10:41 Go to previous message
Eclipse UserFriend
Originally posted by: roland.muecke.itemis.de

Tiago Nunes schrieb:

> I am getting closer, changing the execution environment to CDC
> Foundation (1.1) gave me access to some classes (e.g ILoginContext and
> LoginContextFactory in org.eclipse.equinox.security.auth).
> I still don't have access to Callback, CallbackHandler or
> UnsupportedCallbackException, for example.
>
> I am requiring the plug-ins org.eclipse.equinox.security and
> org.eclipse.equinox.security.ui. Are there others that I should require?

Maybe you should check your project settings, especially the JRE System
Library in the Java Build Path. The Execution Environment specified in
MANIFEST.MF does not influence which JDK eclipse uses for compliling.

In order to use JAAS you need at least JDK 1.4.2.

Roland


--
Roland Mücke
Consultant & Coach

itemis AG
Niederlassung Leipzig
Ludwig-Erhard-Straße 51
04103 Leipzig

Rechtlicher Hinweis:
Registergericht: Amtsgericht Dortmund HRB 20621
Sitz der Gesellschaft: 44536 Lünen, Am Brambusch 15-24
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Prof. Dr. Burkhard Igel (Vorsitzender), Stephan Grollmann,
Michael Neuhaus
Previous Topic:Adding link to browser bookmarks
Next Topic:SingleSourcing - Replacement of Widget.notifyListeners
Goto Forum:
  


Current Time: Thu Apr 18 05:44:05 GMT 2024

Powered by FUDForum. Page generated in 0.02087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top