Support configurable HTTP security headers across API, page and admin responses

オープン
#38,639 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java

調査の方向性

Start by reading the existing Tomcat HttpHeaderSecurityFilter configuration in WEB-INF/web.xml and the VelocityLiveMode code that applies ContentSecurityPolicy.header. Trace how API, page, and admin responses are created and how DOT_ properties and forwarded protocol information are handled. Done means the acceptance criteria are covered, including configurable headers across the response types, safe defaults, and documented recommendations.

索引モデルが issue の本文から書いたものです。

説明

OKR : Customer Support Team : Maintenance Type : New Functionality
Problem Statement

dotCMS has no supported, configurable way to send a standard set of HTTP security headers on all responses. Security scans flag missing Strict-Transport-Security, Content-Security-Policy, Referrer-Policy and Permissions-Policy headers on API, page and admin responses.

Current behavior:

  • HSTS comes only from Tomcat's HttpHeaderSecurityFilter in WEB-INF/web.xml (hstsMaxAgeSeconds=3600). Tomcat only sends it on secure requests, so it is missing when TLS ends at a reverse proxy or load balancer, which is the usual deployment. The value can't be configured with an environment variable.
  • Content-Security-Policy (ContentSecurityPolicy.header) is applied only to Velocity-rendered pages (VelocityLiveMode), not to REST/GraphQL responses or the admin UI.
  • Referrer-Policy and Permissions-Policy are never set.
Steps to Reproduce
  1. Run dotCMS behind a reverse proxy that terminates TLS (default Docker/Kubernetes setup).
  2. Request POST /api/v1/graphql, a rendered page and an admin URL over HTTPS.
  3. Inspect the response headers.
  4. Observe Strict-Transport-Security, Content-Security-Policy, Referrer-Policy and Permissions-Policy are absent (CSP only appears on pages, and only when ContentSecurityPolicy.header is set).
Acceptance Criteria
  • HSTS can be enabled and configured with DOT_ properties, and is sent when the original request was HTTPS behind a proxy (e.g. honoring X-Forwarded-Proto).
  • Referrer-Policy and Permissions-Policy can be set with config properties.
  • CSP can be set separately for API responses and admin UI responses, not only Velocity pages.
  • Defaults don't break the admin UI, UVE/headless editing, or existing integrations.
  • A recommended baseline header set for self-hosted installs is documented.
dotCMS Version

26.09.28-02 (also present on main)

Severity

Medium - Some functionality impacted

Links
主要言語
Java
スター
972
フォーク
493
平均マージ
2日 12時間
マージ済み PR(30日)
228

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotCMS/core のほかの issue

dotCMS/core の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。