3.5.3: authentication_handlers entries outside the new whitelist are silently dropped (breaks `{couch_httpd_auth, jwt_authentication_handler}`)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- erlang
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Erlang
- スター
- 7k
- フォーク
- 1.1k
- 平均マージ
- 10時間 25分
- マージ済み PR(30日)
- 35
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/couchdb のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Fix: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' instead再び着手できるかも @devx-arjun が 12 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbeginner-friendly build chore patches-welcome
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
apache/couchdb#6144 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/couchdb#6132 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[ENHANCEMENT]: Add seq checkpoints to continuous feeds対応中かも @nickva が 5 日前に担当しました。 オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
apache/couchdb#6120 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement needs-triage
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
Unconfirmed users who reset their password are stuck on sign in with no way to send confirmationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
hierynomus/sshj#1070 ·
-
[BUG]: SignUpForm lacks client-side minimum password length validation対応中かも @THE-NAVVV が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
AOSSIE-Org/DebateAI#729 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Parsed open flags drop O_PATH対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
aquasecurity/tracee#5388 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100