Allow a larger value for the REST source custom header (--header, currently limited to 1024 characters)
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- cpp, openapi
- 領域
- api, authentication, cli
研究方向
Start with WindowsPackageManagerHeaderMaxLength in RestClient.cpp and the REST API spec in winget-cli-restsource, both named in the issue. Compare how each enforces the 1024-character limit and check the project’s API versioning guidance before choosing between raising the limit and adding native authentication. Done means the selected approach removes the credential-size constraint while keeping the client and REST API spec consistent.
由索引模型根據 Issue 內容生成。
描述
Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
The --header option sends its value as the Windows-Package-Manager header on every request to a REST source. The client rejects any value longer than 1024 characters with 0x8A150047 (APPINSTALLER_CLI_ERROR_CUSTOMHEADER_EXCEEDS_MAXLENGTH, "Header size exceeds the allowable limit of 1024 characters"). The limit is WindowsPackageManagerHeaderMaxLength in RestClient.cpp. The REST API spec in winget-cli-restsource also declares maxLength: 1024 for the header.
My scenario: a managed REST source that authenticates each device with a signed token. The header is the only supported way to give a REST source per-device credentials (#893, #3428). A token that carries an X.509 certificate and a signature easily exceeds 1024 characters. I can keep tokens under the limit, but only by dropping security properties, such as a self-contained certificate chain, or by moving trust to extra server-side lookups.
I could not find a documented reason for the 1024-character limit. Is there a technical constraint behind it?
Proposed technical implementation details
Any of these would solve it:
- Raise the limit, for example to 4096 or 8192 characters. Update the REST API spec (new API version or spec amendment) and the client constant.
- Support client-certificate or token-based authentication for REST sources natively (see #1919), so that credentials do not have to be passed through a custom header.
- 主要語言
- C++
- 星號
- 26.6k
- 分支
- 1.8k
- 平均合併
- 3 天 10 小時
- 30 天內合併 PR
- 41
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/winget-cli 的其他 Issue
-
Issue-Docs Needs-Triage
難度 2/5 1-3 小時 新手友好度 70/100
microsoft/winget-cli#6692 ·
維護者通常 2 天內回覆
-
Issue-Docs Possible-Duplicate
難度 2/5 1-3 小時 新手友好度 76/100
microsoft/winget-cli#6493 · 1 則留言 ·
維護者通常 2 天內回覆
-
Issue-Feature
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/winget-cli#6427 ·
維護者通常 2 天內回覆
-
Issue-Docs msstore
難度 2/5 1-3 小時 新手友好度 64/100
microsoft/winget-cli#6331 · 1 則留言 ·
維護者通常 2 天內回覆
-
Command-Source Issue-Bug
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/winget-cli#6148 ·
維護者通常 2 天內回覆
查看 microsoft/winget-cli 的全部 Issue
相似的 Issue
-
feat
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 75/100
stratum-mining/sv2-tp#167 ·
維護者通常 1 天內回覆
-
better error message bug low priority semantics strings
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition servers未關閉auth bug ui/ux
難度 2/5 1-3 小時 新手友好度 72/100
MerginMaps/mobile#4795 ·
維護者通常 2 天內回覆