<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    EJB3 JBossWS Authentication in 5.1.0 GA not working
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/tumuhairwe">Judes Tumuhairwe</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/565984#565984">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi</p><p>I've read this [1] and [2] and [3] and a whole bunch of others (including the JBoss In Action book) and they all say the same thing:</p><p>1. Configure a data-source (*-ds.xml file)</p><p>2. Define a domain (conf/login-config.xml)</p><p>3. Tell the app about it:</p><p>&#160;&#160;&#160; a. put the &lt;security-domain&gt; in jboss-web.xml and in the</p><p>&#160;&#160;&#160; b. META-INF/jboss.xml</p><p>&#160;&#160;&#160; c. add a security constraint in web.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>4. Annotate the EJB/Web-service with the security annotations (@SecurityDomain, @WebContext and @RolesAllowed in addition to @Stateless and @Webservice)</p><p>5. build, package &amp; deploy as an ear</p><p>6. Add the values to the request-context map of the BindingProvider when calling...and everything should work.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But nothing is working for me i.e. I keep getting a 401 error (Unauthorized). (I've been struggling with this for days now) Question is can anyone see what I'm doing wrong.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Environment: Java version: 1.5.0_22, JBoss 5.1.0 GA, JBoss Web Services - Stack Native Core (3.1.2.GA)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>conf/login-config.xml (fragment)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>[still gives a HTTP 401 even if I use the default JBossWS]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The datasource (I've verified that this works)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>jboss-web.xml (the article [1] says its only for POJO's but it doesn't make a difference if I remove the &lt;security-domain&gt; tag)</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="jive-xml-tag">&lt;jboss-web&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class-loading java2ClassLoadingCompliance="false"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;loader-repository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;loader-repository-config&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; java2ParentDelegation=false
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/loader-repository-config&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/loader-repository&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/class-loading&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;context-root&gt;</span>/verifiq<span class="jive-xml-tag">&lt;/context-root&gt;</span>
&#160;&#160;&#160; 
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-domain flushOnSessionInvalidation="false"&gt;</span>verifiq-domain<span class="jive-xml-tag">&lt;/security-domain&gt;</span>
<span class="jive-xml-tag">&lt;/jboss-web&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>jboss.xml (in the ejb jar's META-INF) Same as above i.e. doesn't make a difference if I uncomment.</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="jive-xml-tag">&lt;jboss&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-domain&gt;</span>verifiq-domain<span class="jive-xml-tag">&lt;/security-domain&gt;</span>
&#160;&#160;&#160; 
&#160;&#160;&#160; <span class="jive-xml-comment">&lt;!--
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;webservices&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;context-root&gt;</span>/service<span class="jive-xml-tag">&lt;/context-root&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/webservices&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;enterprise-beans&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;session&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;ejb-name&gt;</span>ExpulsionStatusBean<span class="jive-xml-tag">&lt;/ejb-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;jndi-name&gt;</span>ExpulsionStatusBean<span class="jive-xml-tag">&lt;/jndi-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-domain&gt;</span>verifiq-domain<span class="jive-xml-tag">&lt;/security-domain&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;port-component&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;port-component-name&gt;</span>ExplusionStatusServicePort<span class="jive-xml-tag">&lt;/port-component-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;port-component-uri&gt;</span>/ExplusionStatusBeanPort<span class="jive-xml-tag">&lt;/port-component-uri&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;auth-method&gt;</span>BASIC<span class="jive-xml-tag">&lt;/auth-method&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;transport-guarantee&gt;</span>NONE<span class="jive-xml-tag">&lt;/transport-guarantee&gt;</span> 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;secure-wsdl-access&gt;</span>false<span class="jive-xml-tag">&lt;/secure-wsdl-access&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/port-component&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;resource-ref&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;res-ref-name&gt;</span>jdbc/postgresql<span class="jive-xml-tag">&lt;/res-ref-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;jndi-name&gt;</span>java:/VerifiqDS<span class="jive-xml-tag">&lt;/jndi-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/resource-ref&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;clustered&gt;</span>true<span class="jive-xml-tag">&lt;/clustered&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;cluster-config&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;partition-name&gt;</span>DefaultPartition<span class="jive-xml-tag">&lt;/partition-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;load-balance-policy&gt;</span>org.jboss.ha.framework.interfaces.RandomRobin<span class="jive-xml-tag">&lt;/load-balance-policy&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/cluster-config&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/session&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/enterprise-beans&gt;</span>
&#160;&#160;&#160;&#160; --&gt;</span>
<span class="jive-xml-tag">&lt;/jboss&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>ExpulsionStatusBean.java [intentionally skipped the contextRoot in @WebContext because:</p><p>1. it puts the context (e.g. /service) outside the app's (/verifiq) i.e. security-constraint definitions in web.xml become useless since we now have <span style="font-family: courier new,courier;">localhost:8080/services</span> and <span style="font-family: courier new,courier;">localhost:8080/verifiq</span>.</p><p>2. It applies that service to all the web-services in that ejb jar (even though I've explicitly asked for a different contextRoot on another web-service)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Either way, even when I access them at a different location /services/serviceName?wsdl the result is the same i.e. HTTP 401]</p><pre class="jive-pre"><code class="jive-code jive-java">@Stateless
@WebService
@Local(ExplusionStatusService.class)
@SecurityDomain(value=<font color="red">"JBossWS"</font>)
@RolesAllowed(<font color="red">"friend"</font>)
@WebContext(authMethod=<font color="red">"BASIC"</font>, transportGuarantee=<font color="red">"NONE"</font>, secureWSDLAccess=<font color="navy"><b>false</b></font>)
<font color="navy"><b>public</b></font> <font color="navy"><b>class</b></font> ExplusionStatusBean <font color="navy"><b>implements</b></font> ExplusionStatusService, Serializable <font color="navy">{</font>
&#160;
&#160;&#160;&#160; @Resource
&#160;&#160;&#160; <font color="navy"><b>private</b></font> SessionContext context;
&#160;
&#160;&#160;&#160; @WebMethod
&#160;&#160;&#160; <font color="navy"><b>public</b></font> String expell(@WebParam(name=<font color="red">"person"</font>) Person person) <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; String retVal = <font color="red">"Expelling "</font> + person.getSchoolAssignedID();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<font color="red">"ExplusionStatusBean.expell(): invoked"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<font color="red">"ExplusionStatusBean.expell(): Student: "</font> + person);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<font color="red">"ExplusionStatusBean.expell(): caller: "</font> + context.getCallerPrincipal());
&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<font color="red">"ExplusionStatusBean.expell(): returning "</font> + retVal);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>return</b></font> retVal;
&#160;&#160;&#160; <font color="navy">}</font>
<font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Expeller.java (snipped just main() )</p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>public</b></font> <font color="navy"><b>static</b></font> <font color="navy"><b>void</b></font> main(String[] args) <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>try</b></font> <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.info(<font color="red">"Constructing..."</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ExplusionStatusBeanService esb = <font color="navy"><b>new</b></font> ExplusionStatusBeanService(<font color="navy"><b>new</b></font> URL(<font color="red">"http://127.0.0.1:8080/verifiq-verifiq-ejb/ExplusionStatusBean?wsdl"</font>));
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ExplusionStatusBean service = esb.getExplusionStatusBeanPort();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.info(<font color="red">"Computing password"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; String password = <font color="red">"thefrog"</font>;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">//password = DigestUtils.md5Hex(password);</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">//String pass =</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.info(<font color="red">"Setting authentication info"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">//BindingProvider bp = (BindingProvider)service;</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">//Map&lt;String, Object&gt; authentication = bp.getRequestContext();</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ((BindingProvider)service).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, <font color="red">"kermit"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ((BindingProvider)service).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<font color="red">"Using username kermit and password="</font> + password);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.info(<font color="red">"Invoking..."</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Person person = getJudes();&#160;&#160;&#160;&#160; <font color="darkgreen">// Person is just a regular JPA pojo (mapped) (with name &amp; schoolId)</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; String response = service.expell(person);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.info(<font color="red">"Response receieved successfully! "</font> + response);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font> <font color="navy"><b>catch</b></font> (Exception ex) <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ex.printStackTrace();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.log(Level.SEVERE, null, ex);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>
&#160;&#160;&#160; <font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>server.log</p><p>(I'm 100% certain the user kermit-&gt;thefrog exists in both the props/jbossws-*.properties file (when I use the default JBossWS) and in the database.)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2010-10-12 01:09:07,797 DEBUG <a class="jive-link-external-small" href="org.jboss.security.auth.spi.DatabaseServerLoginModule">org.jboss.security.auth.spi.DatabaseServerLoginModule</a> (http-127.0.0.1-8080-1) Bad password for username=kermit</p><p>2010-10-12 01:09:07,797 DEBUG <a class="jive-link-external-small" href="org.jboss.security.auth.spi.DatabaseServerLoginModule">org.jboss.security.auth.spi.DatabaseServerLoginModule</a> (http-127.0.0.1-8080-1) Bad password for username=kermit</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Like I said, I'm 100% certain the kermit exists &amp; has the role 'friend' (see attached screenshot)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Is there anything I'm missing?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>web.xml (supposedly for POJOs only but I've included a snippet anyway. Doesn't matter if I comment or uncomment it out. Same result "Bad password" error)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;security-constraint&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;web-resource-collection&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;web-resource-name&gt;</span>All webservices<span class="jive-xml-tag">&lt;/web-resource-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;description&gt;</span>Protects all webservices<span class="jive-xml-tag">&lt;/description&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;url-pattern&gt;</span>/service<span class="jive-xml-tag">&lt;/url-pattern&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/web-resource-collection&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;auth-constraint&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-name&gt;</span>admissions-viewer<span class="jive-xml-tag">&lt;/role-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-name&gt;</span>friend<span class="jive-xml-tag">&lt;/role-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/auth-constraint&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-constraint&gt;</span>

&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-role&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-name&gt;</span>admissions-viewer<span class="jive-xml-tag">&lt;/role-name&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-role&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-role&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-name&gt;</span>friend<span class="jive-xml-tag">&lt;/role-name&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-role&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-role&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-name&gt;</span>admissions-manager<span class="jive-xml-tag">&lt;/role-name&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-role&gt;</span>

&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;login-config&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;auth-method&gt;</span>BASIC<span class="jive-xml-tag">&lt;/auth-method&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;realm-name&gt;</span>Verifiq Webservices Realm<span class="jive-xml-tag">&lt;/realm-name&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/login-config&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I've gone over it countless times &amp; I'm just frustrated. It really shouldn't be that hard to get it to work...in theory :-)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Is there anything I'm missing?</p><p>TIA,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Judes Tumuhairwe</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>References:</p><p><span>[1] </span><a class="jive-link-external-small" href="http://community.jboss.org/docs/DOC-13533" target="_blank">http://community.jboss.org/wiki/JBossWS-Authentication</a></p><p><span>[2] </span><a class="jive-link-external-small" href="http://www.coderanch.com/t/477889/JBoss/Securing-Application-JBoss" target="_blank">http://www.coderanch.com/t/477889/JBoss/Securing-Application-JBoss</a></p><p><span>[3] </span><a class="jive-link-external-small" href="http://thatjavathing.blogspot.com/2009/05/authentication-and-authorization-with_30.html" target="_blank">http://thatjavathing.blogspot.com/2009/05/authentication-and-authorization-with_30.html</a></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/565984#565984">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>