Bug : When SSO login is started twice within the same running process, the CLI crashes with a panic
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- authentication, cli
調査の方向性
Start at the oauth2login entry point and inspect how it registers /auth/callback on Go’s global HTTP router. Reproduce the failure with the provided TestReproduceSSODuplicateCallbackPanic case, then verify that invoking SSO login twice returns normally without a duplicate-route panic and that the existing login flow still works.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When SSO login is started twice within the same running process, the CLI crashes with a panic:
This happens because oauth2login registers /auth/callback on Go’s global HTTP router every time it runs. The second registration causes Go to panic.
Steps to reproduce:
- Start SSO login once.
- Start SSO login again in the same process.
- Observe the panic.
here is the Panic: `panic: pattern "/auth/callback" conflicts with pattern "/auth/callback"
The issue can be reproduced with:
package cmd
import (
"context"
"testing"
"time"
"golang.org/x/oauth2"
)
func TestReproduceSSODuplicateCallbackPanic(t *testing.T) {
config := &oauth2.Config{
Endpoint: oauth2.Endpoint{
AuthURL: "http://127.0.0.1",
TokenURL: "http://127.0.0.1",
},
}
go func() {
_, _, _ = oauth2login(context.Background(), 0, config, false)
}()
time.Sleep(2 * time.Second)
// The second invocation registers /auth/callback again and panics.
_, _, _ = oauth2login(context.Background(), 0, config, false)
}
Expected behavior:
- The second login should return a normal error or create its own temporary callback server.
Actual behavior:
- The process crashes with a panic and stack trace.
Impact:
- Applications, tests, or services that reuse the CLI cannot safely perform multiple SSO logins.
Suggested fix:
- Use a private http.ServeMux for each login instead of the global http.DefaultServeMux..
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Microcks version or git rev
No response
Install method (docker-compose, helm chart, operator, docker-desktop extension,...)
No response
Additional information
@Harsh4902
Please review and assign if valid
- 主要言語
- Go
- スター
- 58
- フォーク
- 72
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microcks/microcks-cli のほかの issue
-
Wrong link to test results再び着手できるかも @SajanBisht が 8 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcomponent/cli keep-open kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microcks/microcks-cli#589 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Default configuration path falls back to the current directory when the home directory cannot be determined対応中かも @Sarthak-Shreshtha01 が 12 日前に担当しました。 オープンcomponent/cli kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microcks/microcks-cli#583 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
microcks test exits with code 1 (contract failure) instead of code 11 (connection) when polling loop times out対応中かも @ish-g09 が 10 日前に担当しました。 オープンcomponent/cli kind/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microcks/microcks-cli#573 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: YAML parse error in config is silently swallowed, login overwrites all other contexts対応中かも @Sarthak-Shreshtha01 が 17 日前に担当しました。 オープンcomponent/cli kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microcks/microcks-cli#572 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
-
import-dir uploads secondary artifacts before their primary API definition対応中かも @doraem-on が 24 日前に担当しました。 オープンcomponent/cli kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microcks/microcks-cli#561 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
microcks/microcks-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
blinklabs-io/dingo#5636 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JetBrains/youtrack-cli#130 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug needs-triage sig/release
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
kubernetes/kubernetes#143392 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 1 日以内に返信
-
stage-fail
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
siyuan-note/bazaar#2405 ·
メンテナーはふだん 1 日以内に返信