• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JAAS with JBOSS

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Trying to get JAAS up and running with JBOSS 3.2.6 (including tomcat),
I'm using FORM authentication, I've declared the login.jsp correctly, I've got my login-config.xml defined, I've declared the relevant security-constraint and the security role in web.xml, I've put the security-domain in the jboss-web.xml etc etc.
When I try to login using my login.jsp I always get the access denied page ie the authentication isn't working.
Everything that should happen seems to happen, I can see JBOSS attempting the authentication, the debug output is :


The application-policy declared in my login-config.xml uses DatabaseServerLoginModule and ClientLoginModule. I want to be able to call some EJBs following authentication and I understand that I need ClientLoginModule in order to avoid having to authenicate over again when I call something in the EJB container. The principlesQuery and rolesQuery are both correct. I know that the username password I'm supplying are valid because I've written some test code to see if I can login and when I look at the debug statements in my code I can clearly see a Subject populated with Principals one of which corresponds to the username password I'm supplying.

I'm unsure of the role of the auth.conf file in all of this, is it relevant when I'm using tomcat deployed inside JBOSS? Is there anything else I missed?
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without codes and configuration files data, it's hard to pinpoint the exact problem. Maybe it isn't a problem at the first place. It could be your JAAS is actually working, therefore disallowing access to the very pages you wanted to protect.

I'm currently implementing JAAS using the JBossSX. Most of the instruction I obtained are from this JavaWorld page. I've got others as well which gave me information I couldn't find directly from there. As there is quite a number of these websites, let's see how you do with the info from the JavaWorld page first.

Good luck. Keep us posted. If the problem persists, your configuration files would help a long way in letting others to understand your problem.
 
Acetylsalicylic acid is aspirin. This could be handy too:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic