Allow a larger value for the REST source custom header (--header, currently limited to 1024 characters)
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- cpp, openapi
- Domínio
- api, authentication, cli
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C++
- Estrelas
- 26.6k
- Forks
- 1.8k
- Merge médio
- 3d 10h
- PRs com merge (30d)
- 41
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/winget-cli
-
Issue-Docs Needs-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
microsoft/winget-cli#6692 ·
Mantenedores costumam responder em até 2 dias
-
Issue-Docs Possible-Duplicate
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
microsoft/winget-cli#6493 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
WinGetSourceCreator: PackWithMappingFile should verify makeappx.exe exists before invoking itAbertaIssue-Feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/winget-cli#6427 ·
Mantenedores costumam responder em até 2 dias
-
Issue-Docs msstore
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
microsoft/winget-cli#6331 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Command-Source Issue-Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/winget-cli#6148 ·
Mantenedores costumam responder em até 2 dias
Todas as issues de microsoft/winget-cli
Issues semelhantes
-
feat
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
stratum-mining/sv2-tp#167 ·
Mantenedores costumam responder em até 1 dia
-
better error message bug low priority semantics strings
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversAbertaauth bug ui/ux
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
MerginMaps/mobile#4795 ·
Mantenedores costumam responder em até 2 dias