You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Basic Danijel <da...@gmail.com> on 2015/03/08 17:14:09 UTC

One login for web app and underlying REST webservice

Hi all,

I'm currently developing web app running on karaf. The app has the frontend
written in Angular JS and the backend is REST webservice (CXF JAX-RS).

The requirement is that all pages have to be secured. I decided to go with
FORM based authentication (configured in web.xml).
For CXF REST webservice I
use org.apache.cxf.jaxrs.security.JAASAuthenticationFilter (configured in
blueprint.xml).

Both parts are configured to use the same realm.

The problem is the following: when I try to access a protected page, I need
to log in twice (server and cxf authentication).

How can I get rid of this problem, ie. to have only server authentication
(and automatically be authenticated on REST part)?

Btw, if I use BASIC authentication, then one login appears and everything
is working as expected.

Regards,
Danijel