microsoft / microsoft/vscode-pgsql
Dev container connections lose SecretStore entry on rebuild
Personne n'a encore pris cette issue.
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 395
- Forks
- 33
- Merge moyen
- 1 h 46 min
- PR mergées (30 j)
- 3
Description
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
- Add a connection profile to
.vscode/settings.json(or check one in) with a
passwordfield populated. - Open the workspace in a Dev Container.
- Observe the
passwordfield is immediately stripped fromsettings.jsonby the
extension (expected behavior). - The connection is shown as errored in the extension — it has no password to use.
- Open the connection editor in the extension UI, make no changes, and click Save.
- The connection now works (SecretStore entry is created).
- Rebuild the Dev Container (e.g., to update a dependency or add an extension).
- 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)
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le flux de connexion de .vscode/settings.json limité au workspace et la première activation après une reconstruction de Dev Container. Suivez la manière dont l’éditeur de connexions crée l’entrée SecretStore et la manière dont l’extension gère une entrée manquante. Le travail est terminé lorsqu’un conteneur reconstruit demande le mot de passe ou affiche un chemin de récupération clair, et que la connexion n’échoue plus silencieusement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- postgresql, vscode
- Domaine
- authentication, devtools
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100