microsoft / microsoft/vscode-pgsql

Dev container connections lose SecretStore entry on rebuild

Đang mở
#246 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
395
Fork
33
Merge trung bình
1 giờ 46 phút
Pull request đã merge (30 ngày)
3

Mô tả

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)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với luồng kết nối .vscode/settings.json trong phạm vi workspace và lần kích hoạt đầu tiên sau khi rebuild Dev Container. Theo dõi cách trình chỉnh sửa kết nối tạo mục SecretStore và cách extension xử lý khi thiếu mục này. Hoàn thành khi một container đã rebuild yêu cầu mật khẩu hoặc hiển thị hướng khôi phục rõ ràng, đồng thời kết nối không còn âm thầm thất bại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
postgresql, vscode
Lĩnh vực
authentication, devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.