Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Allow connection profiles to be declared in workspace settings.json for team sharing

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi quá trình kích hoạt extension và cách các kết nối được tải vào cây kết nối, sau đó kiểm tra các path hiện có cho secret-storage và user-settings. Xác định cách các workspace descriptor được hợp nhất với các kết nối cá nhân, cách source badge được hiển thị và cách một password bị thiếu đi đến prompt thông thường. Hoàn thành khi các workspace profile không chứa secret xuất hiện sau khi clone mà không commit credentials, đồng thời các kết nối cá nhân hiện có vẫn hoạt động.

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

Mô tả

Problem

Connection profiles in the PostgreSQL extension are stored in VS Code's global secret storage and user settings — neither of which is committed to source control. In a team environment, every developer must manually re-enter connection details (host, port, database, username) for shared databases (dev/staging). There is no way to ship a pre-populated, non-secret connection profile as part of a repository.

Use Case

A team wants to commit a .vscode/settings.json that pre-declares non-secret connection attributes:

{
  "pgsql.connections": [
    {
      "name": "Dev DB (shared)",
      "host": "dev-db.internal.example.com",
      "port": 5432,
      "database": "myapp_dev",
      "user": "devuser",
      "passwordSource": "prompt" // or "pgpass" | "secretStorage"
    }
  ]
}

When a developer clones the repo and opens it, the connection appears pre-populated in the sidebar — they only need to supply the password.

Why This Is Safe

Passwords are never committed (the passwordSource field controls where the credential comes from). Only non-secret metadata (host, port, db name, user) is in the settings file. This mirrors how SQL Server extension (mssql) handles workspace-level connection profiles.

Proposed Change

  1. Add pgsql.connections as a workspace-scope configuration key (array of connection descriptors, no password field).
  2. On activation, merge connections from workspace settings into the connections tree (alongside secret-storage ones), displaying a source badge ("workspace" vs "personal").
  3. Connecting a workspace connection that has no password triggers the normal password prompt and optionally stores it in secret storage for the session.

Environment

  • VS Code: 1.89+, team sharing .vscode/settings.json via git
  • Extension: ms-ossdata.vscode-pgsql latest
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

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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.

Issue khác của microsoft/vscode-pgsql

Tất cả issue của microsoft/vscode-pgsql

Issue tương tự

Thêm issue về Databases

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.