[研究]IIS 10.0 GCB,實測 Web.Config 多甚麼 - requireSSL="true"
2025-01-16
IIS 10.0 套用 GCB 後,有些會變更現有 Web.Config 設定,要回頭改 Source Code,否則下次 Deploy 後,GCB 設定會被覆蓋消失。
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
Web.Config 多了 requireSSL="true"
<authentication mode="Windows">
<forms cookieless="UseCookies" requireSSL="true" />
</authentication> |
這應該是 No.8 的
********************************************************************************
Windows Server 從Windows Server 2016開始,IIS為10.0版,後續 Windows Server 2019, Windows Server 2022, Windows Server 2025 也都是 10.0版,大版本號碼相同,小版本可能不同,畫面幾乎相同。
政府組態基準(Government Configuration Baseline,簡稱GCB)
TWGCB-04-014_Microsoft IIS 10政府組態基準說明文件v1.1_1141002
https://www.nics.nat.gov.tw/core_business/cybersecurity_defense/GCB/GCB_Documentation/
| 項次 | TWGCB-ID | 類別 | 原則設定名稱 | 說明 | 設定位置 | 設定路徑 | GCB設定值 |
| 8 | TWGCB-04-014-0008 | 設定驗證與授權 | 表單驗證需要 SSL |
| 站台 | IIS 管理員\伺服器\站台\網站\管理\設定編輯器\動作\開啟功能\區段\system.web\authentication\forms\requireSSL | True |
下圖,原本沒有 Web.Config (也可能有),產生了
下圖,設定變成 true
實際檢視某 ASP.NET WebForm 真實系統,該網站僅提供 HTTPS 連線,但IIS設定畫面上requireSSL 是 False,可是 Web.Config 中有設定
相關






沒有留言:
張貼留言