3.5.3: authentication_handlers entries outside the new whitelist are silently dropped (breaks `{couch_httpd_auth, jwt_authentication_handler}`)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- erlang
- Área
- authentication, backend
Línea de trabajo
Start in chttpd:set_auth_handlers/0 and the authentication_handler_map/1 clauses, where unknown {Module, Function} entries fall through to false, and compare with chttpd_auth:jwt_authentication_handler/1 and couch_httpd_auth:jwt_authentication_handler/1 from 3.5.2. Pull request #6152 introduced the whitelist. Done means either the configured {couch_httpd_auth, jwt_authentication_handler} tuple authenticates Bearer tokens again, or each ignored entry logs a warning at startup. Agree with the maintainers on which of these to do first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
After upgrading from 3.5.2 to 3.5.3, JWT authentication stopped working and all Bearer-token requests returned 401. Basic auth kept working.
Our [chttpd] config:
[chttpd]
authentication_handlers = {couch_httpd_auth, jwt_authentication_handler}, {chttpd_auth, default_authentication_handler}
require_valid_user = true
#6152 changed chttpd:set_auth_handlers/0 to map entries through a fixed whitelist. Only the short names and the {chttpd_auth, ...} tuples are accepted. Any other entry falls through to authentication_handler_map(_) -> false and is dropped without a log message.
In 3.5.2, chttpd_auth:jwt_authentication_handler/1 just delegates to couch_httpd_auth:jwt_authentication_handler/1, and both were exported. The configured tuple was valid and worked. The PR states that "for compatibility we still accept existing tuple forms", but this functionally equivalent tuple is no longer accepted, in a patch release.
Steps to Reproduce
- Run CouchDB 3.5.3 with the config above and a valid
[jwt_keys]/[jwt_auth]setup. curl -H "Authorization: Bearer <valid token>" http://localhost:5984/_session- The response is a 401 (or
"authenticated"is not"jwt"). The same request works on 3.5.2. GET /_node/_local/_config/chttpd/authentication_handlersstill shows the configured value, and nothing in the log shows that the JWT handler was dropped.
Expected Behaviour
- Either keep accepting previously working tuples (for example by falling back to the old
make_arity_1_funbehaviour for unknown{Module, Function}entries), - or at least log a warning or error at startup for each ignored entry, so a misconfiguration is visible instead of silently disabling an authentication method.
Workaround
Change the entry to {chttpd_auth, jwt_authentication_handler} or jwt.
Environment
- CouchDB version used: 3.5.3 (official Docker image, tag
couchdb:3.5) - Operating system and version: Linux (Docker)
- Lenguaje dominante
- Erlang
- Estrellas
- 7k
- Forks
- 1.1k
- Merge medio
- 10 h 16 min
- PR fusionados (30 d)
- 35
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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/couchdb
-
[Bug]: Replication result depends on whether the target has a validate_doc_update functionPosiblemente ocupada @nickva la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 44/100
apache/couchdb#6162 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Fix: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' insteadQuizá libre de nuevo @devx-arjun la tomó hace 9 días y no hay ningún pull request abierto. Abiertobeginner-friendly build chore patches-welcome
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
apache/couchdb#6144 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/couchdb#6132 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[ENHANCEMENT]: Add seq checkpoints to continuous feedsPosiblemente ocupada @nickva la tomó hace 2 días. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
apache/couchdb#6120 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement needs-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/couchdb
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
aws/agentcore-cli#2606 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
opdev/vuln-scan-cert#44 ·
-
getCredentials fails on an unrecognized fingerprint while the biometric prompt is still openAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
auth0/Auth0.Android#1095 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Authorization 'Artifacts' is shown under category Run instead of Job in Authorization matrixAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ADORSYS-GIS/token-status-link#168 ·
Los mantenedores suelen responder en 2 días