microsoft / microsoft/vscode-pgsql

Dev container connections lose SecretStore entry on rebuild

Abierto
#246 0 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug
Lenguaje dominante
Sin datos de lenguaje
Estrellas
395
Forks
33
Merge medio
1 h 46 min
PR fusionados (30 d)
3

Descripción

Summary

When a workspace connection profile is stored in .vscode/settings.json with a
password field, the extension automatically strips the plaintext password from
the file (expected — plaintext passwords shouldn't be committed). However, when a
Dev Container is rebuilt or VS Code re-establishes the remote connection, the
corresponding SecretStore entry is not present, leaving the connection in a broken
state until the user manually opens the connection editor and re-saves.

Steps to reproduce

  1. Add a connection profile to .vscode/settings.json (or check one in) with a
    password field populated.
  2. Open the workspace in a Dev Container.
  3. Observe the password field is immediately stripped from settings.json by the
    extension (expected behavior).
  4. The connection is shown as errored in the extension — it has no password to use.
  5. Open the connection editor in the extension UI, make no changes, and click Save.
  6. The connection now works (SecretStore entry is created).
  7. Rebuild the Dev Container (e.g., to update a dependency or add an extension).
  8. After rebuild, the connection is broken again — back to step 4.

Expected behavior

On first activation of a connection profile from workspace settings, the extension
should prompt for the password and store it in SecretStore — or otherwise surface
a clear recovery path — rather than silently leaving the connection in an errored
state. Subsequent cold starts (e.g., container rebuild) should also trigger this
flow if no SecretStore entry exists for the profile.

Actual behavior

The connection is left silently broken. The only workaround is to open the
connection editor and re-save, which is not obvious and must be repeated on every
container rebuild.

Workaround

Open the connection via the extension UI → Edit → Save (no changes needed). This
creates the SecretStore entry and the connection begins working. Must be repeated
after each container rebuild.

Environment

  • Extension version: v1.19.0 (pre-release)
  • VS Code: remote / Dev Container
  • Connection storage: .vscode/settings.json (workspace scope)

Related

  • Closes #191 (the connection-storage-in-workspace-settings feature request, now
    shipped — this is a follow-on friction point in the devcontainer flow)
  • Related: #143 (password retrieval via custom mechanism)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el flujo de conexión de .vscode/settings.json con ámbito de workspace y la primera activación después de reconstruir un Dev Container. Rastrea cómo el editor de conexiones crea la entrada de SecretStore y cómo la extensión gestiona una entrada inexistente. La tarea está terminada cuando un contenedor reconstruido solicita la contraseña o muestra una ruta clara de recuperación, y la conexión deja de fallar silenciosamente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
postgresql, vscode
Área
authentication, devtools
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.