microsoftgraph / microsoftgraph/msgraph-sdk-python-core
NationalClouds are wrongly prefixed
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 288
- 分支
- 52
- 平均合併
- 8 小時 10 分鐘
- 30 天內合併 PR
- 1
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先從 src/msgraph_core/_enums.py 和 src/msgraph_core/authentication/azure_identity_authentication_provider.py 開始,然後檢查 Kiota 的 allowed_hosts_validator.py。使用預設允許的主機將 AzureIdentityAuthenticationProvider 實例化,以重現此問題。當預設的 NationalClouds 值能夠在不觸發驗證器例外的情況下被接受,同時手動允許主機設定仍然可用時,修正即完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- azure, python
- 領域
- authentication
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100