• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

JBoss Oracle Database Security

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I try to do authentication in JBoss with an Oracle DB.
The web form displays and can be filled in, but he always denies the access and goes back to the login.jsp page, although the correct username/password are in the DB.
I think it has something to do with the OracleDS. I think JBoss cannot find the datasource, althoug the declaration file is in the deploy dir.
Does anyone know what to do or what I have done wrong?
Thanks a lot,
***************** FILE oracle-ds.xml in <jboss>/server/default/deploy *****
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBoss Server Configuration for oracle -->
<!-- Checks the Oracle error codes and messages for fatal errors -->
********************** login-config.xml in <jboss>/server/default/conf **********
<application-policy name="MyWebRealm">
<login-module code="org.jboss.security.auth.spi.DataBaseServerLoginModule" flag="required">
<module-option name="dsJndiName">java:/OracleDS</module-option>
<module-option name="principalsQuery">SELECT password FROM users WHERE loginname=?</module-option>
<module-option name="rolesQuery">SELECT role, 'Roles' FROM userroles WHERE loginname=?</module-option>

*************** in my Web application: web.xml **************
<display-name>Security My Web Application</display-name>
<web-resource-name>LocalysWeb Security</web-resource-name>
<description>Restrict all access to this application</description>

<description>Only authorise users with the following roles defined.</description>

<description>Protection should be CONFIDENTIAL if SSL is installed (or NONE)</description>


    Bookmark Topic Watch Topic
  • New Topic