✨(feature) Resource server: accept tokens issued by menshen (HTTP Basic introspection)

オープン
#3,046 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
django, python

調査の方向性

Start in core/external_api/backends.py and the OIDC_RS_BACKEND_CLASS setting, then compare with django-lasuite's ResourceServerBackend, which sends client_id and client_secret in the introspection body. The issue leaves open whether the fix belongs here, in django-lasuite, or in menshen, so confirm with maintainers before writing code. Done means an opt-in Basic-auth introspection backend with tests, and behaviour unchanged when the setting is absent.

索引モデルが issue の本文から書いたものです。

説明

backend
What problem do you want to fix?

Docs' resource-server API (/external_api/v1.0/) rejects tokens issued by menshen, La Suite's token-exchange server. django-lasuite's ResourceServerBackend sends client_id and client_secret in the introspection request body (client_secret_post). menshen's introspection endpoint accepts only HTTP Basic (client_secret_basic), answers 401, and every request carrying a menshen token fails with SuspiciousOperation: Could not fetch introspection.

Context: master's thesis at JMU Würzburg in collaboration with La Suite, discussed with Samuel Paccoud @sampaccoud . The client is a desktop agent that reads a user's own documents through the external API after exchanging the user's token at menshen.

Possible solution?

An opt-in BasicAuthResourceServerBackend in core/external_api/backends.py, selected with the existing setting OIDC_RS_BACKEND_CLASS, that sends the client credentials as HTTP Basic and only token in the body. Nothing changes unless the setting is used. I have this implemented with tests and documentation and can open it as a draft PR once you tell me it is welcome here.

Do you have an alternative?

Two other homes for the same fix: a setting for the client authentication method in django-lasuite, which would solve it for every La Suite application using its resource server, or menshen also accepting client_secret_post. Which do you prefer? I will move the change wherever you think it belongs.

Upload

No response

Contact Details

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要言語
TypeScript
スター
17k
フォーク
705
平均マージ
4日 13時間
マージ済み PR(30日)
47

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

suitenumerique/docs のほかの issue

suitenumerique/docs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。