Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

EAP6 で http-Only および、セキュアクッキーを有効にする方法

Solution Verified - Updated -

Issue

  • JBoss EAP5 では、"$PROFILE\deploy\jbossweb.sar\context.xml" を使用して cookie に secure 属性を有効にするオプションが利用できます。
<Context cookies="true" crossContext="true">
  <SessionCookie secure="true" httpOnly="true" />

EAP 6 で同様の設定を行うにはどうしたら良いですか?

  • アプリケーション内で web.xml に次のように設定することで、JSESSIONID に httpOnly 属性と Secure 属性を設定することができます。
    <session-config>
        <session-timeout>60</session-timeout>
        <cookie-config>
            <http-only>true</http-only>
            <secure>true</secure>
        </cookie-config>
        <tracking-mode>COOKIE</tracking-mode>
    </session-config>

各アプリケーションすべての web.xml に設定するのではなく、アプリケーションサーバーで設定し、すべてのアプリケーションに有効化したいです。

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.