RE: JAAS on JBoss

thumbnail
Florian Huber, modified 14 Years ago. Junior Member Posts: 29 Join Date: 3/23/11 Recent Posts
Hi
I'm trying to enable JAAS on JBoss, if I Login i get a
java.lang.IllegalStateException: Application Policy is null for the security domain:\PortalRealm
(without the backslash, just escapeing the smiley) Exception.

I have the follwing portlet.ext.properties:

#JAAS STUFF
portal.configuration=false
portal.jaas.enable=true
portal.impersonation.enable=false


I also tried to add a DatabaseLoginModule from JBoss, which doesn't poroduce the exception, but if I login with the right user/pw I'm like an unauthentificated user, but it recocnizes unknown users/passwords.

Has anybody setted up JAAS on JBoss sucessfully (or has anybody a tutorial). Any help is welcome!
thumbnail
Florian Huber, modified 14 Years ago. Junior Member Posts: 29 Join Date: 3/23/11 Recent Posts
I have found a bug LPS-2582 wich seems to be related
Hiran Chaudhuri, modified 14 Years ago. Regular Member Posts: 188 Join Date: 9/1/10 Recent Posts
Florian Huber:
I also tried to add a DatabaseLoginModule from JBoss, which doesn't poroduce the exception, but if I login with the right user/pw I'm like an unauthentificated user, but it recocnizes unknown users/passwords.

Has anybody setted up JAAS on JBoss sucessfully (or has anybody a tutorial). Any help is welcome!

It seems you have authentication running and just authorization is missing.

But then this is actually one class that you need: The LoginModule.
I created one myself which on one side speaks JBoss LoginModule API and on the other side queries Liferay UserLocalServiceUtil.
If you make it an extra jar file you can plug it into Liferay when required, without modification of existing code or any further dependencies.
thumbnail
Florian Huber, modified 14 Years ago. Junior Member Posts: 29 Join Date: 3/23/11 Recent Posts
Hiran Chaudhuri:
But then this is actually one class that you need: The LoginModule.
I created one myself which on one side speaks JBoss LoginModule API and on the other side queries Liferay UserLocalServiceUtil.
If you make it an extra jar file you can plug it into Liferay when required, without modification of existing code or any further dependencies.


I have forgotten this thread, normaly i post a solution if I found one!

I have also created a LoginModule (extends Authentificator). This one is like the LDAP one generic to auth against JAAS. It has also a simple UserRole Mapping in it, maybe I will extend if needed.

If anybody needs this, I will provide the full source.

Greetings Florian Huber
thumbnail
Hitoshi Ozawa, modified 14 Years ago. Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
I have the follwing portlet.ext.properties:


I hope that this was just a typing error. The file name should be portlet-ext.properties
thumbnail
Florian Huber, modified 14 Years ago. Junior Member Posts: 29 Join Date: 3/23/11 Recent Posts
yeah, is an typo, sorry!
thumbnail
Hitoshi Ozawa, modified 14 Years ago. Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
Great to hear that it was just a typo and you've solved the problem. Wasn't too sure if the problem was still occurring.