Bug : When SSO login is started twice within the same running process, the CLI crashes with a panic
Los mantenedores suelen responder en 1 día
@Sarthak-Shreshtha01 ya está trabajando en esto.
Desde el 4/10/2026.
- #571 de @Sarthak-Shreshtha01 — abierto
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- authentication, cli
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Go
- Estrellas
- 58
- Forks
- 72
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 microcks/microcks-cli
-
Wrong link to test resultsQuizá libre de nuevo @SajanBisht la tomó hace 8 días y no hay ningún pull request abierto. Abiertocomponent/cli keep-open kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microcks/microcks-cli#589 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Default configuration path falls back to the current directory when the home directory cannot be determinedPosiblemente ocupada @Sarthak-Shreshtha01 la tomó hace 12 días. Abiertocomponent/cli kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microcks/microcks-cli#583 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
microcks test exits with code 1 (contract failure) instead of code 11 (connection) when polling loop times outPosiblemente ocupada @ish-g09 la tomó hace 10 días. Abiertocomponent/cli kind/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
microcks/microcks-cli#573 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: YAML parse error in config is silently swallowed, login overwrites all other contextsPosiblemente ocupada @Sarthak-Shreshtha01 la tomó hace 17 días. Abiertocomponent/cli kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microcks/microcks-cli#572 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
-
import-dir uploads secondary artifacts before their primary API definitionPosiblemente ocupada @doraem-on la tomó hace 24 días. Abiertocomponent/cli kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
microcks/microcks-cli#561 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microcks/microcks-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
blinklabs-io/dingo#5636 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
JetBrains/youtrack-cli#130 ·
Los mantenedores suelen responder en 1 día
-
kind/bug needs-triage sig/release
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
kubernetes/kubernetes#143392 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
Los mantenedores suelen responder en 1 día
-
stage-fail
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
siyuan-note/bazaar#2405 ·
Los mantenedores suelen responder en 1 día