apache / apache/answer-plugins
Basic OAuth2 plugin fails to connect to Shibboleth IDP
- 主要言語
- Go
- スター
- 131
- フォーク
- 75
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm trying to connect an Answer instance to my institution's IDP (Shibboleth), but I consistently get a 50x error in browser accompanied by the following entry in the application log:
```
ERROR /go/src/github.com/answerdev/answer/answer_build422575497/vendor/github.com/answerdev/answer/internal/controller/connector_controller.go:111 connector received failed, error info: code exchange failed: oauth2: cannot fetch token: 400
Response: {"error":"invalid_request","error_description":"InvalidEvent"}, response data is:
```
(The "response data is:" part is left intentionally blank, nothing is printed there)
The IDP log shows the following contemporaneous error:
```
Profile Action ValidateClientAuthenticationType: Client '[redacted]' registered client_secret_basic but attempted client_secret_post
A non-proceed event occurred while processing the request: InvalidEvent
Profile Action BuildTokenErrorResponseFromEvent: No mapped event found for InvalidEvent, creating general invalid_request
Profile Action BuildTokenErrorResponseFromEvent: ErrorResponse successfully set as the outbound message
```
Some searching of the IDP configuration confirms that it advertises `token_endpoint_auth_methods_supported` as `[ "client_secret_basic", "client_secret_post", "client_secret_jwt", ... ]` when communicating with OIDC clients, but according to the upstream [mailing lists](http://shibboleth.net/pipermail/users/2019-May/044292.html), the client is expected to identify which supported `token_endpoint_auth_method` it intends to use. I don't believe that the OAuth2 client does that automatically, and there doesn't seem to be a configuration parameter to specify it manually either.
EDIT for version info:
I'm using Answer v1.1.1 pulled from Docker
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
internal/controller/connector_controller.go:111 から始め、Basic OAuth2 プラグインで使用されている OAuth2 コード交換を追跡します。Shibboleth IDP への接続を再現し、クライアントのトークンエンドポイント認証方式と IDP ログを比較します。報告されている 50x エラーおよびトークン交換の失敗なしにプラグインが接続できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- authentication, backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100