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

[sup] ACM cookie-auth session: URL cluster/node context + temp-credential lifecycle

Đang mở
#354 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/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ệ
sql, typescript
Lĩnh vực
api, authentication, frontend

Hướng nghiên cứu

Trước tiên, hãy lần theo luồng ChCtx/session hiện có và ngữ cảnh URL ACM, sau đó kiểm tra các entry point /api/account và /api/cluster/{id}/support/credentials. Xác minh các request chỉ sử dụng cookie, chuyển hướng ACM khi nhận 401, việc gán email của engineer và quá trình mint credential single-flight với mọi dạng response đã được tài liệu hóa; hoàn tất nghĩa là tất cả các bước kiểm tra chấp nhận được liệt kê đều đạt.

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

Mô tả

enhancement sup

Part of #352. Heavily simplified by the cookie-auth model (was: #user login + pasted ACM key).

A dedicated ACM-mode ChCtx/session — no login form, no token, no key persistence.

Scope

  • Read context from URL: cluster and node query params (supplied by the ACM console link). No cluster URL→id resolution.
  • Cookie auth: all /api calls credentials:'same-origin', no auth header. A 401 = ACM session lost → redirect to ACM login (standard), not our concern to refresh.
  • Identity: GET /api/account → engineer email, used as CH user= for query_log attribution. Model engineer-identity (from /account) separately from CH transport login (may be a returned login, else the email) and never assume they're the same.
  • Temp CH credential lifecycle: mint via GET /api/cluster/{id}/support/credentials; read TTL from the response (don't hardcode); keep alive via /support/refresh or re-mint; single-flight so concurrent schema/dashboard requests don't mint in parallel. Handle both documented shapes ({password,ttl} / bare string / {login,password}).

Removed vs. original

  • #user sentinel, ACM key in a password field, Chrome-password-store, no-localStorage/share-link/export rules for the key — there is no key in JS anymore.

Acceptance

  • Loads cluster/node from URL; currentUser() is the engineer email.
  • No credential stored in JS; cookie-only; 401 → ACM login redirect.
  • Temp creds mint + refresh (single-flight), TTL from response, all response shapes handled.
Ngôn ngữ chính
TypeScript
Star
8
Fork
2
Merge trung bình
1 giờ 17 phút
Pull request đã merge (30 ngày)
3

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

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 Altinity/altinity-sql-browser

Tất cả issue của Altinity/altinity-sql-browser

Issue tương tự

Thêm issue về TypeScript

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.