クリックジャッキングの脆弱性を回避する方法
作成日:2022年4月25日 | 更新日:2023年12月7日
概要
Applications Managerでクリックジャッキングの脆弱性に対処するために、frame-ancestorsディレクティブを使用してContent-Security-Policyヘッダーを構成します。
Applications Managerから設定する方法をご紹介いたします。
Applications Managerビルド15382以降:
UIから設定が可能です。
- [管理]または[設定]タブ→[製品設定]→[セキュリティ設定]に遷移
- [セキュリティ応答ヘッダー]横の[設定]をクリック
- コンテンツセキュリティポリシー横の鉛筆アイコンをクリックし、チェックマークにチェックを入れ、[保存]をクリック
※APMプラグインをご利用の場合は、コンテンツセキュリティポリシー横の[+]をクリックして、OpManagerのURLを指定してください。例:http://<opm-host>:<opm-port>
Applications Managerビルド14845、ビルド15004:
- Applications Managerインストールフォルダー\ working \ WEB-INF \ backupに移動し、web.xmlファイルのバックアップを取ります。
- web.xmlファイル内で、次の行を検索してください。
<!-- Uncomment the following code to enable protection against click jacking. --> - 先頭の「<!-」と末尾の「->」を削除して、クリックジャッキングの防止に使用されるコードのコメントを解除します。
デフォルト:
<!-- Uncomment the following code to enable protection against click jacking. -->
<!--
<init-param>
<param-name>xFrameOptions</param-name>
<param-value>SAMEORIGIN</param-value>
</init-param>
<init-param>
<param-name>contentSecurityPolicy</param-name>
<param-value>frame-ancestors 'self'</param-value>
</init-param>
-->
変更例:
<!-- Uncomment the following code to enable protection against click jacking. -->
<init-param>
<param-name>xFrameOptions</param-name>
<param-value>SAMEORIGIN</param-value>
</init-param>
<init-param>
<param-name>contentSecurityPolicy</param-name>
<param-value>frame-ancestors 'self'</param-value>
</init-param>
ファイルを保存して、Applications Managerを再起動し、問題が解決したかどうかを確認してください。
APMプラグインの場合:
APMプラグインの場合、上記Applications Managerのコード設定例の"<param-value>"には、
SAMEORIGINではなくOPMドメイン名を指定してください。
<init-param>
<param-name>xFrameOptions</param-name>
<param-value>ALLOW-FROM <source></param-value>
</init-param>
<init-param>
<param-name>contentSecurityPolicy</param-name>
<param-value>frame-ancestors <source>;</param-value>
</init-param>
<source>を、フレーム内でサイトにアクセスできるドメインに置き換えてください。
例 :
<init-param>
<param-name>xFrameOptions</param-name>
<param-value>ALLOW-FROM https://example.com/</param-value>
</init-param>
<init-param>
<param-name>contentSecurityPolicy</param-name>
<param-value>frame-ancestors https://example.com/;</param-value>
</init-param>
ファイルを保存して、Applications Managerを再起動し、問題が解決したかどうかを確認してください。