feat: allow specifying callback port for OIDC auth
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- authentication, cli
Línea de trabajo
Comienza en crates/openshell-cli/src/oidc_auth.rs alrededor de las líneas 188-190 y sigue cómo el puerto del listener llega a la construcción de redirect_uri. Actualiza docs/reference/gateway-auth.mdx alrededor de las líneas 92-98 y 123, y añade cobertura de pruebas unitarias para el puerto configurado y un error de colisión de bind. El trabajo estará terminado cuando la variable de entorno seleccione el puerto del listener, los puertos no válidos o no disponibles produzcan errores accionables y el comportamiento efímero predeterminado permanezca sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
User Story
As an openshell consumer, I'd need the OIDC flow to work with a specific ephemeral port for SSO login. This is because the underlying auth0 provider does not allow regex on the port for allowed callback urls
Problem Statement
Provide a way to fix the CLI ephemeral callback port to a specific value so that it's easier to add the callback url
Impact / Why This Matters
Right now the SSO login requires whitelisting every possible ephemeral port in localhost which is not ideal.
Proposed Design
Provide the control of port via env variable OPENSHELL_OIDC_CALLBACK_PORT or something similar
Acceptance Criteria
- the callback port gets opened on specific port instead of any ephemeral port
Alternatives Considered
client credentials flow is what I am considering it for now
Agent Investigation
Spike Plan: feat: allow OIDC callback listener to bind a fixed port via env var
Scope decision: Env-var only (OPENSHELL_OIDC_CALLBACK_PORT) — no GatewayMetadata/clap changes.
Problem statement: The CLI's OIDC login flow binds an OS-assigned ephemeral port (127.0.0.1:0) for the local callback listener. Providers that require pre-registering exact redirect URIs can't reasonably whitelist the full ephemeral range, so login fails or requires impractical whitelisting.
Code changes (all in crates/openshell-cli/src/oidc_auth.rs):
- :188 — check OPENSHELL_OIDC_CALLBACK_PORT; if set, parse as u16 and bind that specific port with a wrapped, actionable error on bind failure; else keep current bind("127.0.0.1:0") behavior.
- No changes needed to redirect_uri construction (:189-190) or callback handling (:660-716) — they already work off whatever port the listener has.
Labels: area:cli, state:validated
Complexity: Low · Confidence: High · Est. files: 1 (+ docs, + tests)
Risks to include in the issue: - Bind-failure UX must give actionable guidance (today's raw OS error is not user-friendly).
- Fixed port is predictable, but existing CSRF state check + PKCE already prevent exploitation — mention, not a blocker.
- No interaction with token/mTLS storage or TUI (confirmed).
Docs impact: docs/reference/gateway-auth.mdx — add the new env var to the table (~line 92-98) and update prose at line 123.
Test additions: unit test setting the env var and asserting the bound port matches; a bind-collision test asserting the friendly error message.
Checklist
- I've reviewed existing issues and the architecture docs
- This is a design proposal, not a "please build this" request
- Lenguaje dominante
- Rust
- Estrellas
- 8.7k
- Forks
- 1.3k
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 297
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 NVIDIA/OpenShell
-
area:docs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
state:triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
area:cli state:validated
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
state:triage-needed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
area:build spike state:review-ready state:stale
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
Todos los issues de NVIDIA/OpenShell
Issues similares
-
bug github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#1393 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rocky-data/rocky#2181 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Abiertobot:ai-assisted component:indexer QA-roadmap status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
midnightntwrk/midnight-indexer#1557 ·