Note that there are some explanatory texts on larger screens.

plurals
  1. POJAAS web-security on jboss 5
    primarykey
    data
    text
    <p>hello i'm trying to perform a based form authentication on jboss: these are my configuration files. login-config.xml:</p> <pre><code>&lt;application-policy name="MyPolicy"&gt; &lt;authentication&gt; &lt;login-module flag="required" code="org.jboss.security.auth.spi.DatabaseServerLoginModule"&gt; &lt;module-option name="dsJndiName"&gt;java:/espritDS&lt;/module-option&gt; &lt;module-option name="principalsQuery"&gt;SELECT password FROM users WHERE username=?&lt;/module-option&gt; &lt;module-option name="rolesQuery"&gt;SELECT groupname FROM groups WHERE username=?&lt;/module-option&gt; &lt;/login-module&gt; &lt;/authentication&gt; </code></pre> <p></p> <p>web.xml:</p> <pre><code>&lt;!-- Security --&gt; &lt;security-constraint&gt; &lt;web-resource-collection&gt; &lt;web-resource-name&gt;secret&lt;/web-resource-name&gt; &lt;url-pattern&gt;/faces/secret/*&lt;/url-pattern&gt; &lt;/web-resource-collection&gt; &lt;auth-constraint&gt; &lt;role-name&gt;admin&lt;/role-name&gt; &lt;/auth-constraint&gt; &lt;/security-constraint&gt; &lt;login-config&gt; &lt;auth-method&gt;FORM&lt;/auth-method&gt; &lt;form-login-config&gt; &lt;form-login-page&gt;/faces/login.jsp&lt;/form-login-page&gt; &lt;form-error-page&gt;/faces/loginError.jsp&lt;/form-error-page&gt; &lt;/form-login-config&gt; &lt;/login-config&gt; &lt;security-role&gt; &lt;role-name&gt;admin&lt;/role-name&gt; &lt;/security-role&gt; </code></pre> <p>and jboss-web.xml:</p> <pre><code>&lt;jboss-web&gt; &lt;!-- A security domain that restricts access --&gt; &lt;security-domain&gt;java:/jaas/MyPolicy&lt;/security-domain&gt; &lt;/jboss-web&gt; </code></pre> <p>i thought i don't need to setup users and roles files since i have a database where i inserted some users and roles but i'm having this exception and didn't manage to deal with it: 11:57:26,587 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload