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

Login fails without Secret Service (headless Linux/WSL2): consider a file-based fallback

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

Maintainer thường phản hồi trong vòng 1 ngày

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
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, linux
Lĩnh vực
authentication, cli, security

Hướng nghiên cứu

Start by reading internal/keyring/keyring.go and tracing credential encryption and retrieval from the nais login -n and nais alpha mcp serve entry points. Reproduce the missing Secret Service behavior on headless Linux or WSL2, then agree on the opt-in fallback and its configuration surface. Done means the selected store works with appropriate file permissions and unusable systems receive an actionable error, with tests covering both paths.

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

Mô tả

nais/cli keeps its credentials encryption key in the OS keyring through zalando/go-keyring (internal/keyring/keyring.go, service cli.nais.io). On Linux, go-keyring only supports Secret Service over the D-Bus session bus, and has no fallback.

On headless WSL2, or on servers without gnome-keyring or KeePassXC, nais login -n likely fails at keyring.SetBytes. We inferred this from the source and haven't reproduced it on a real host. As a result, the Nais MCP server (nais alpha mcp serve) can't be used there.

Suggestion: an opt-in file-based key store, for example under the config dir with mode 0600, or an env/flag to choose it. Also a clear error that points to installing a Secret Service provider.

Context: Nav's cplt sandbox runs nais alpha mcp serve on the host for AI agents (navikt/cplt#838), and we want it to work on WSL2.

Ngôn ngữ chính
Go
Star
2
Fork
5
Merge trung bình
3 giờ 3 phút
Pull request đã merge (30 ngày)
30

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: 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 nais/cli

Tất cả issue của nais/cli

Issue tương tự

Thêm issue về Go

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.