Saved database passwords collide across SSH connections using identical localhost endpoints

Aberta
#317 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
postgresql, vscode

Direção de pesquisa

Start by tracing how connection profiles save and retrieve database passwords through VS Code SecretStorage, especially how the credential key is derived from profile and endpoint properties. Compare two profiles with identical database properties but different SSH destinations, then verify each reconnect retrieves its own password; done means saving either profile no longer overwrites the other's credential.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Describe the bug

Separate native-SSH connection profiles overwrite each other's saved PostgreSQL
passwords when their database endpoint properties match, despite different
profile IDs and SSH destinations.

Affected extension: ms-ossdata.vscode-pgsql version 1.32.1, running in a
Linux/WSL extension host. The exact VS Code editor version was not captured.

This is distinct from the expected migration of plaintext settings passwords
into VS Code SecretStorage: the migrated credentials collide.

To Reproduce

  1. Configure two native-SSH profiles with these properties:
Property Profile A Profile B
id example-profile-a example-profile-b
server localhost localhost
port 5432 5432
database example_db example_db
user example_user example_user
authenticationType SqlLogin SqlLogin
password dummy-password-a dummy-password-b
savePassword true true
sshEnabled true true
sshHost jump-a.invalid jump-b.invalid
sshPort 22 22
sshUsername example_ssh_user example_ssh_user
sshAuthenticationType publicKey publicKey

Use valid test private-key paths for sshKeyfile. The test databases should
require their respective different dummy passwords.

  1. Allow the extension to save/migrate both database passwords.
  2. Reconnect to both profiles. One can receive the other profile's saved
    password and fail database authentication despite a successful SSH tunnel.

Expected behavior

Profiles targeting different SSH destinations should retrieve their own saved
database passwords. Saving one must not overwrite the credential of another.

VS Code version

Windows 1.144.0

Linguagem predominante
Sem dados de linguagem
Estrelas
406
Forks
35
Merge médio
2h 47min
PRs com merge (30d)
5

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/vscode-pgsql

Todas as issues de microsoft/vscode-pgsql

Issues semelhantes

Mais issues de Security

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.