[Bug] [BanyanDB] MCP HTTP server rejects a lowercase "bearer" Authorization scheme
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
BanyanDB (apache/skywalking-banyandb)
What happened
While looking at the MCP server after #14194, I tried HTTP mode with a token and noticed that Authorization: bearer <token> (lowercase) gets a 401 even when the token is right. Only the exact Bearer prefix works, because getAuthorizationToken in mcp/src/server/http.ts uses startsWith('Bearer ').
What you expected to happen
The auth scheme name is case-insensitive (RFC 9110 section 11.1, which RFC 6750 uses for Bearer), so bearer or BEARER with the right token should be accepted. Some HTTP clients and proxies send it in lowercase, and a 401 there is confusing because the token itself is correct.
How to reproduce
On main (27349fdf), in mcp/ (BanyanDB doesn't need to be running for this):
TRANSPORT=http MCP_AUTH_TOKEN=secret MCP_PORT=3999 npx tsx src/index.ts &
curl -s -o /dev/null -w '%{http_code}\n' -X POST http://127.0.0.1:3999/mcp \
-H 'Authorization: bearer secret' -H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
# 401
curl -s -o /dev/null -w '%{http_code}\n' -X POST http://127.0.0.1:3999/mcp \
-H 'Authorization: Bearer secret' -H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
# 200
Anything else
Canopy in the same repo already handles this: bearerCredential in canopy/server/src/lib/tokens.ts matches the scheme case-insensitively. So the fix is to do the same in the MCP server, with unit tests for the header parsing. I have it ready and will link the PR here.
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- Java
- Estrellas
- 25k
- Forks
- 6.6k
- Merge medio
- 12 h 41 min
- PR fusionados (30 d)
- 48
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/skywalking
-
[Bug] Standalone multi-group Measure aggregation returns one row per groupPosiblemente ocupada @hanahmily la tomó hace 1 día. Abiertobug database
apache/skywalking#14198 · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
[Bug] [BanyanDB] MCP server ignores .env values and silently accepts malformed numeric/TRANSPORT settingsPosiblemente ocupada @wanjinhao1 la tomó hace 3 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
apache/skywalking#14194 ·
Los mantenedores suelen responder en 1 día
-
[Bug] BanyanDB trace block metadata format changed in 0.11 without a file format version bumpPosiblemente ocupada @hanahmily la tomó hace 12 días. Abiertobug database
apache/skywalking#14169 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
chore CLI database
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
apache/skywalking#14168 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BanyanDB] Stream write callback reports success for events it did not storeQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/skywalking#14158 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/skywalking
Issues similares
-
Keyboard crashes Chrome tabsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Julow/Unexpected-Keyboard#1490 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Vakore/ZappierGames#275 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
unitycatalog/unitycatalog#2148 ·
Los mantenedores suelen responder en 2 días
-
enhancement priority: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Riptide-Labs/riptide#1060 ·
Los mantenedores suelen responder en 1 día
-
bug key bindings source editor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día