【问题标题】:Deployment secription of Basic Authentication with JAX-WS for EJB 3.1EJB 3.1 中使用 JAX-WS 的基本身份验证的部署说明
【发布时间】: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


    【解决方案1】:

    注解和sun-ejb.xml就够了,但是使用Basic Authentication不是一个好办法。

    【讨论】:

    • 可能是因为它不够安全。我拒绝使用手工验证。
    猜你喜欢
    • 1970-01-01
    • 2010-12-28
    • 2019-05-09
    • 1970-01-01
    • 2014-05-20
    • 1970-01-01
    • 1970-01-01
    • 2015-05-10
    • 2012-10-05
    相关资源
    最近更新 更多