I'm new with jaas+jboss.
So the problem is: can i invoke method on ejb without using 
LoginContext.login(); I have something like that in my 
jboss-web.xml:
...
        <security-role>
                <role-name>Role1</role-name>
                <principal-name>Principal1</principal-name>
        </security-role>
        
        
                <servlet-name>action</servlet-name>
                <run-as-principal>Principal</run-as-principal>
        
...

in my ejb-jar.xml:
...
   
...
        <ejb-name>EJB1</ejb-name>
...
         <security-identity>
            <use-caller-identity />
         </security-identity>
   

  <assembly-descriptor >
    <security-role>
    <role-name>Role1</role-name>
    </security-role>

    <method-permission >
      <role-name>Role1</role-name>
      
         <ejb-name>EJB1</ejb-name>
         <method-name>*</method-name>
      
   </method-permission>
  </assembly-descriptor>

in my jboss.xml:
...
 <assembly-descriptor>
    <security-role>
      <role-name>Role1</role-name>
      <principal-name>Principal1</principal-name>
    </security-role>
</assembly-descriptor>
...

When I try to invoke something like EJB1Home.create I get SecurityException : 
Insufficient method permissions, 
principal=[roles=[Role1],principal=Principal1], ejbName=EJB1, method=create, 
interface=HOME, requiredRoles=[Role1], principalRoles=null

?Why principalRoles=null?




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923877#3923877

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923877


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to