[jboss-user] [Beginners Corner] - Re: EJB SecurityException on AccountBean EJB dukesbank
eric_hootsen
do-not-reply at jboss.com
Thu Oct 26 15:31:53 EDT 2006
I checked out the ejb-jar.xml. The method you are talking about seems to be unchecked. In addition to the rol bankCustomer I also assigned the role bankAdmin to user 200 in the roles.properties file. Still no approvement. Below the method permissions from the ejb-jar.xml file. The permissiond for the getAccountsOfCustomer method marked bold.
<assembly-descriptor>
<security-role>
<role-name>bankCustomer</role-name>
</security-role>
<security-role>
<role-name>bankAdmin</role-name>
</security-role>
<method-permission>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setBeginBalanceTimeStamp</method-name>
<method-params>
<method-param>java.util.Date</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getAccountsOfCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getDetails</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>addCustomerToAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
</method-permission>
<method-permission>
<role-name>bankAdmin</role-name>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>createAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.util.Date</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setBeginBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>removeCustomerFromAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setCreditLine</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setDescription</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>removeAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setType</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getDetails</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<role-name>bankAdmin</role-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getCustomersOfAccount</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>createCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getCustomersOfLastName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>removeCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>setAddress</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<ejb-name>CustomerControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
</method-permission>
<method-permission>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setBeginBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>create</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.util.Date</method-param>
<method-param>java.util.ArrayList</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setType</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setDescription</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setBalance</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setCreditLine</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBLocalObject</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>findByCustomerId</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>setBeginBalanceTimeStamp</method-name>
<method-params>
<method-param>java.util.Date</method-param>
</method-params>
</method-permission>
<method-permission>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getCreditLine</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getType</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getDetails</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getBalance</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>remove</method-name>
<ejb-name>AccountBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getEJBLocalHome</method-name>
</method-permission>
<method-permission>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getDetails</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<method-permission>
<role-name>bankCustomer</role-name>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getTxsOfAccount</method-name>
<method-params>
<method-param>java.util.Date</method-param>
<method-param>java.util.Date</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>transferFunds</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>withdraw</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>makePayment</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>makeCharge</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>TxControllerBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>deposit</method-name>
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method-permission>
<container-transaction>
<ejb-name>AccountControllerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>CustomerControllerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TxControllerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>AccountBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>CustomerBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TxBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981111#3981111
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981111
More information about the jboss-user
mailing list