<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> <br><span style="color: rgb(0, 0, 153);"><application-policy name = "ProWS"></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
<authentication></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <module-option name="usersProperties">props/ProWS-users.properties</module-option></span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"> <module-option name="rolesProperties">props/ProWS-roles.properties</module-option></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
<module-option name="hashAlgorithm">MD5</module-option></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <module-option name="hashEncoding">rfc2617</module-option>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <module-option name="hashUserPassword">false</module-option></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
<module-option name="hashStorePassword">true</module-option></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <module-option name="passwordIsA1Hash">true</module-option>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <module-option name="storeDigestCallback">org.jboss.security.auth.spi.RFC2617Digest</module-option></span>
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"> </login-module></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </authentication></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
</application-policy></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);"><?xml version="1.0" encoding="UTF-8"?></span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"><jboss-web></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <security-domain>java:/jaas/ProWS</security-domain> </span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"> <context-root>/ProWebs</context-root></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"></jboss-web></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> <span style="color: rgb(0, 0, 153);"><security-constraint></span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"> <web-resource-collection></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <web-resource-name>HtmlAdaptor</web-resource-name>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <description>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);">
role ShinseiAdmin to access the HTML ShinseiWS web application</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </description></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
<url-pattern>/*</url-pattern></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <http-method>GET</http-method></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
<http-method>POST</http-method></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </web-resource-collection></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
<auth-constraint></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <role-name>ShinseiAdmin</role-name></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
</auth-constraint></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </security-constraint></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <security-constraint>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <web-resource-collection></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <web-resource-name>Public</web-resource-name>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <url-pattern>/public/*</url-pattern></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <http-method>GET</http-method>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <http-method>POST</http-method></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </web-resource-collection>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </security-constraint></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <login-config></span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"> <auth-method>DIGEST</auth-method></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <realm-name>ProWebs</realm-name></span>
<br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </login-config></span><br style="color: rgb(0, 0, 153);"><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <security-role>
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> <role-name>ShinseiAdmin</role-name></span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> </security-role>
</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>