microsoftgraph / microsoftgraph/msgraph-sdk-python-core
NationalClouds are wrongly prefixed
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 288
- Fork
- 52
- Merge trung bình
- 8 giờ 10 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
Describe the bug
NationalClouds is defined in https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/e54022acf0b0779ad471d324dae460175408d2c3/src/msgraph_core/_enums.py#L33-L43 where all values are prefixed by https,
however, since we pass them as allowed hosts to the AzureIdentityAuthenticationProvider by default in https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/e54022acf0b0779ad471d324dae460175408d2c3/src/msgraph_core/authentication/azure_identity_authentication_provider.py#L22
they are fed to the AllowedHostsValidator which in https://github.com/microsoft/kiota-python/blob/b23edcbf268efdb81d14ef59cecc6c9565288248/packages/abstractions/kiota_abstractions/authentication/allowed_hosts_validator.py#L20 raises an exception if they are prefixed.
Expected behavior
The validator should either strip the urls or the enum should be updated.
How to reproduce
Instantiate an AzureIdentityAuthenticationProvider with default allowed hosts.
SDK Version
1.3.3
Latest version known to work for scenario above?
No response
Known Workarounds
Pass allowed_hosts manually.
Debug output
No response
Configuration
No response
Other information
No response
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.
Hướng nghiên cứu
Bắt đầu với src/msgraph_core/_enums.py và src/msgraph_core/authentication/azure_identity_authentication_provider.py, sau đó kiểm tra allowed_hosts_validator.py của Kiota. Tái hiện vấn đề bằng cách khởi tạo AzureIdentityAuthenticationProvider với các host được phép mặc định. Bản sửa lỗi hoàn tất khi các giá trị NationalClouds mặc định được chấp nhận mà không xảy ra ngoại lệ của trình xác thực, đồng thời cấu hình host được phép thủ công vẫn có thể sử dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, python
- Lĩnh vực
- authentication
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100