Support OAuth allowed domains for self-hosted installs
Maintainer thường phản hồi trong vòng 1 ngà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
- 38/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ệ
- typescript
- Lĩnh vực
- authentication, authorization
Hướng nghiên cứu
Bắt đầu bằng cách xác định các điểm đầu vào của OAuth callback và cấu hình, sau đó xác định cách các miền email đã xác minh, Google hosted-domain claims và ALLOW_REGISTRATION hiện được xử lý. Giải quyết các câu hỏi về cấu hình và hành vi đăng ký chung so với cấu hình và hành vi dành riêng cho provider trước khi triển khai; hoàn tất có nghĩa là những người dùng phù hợp có thể xác thực theo đặc tả, trong khi những người dùng không phù hợp bị từ chối và hành vi hiện có không thay đổi khi không có allowlist.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi! Opening this as an issue first before doing another PR/rebase, as suggested in #428.
Use case
For self-hosted OpenPanel deployments, it would be useful to enable OAuth login while restricting access to members of a company domain / Google Workspace domain.
A common setup is:
- OpenPanel is self-hosted and reachable on a public URL
- Google OAuth is enabled for convenience
- public registration is disabled with
ALLOW_REGISTRATION=false - only users from an approved company domain should be able to sign in or create accounts through OAuth
At the moment, enabling OAuth does not provide a built-in domain allowlist, so operators need to rely on provider-side configuration or external controls. For Google OAuth, Workspace/internal setup is not always enough by itself for self-hosted deployments, and app-side enforcement would make the behavior clearer.
Proposed behavior
Add optional OAuth domain allowlisting:
- when no allowlist is configured, keep the current behavior unchanged
- when configured, reject OAuth callback users whose verified email domain is not allowed
- for Google, validate
email_verified, the email domain, and ideally the Google ID token hosted-domain claim (hd) for Workspace accounts - matching-domain OAuth users can sign in
- matching-domain OAuth users can sign up even when
ALLOW_REGISTRATION=false - non-matching users cannot sign in or create accounts through OAuth
Possible configuration
Generic option:
OAUTH_ALLOWED_DOMAINS=example.com,example.org
Optionally, provider-specific configuration could also be supported:
GOOGLE_ALLOWED_DOMAINS=example.com
Questions before implementation
- Would you prefer a single generic
OAUTH_ALLOWED_DOMAINSoption, provider-specific options likeGOOGLE_ALLOWED_DOMAINS, or both? - For Google, should a configured domain allowlist require the
hdclaim to match, or should verified email domain be enough? - Should matching-domain OAuth be allowed to create users when
ALLOW_REGISTRATION=false, or should the allowlist only restrict login for users that already exist?
Happy to open a fresh PR if this direction makes sense.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.1k
- Fork
- 510
- Merge trung bình
- 5 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Openpanel-dev/openpanel
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Openpanel-dev/openpanel#532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Period comparison badge shows wrong percentage for decreases (100 → 50 shows ↓100%)Có thể đã có người làm @sarmah-rup đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Openpanel-dev/openpanel#526 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Self-hosted missing op1-replay.jsCó thể đã có người làm @houstona đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Openpanel-dev/openpanel#512 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
login page needs refinementCó thể đã có người làm @anandghegde đã nhận 24 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Openpanel-dev/openpanel#495 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Session replay: early chunks saved under the wrong sessionCó thể đã có người làm @rjocoleman đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Openpanel-dev/openpanel#537 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Openpanel-dev/openpanel
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
lukilabs/beautiful-mermaid#160 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
rescript-lang/rescript-lang.org#1420 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
chthollyphile/folia-major#520 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
databuddy-analytics/Databuddy#1106 ·
Maintainer thường phản hồi trong vòng 1 ngày