[FR] Use firebase emulator for TenantManagementService
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- 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
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- authentication
Hướng nghiên cứu
Xác định _TenantManagementService và TENANT_MGT_URL của nó, sau đó lần theo cách FIREBASE_AUTH_EMULATOR_HOST được xử lý để so sánh. Kiểm tra hành vi quản lý tenant hiện có với trình mô phỏng Firebase và xác minh rằng thiết lập FIREBASE_TENANT_EMULATOR_HOST được đề xuất hỗ trợ các endpoint tenant được mô phỏng mà không thay đổi hành vi trong môi trường production.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Currently only the Auth client supports running against the firebase emulator when setting the FIREBASE_AUTH_EMULATOR_HOST environment variable. However when wanting to list for example tenants with TenantManagementService you cannot do that and it forcibly uses TENANT_MGT_URL = 'https://identitytoolkit.googleapis.com/v2'. The emulator itself however emulates some of these endpoints (like /projects/{project_id}/tenants) so some of those are supported.
Describe the solution you'd like
Add support for setting FIREBASE_TENANT_EMULATOR_HOST and use that in _TenantManagementService
Describe alternatives you've considered
Doing direct HTTP REST API calls to the emulator or extending the management service manually like
class EmulatedTenantManagementService(tenant_mgt._TenantManagementService):
TENANT_MGT_URL = (
f"http://{firebase_auth_emulator_host}/identitytoolkit.googleapis.com/v2"
)
def __init__(self, app: firebase_admin.App):
super().__init__(app)
credential = _utils.EmulatorAdminCredentials()
version_header = f"Python/Admin/{firebase_admin.__version__}"
base_url = f"{self.TENANT_MGT_URL}/projects/{app.project_id}"
self.client = _http_client.JsonHttpClient(
credential=credential,
base_url=base_url,
headers={"X-Client-Version": version_header},
)
app = firebase_admin.get_app()
service = EmulatedTenantManagementService(app)
app._services[tenant_mgt._TENANT_MGT_ATTRIBUTE] = service
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 359
- Merge trung bình
- 5 ngày 6 phút
- Pull request đã merge (30 ngày)
- 2
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 firebase/firebase-admin-python
-
api: remoteconfig
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
firebase/firebase-admin-python#957 · 1 bình luận ·
-
api: database type: feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-python#978 · 1 bình luận ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Đang mởapi: auth
firebase/firebase-admin-python#949 · 2 bình luận · 1 reaction · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
firebase/firebase-admin-python#945 · 1 bình luận · 1 reaction ·
Tất cả issue của firebase/firebase-admin-python
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100