You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Jason Rose <ja...@meltmedia.com> on 2011/01/03 21:54:23 UTC

JAAS Issues with Karaf WAR on JBoss 5.0.1

Hello all,

I'm developing an application using Karaf 2.1.2 on JBoss 5.0.1.  The Karaf
demo module serves as the foundation of my application.  The war will build
and deploy just fine without modifications, but when I try to add
container-enforced authentication to the web.xml file, I run into JAAS
issues.

With the simplest case, I'm just protecting the path /internal/* with BASIC
auth.  I provide the users.properties and roles.properties files and make
sure my realm is defined in jboss' configuration.  If I deploy an empty war
with just these files and configuration, the container will challenge the
browser and accept the correct credentials.  However, if I include all of
karaf like in the web demo, the container will no longer accept the
credentials.  If I remove the JAAS jars from the startup.properties file, it
will again work but obviously SSHing into the karaf's console will no longer
work.

I'm not sure how to get both working simultaneously, and I was wondering if
anybody has been successful in this?

Thank you for your time.

Re: JAAS Issues with Karaf WAR on JBoss 5.0.1

Posted by Jason Rose <ja...@meltmedia.com>.
I didn't modify any properties files, no.
After removing karaf jaas from the bootdelegation property in
config.properties, nothing changed.

On Tue, Jan 4, 2011 at 12:32 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Jason,
>
> did you override something in the etc/org.apache.karaf.jaas.cfg file ?
> Could you try to remove the org.apache.karaf.jaas.boot package from the
> org.osgi.framework.bootdelegation in the etc/config.properties file ?
>
> Regards
> JB
>
>
> On 01/03/2011 09:54 PM, Jason Rose wrote:
>
>> Hello all,
>>
>> I'm developing an application using Karaf 2.1.2 on JBoss 5.0.1.  The Karaf
>> demo module serves as the foundation of my application.  The war will
>> build
>> and deploy just fine without modifications, but when I try to add
>> container-enforced authentication to the web.xml file, I run into JAAS
>> issues.
>>
>> With the simplest case, I'm just protecting the path /internal/* with
>> BASIC
>> auth.  I provide the users.properties and roles.properties files and make
>> sure my realm is defined in jboss' configuration.  If I deploy an empty
>> war
>> with just these files and configuration, the container will challenge the
>> browser and accept the correct credentials.  However, if I include all of
>> karaf like in the web demo, the container will no longer accept the
>> credentials.  If I remove the JAAS jars from the startup.properties file,
>> it
>> will again work but obviously SSHing into the karaf's console will no
>> longer
>> work.
>>
>> I'm not sure how to get both working simultaneously, and I was wondering
>> if
>> anybody has been successful in this?
>>
>> Thank you for your time.
>>
>>

Re: JAAS Issues with Karaf WAR on JBoss 5.0.1

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jason,

did you override something in the etc/org.apache.karaf.jaas.cfg file ?
Could you try to remove the org.apache.karaf.jaas.boot package from the 
org.osgi.framework.bootdelegation in the etc/config.properties file ?

Regards
JB

On 01/03/2011 09:54 PM, Jason Rose wrote:
> Hello all,
>
> I'm developing an application using Karaf 2.1.2 on JBoss 5.0.1.  The Karaf
> demo module serves as the foundation of my application.  The war will build
> and deploy just fine without modifications, but when I try to add
> container-enforced authentication to the web.xml file, I run into JAAS
> issues.
>
> With the simplest case, I'm just protecting the path /internal/* with BASIC
> auth.  I provide the users.properties and roles.properties files and make
> sure my realm is defined in jboss' configuration.  If I deploy an empty war
> with just these files and configuration, the container will challenge the
> browser and accept the correct credentials.  However, if I include all of
> karaf like in the web demo, the container will no longer accept the
> credentials.  If I remove the JAAS jars from the startup.properties file, it
> will again work but obviously SSHing into the karaf's console will no longer
> work.
>
> I'm not sure how to get both working simultaneously, and I was wondering if
> anybody has been successful in this?
>
> Thank you for your time.
>

Re: JAAS Issues with Karaf WAR on JBoss 5.0.1

Posted by Andreas Pieber <an...@gmail.com>.
Hey Jason,

Can you please verify if the problem is already fixed in the master? If not
please create an issue at https://issues.apache.org/jira/browse/KARAF that we do
not forget about this problem.

Thanks and kind regards,
andreas

On Mon, Jan 03, 2011 at 01:54:23PM -0700, Jason Rose wrote:
> Hello all,
> 
> I'm developing an application using Karaf 2.1.2 on JBoss 5.0.1.  The Karaf
> demo module serves as the foundation of my application.  The war will build
> and deploy just fine without modifications, but when I try to add
> container-enforced authentication to the web.xml file, I run into JAAS
> issues.
> 
> With the simplest case, I'm just protecting the path /internal/* with BASIC
> auth.  I provide the users.properties and roles.properties files and make
> sure my realm is defined in jboss' configuration.  If I deploy an empty war
> with just these files and configuration, the container will challenge the
> browser and accept the correct credentials.  However, if I include all of
> karaf like in the web demo, the container will no longer accept the
> credentials.  If I remove the JAAS jars from the startup.properties file, it
> will again work but obviously SSHing into the karaf's console will no longer
> work.
> 
> I'm not sure how to get both working simultaneously, and I was wondering if
> anybody has been successful in this?
> 
> Thank you for your time.