【发布时间】:2010-05-06 12:12:13
【问题描述】:
有很好的教程 Basic Authentication with JAX-WS
但它描述了基于 Web 的应用程序(战争)的部署描述。在ejb jar部署描述中描述是否可以通过?
对于 web.xml
<security-constraint>
<display-name>SecurityConstraint</display-name>
<web-resource-collection>
<web-resource-name>WRCollection</web-resource-name>
<url-pattern>/hello</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>TutorialUser</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-constraint>BASIC</auth-constraint>
<realm-name>file</realm-name>
</login-config>
<security-role>
<role-name>TutorialUser</role-name>
</security-role>
我通过注解发现了安全规则的描述-
Security Annotations and Authorization in GlassFish and the Java EE 5 SDK
但这够了吗?
比你!
【问题讨论】:
标签: security jax-ws java-ee-6 ejb-3.1 glassfish-3