Java Web应用的安全与个性化:原理、实现与案例
1. Java EE应用中的安全机制
1.1 EJB安全角色定义
在Java EE应用中,当Web应用与EJB资源交互时,安全问题至关重要。对于EJBs,访问权限可以通过声明式或编程式定义。声明式定义时,需在EJB部署描述符 ejb-jar.xml 中添加额外条目。以下是 ejb-jar.xml 中安全角色定义的示例:
<ejb-jar>
<enterprise-beans>
<!--all the beans are defined here à-->
</enterprise-beans>
<assembly-descriptor>
<security-role>
<description>
This is a registered user who can make
purchases from the site
</description>
<role-name>customer</role-name>
</security-role>
<method-permission>
<role-name>cu
超级会员免费看
订阅专栏 解锁全文
5万+

被折叠的 条评论
为什么被折叠?



