<span class="gmail_quote"></span><br>
Hi,<br><br>I have implemented BASIC authentication on JBossAS successfully. But when I want to use DIGEST authentication, it does not work.
<br>I have done according to <span style="color: rgb(255, 0, 0); font-weight: bold;">
<a href="http://docs.jboss.org/jbossas/guides/webguide/r2/en/html_single/#d0e708" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://docs.jboss.org/jbossas/guides/webguide/r2/en/html_single/#d0e708
</a></span> but it not works.<br><br>I have added a security policy in 
jboss-4.0.5.GA\server\default<div>\conf\login.config.xml,<br>&nbsp;&nbsp; <br><span style="color: rgb(0, 0, 153);">&lt;application-policy name = &quot;ProWS&quot;&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;authentication&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;login-module code=&quot;org.jboss.security.auth.spi.UsersRolesLoginModule&quot; flag = &quot;required&quot;&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;usersProperties&quot;&gt;props/ProWS-users.properties&lt;/module-option&gt;</span><br style="color: rgb(0, 0, 153);">



<span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;rolesProperties&quot;&gt;props/ProWS-roles.properties&lt;/module-option&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;hashAlgorithm&quot;&gt;MD5&lt;/module-option&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;hashEncoding&quot;&gt;rfc2617&lt;/module-option&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;hashUserPassword&quot;&gt;false&lt;/module-option&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;hashStorePassword&quot;&gt;true&lt;/module-option&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;passwordIsA1Hash&quot;&gt;true&lt;/module-option&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;module-option name=&quot;storeDigestCallback&quot;&gt;org.jboss.security.auth.spi.RFC2617Digest&lt;/module-option&gt;</span>


<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/login-module&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/authentication&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp; &lt;/application-policy&gt;</span><br clear="all"><br>I have added users in jboss-4.0.5.GA\server\default\conf\props\ProWS-users.properties,<br><br><span style="color: rgb(0, 0, 153);"># A sample users.properties file for use with the UsersRolesLoginModule
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">admin=6b205f65c5200e6cdfaa38915407eb17</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">ashish=b81277561fad2cce151847f72b850414
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">noorul=930ab5c31004b14a83c93b53554c25d2</span><br style="color: rgb(0, 0, 153);"><br>I have added roles in jboss-4.0.5.GA\server\default\conf\props\ProWS-roles.properties



,<br><br><span style="color: rgb(0, 0, 153);"># A sample users.properties file for use with the UsersRolesLoginModule</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">admin=ShinseiAdmin</span>



<br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">ashish=ShinseiAdmin</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">noorul=ShinseiAdmin</span><br><br>I have assigned security policy in 
jboss-4.0.5.GA\server\default\deploy\ProWebs.war\WEB-INF\jboss-web.xml,<br><br><span style="color: rgb(0, 0, 153);">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span><br style="color: rgb(0, 0, 153);">



<span style="color: rgb(0, 0, 153);">&lt;jboss-web&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;security-domain&gt;java:/jaas/ProWS&lt;/security-domain&gt;&nbsp;&nbsp;&nbsp; </span><br style="color: rgb(0, 0, 153);">



<span style="color: rgb(0, 0, 153);">&nbsp; &lt;context-root&gt;/ProWebs&lt;/context-root&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&lt;/jboss-web&gt;</span><br style="color: rgb(0, 0, 153);">



<br>I have added security-constraint in jboss-4.0.5.GA\server\default\deploy\ProWebs.war\WEB-INF\web.xml,<br><br>&nbsp;&nbsp; <span style="color: rgb(0, 0, 153);">&lt;security-constraint&gt;</span><br style="color: rgb(0, 0, 153);">



<span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp; &lt;web-resource-collection&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;web-resource-name&gt;HtmlAdaptor&lt;/web-resource-name&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;description&gt;An example security config that only allows users with the</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; role ShinseiAdmin to access the HTML ShinseiWS web application</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/description&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;/*&lt;/url-pattern&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;http-method&gt;GET&lt;/http-method&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;http-method&gt;POST&lt;/http-method&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp; &lt;/web-resource-collection&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp; &lt;auth-constraint&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;role-name&gt;ShinseiAdmin&lt;/role-name&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">



&nbsp;&nbsp;&nbsp;&nbsp; &lt;/auth-constraint&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;/security-constraint&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;security-constraint&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp; &lt;web-resource-collection&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;web-resource-name&gt;Public&lt;/web-resource-name&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;/public/*&lt;/url-pattern&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;http-method&gt;GET&lt;/http-method&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;http-method&gt;POST&lt;/http-method&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp; &lt;/web-resource-collection&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;/security-constraint&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;login-config&gt;</span><br style="color: rgb(0, 0, 153);">



<span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;auth-method&gt;DIGEST&lt;/auth-method&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;realm-name&gt;ProWebs&lt;/realm-name&gt;</span>



<br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;/login-config&gt;</span><br style="color: rgb(0, 0, 153);"><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;security-role&gt;
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;role-name&gt;ShinseiAdmin&lt;/role-name&gt;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp; &lt;/security-role&gt;&nbsp;&nbsp;&nbsp; 
</span><br><br>But it not works. Please help me.<br><br><br><br>Warm Regards<br> <br>Noorul Hasan Khan<br>Software Engineer<br>Prologix Software Solutions Pvt. Ltd., India<br></div>