NationalClouds are wrongly prefixed
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- azure, python
调研方向
先从 src/msgraph_core/_enums.py 和 src/msgraph_core/authentication/azure_identity_authentication_provider.py 开始,然后检查 Kiota 的 allowed_hosts_validator.py。使用默认允许的主机实例化 AzureIdentityAuthenticationProvider,以重现该问题。当默认的 NationalClouds 值能够在不触发验证器异常的情况下被接受,同时手动允许主机配置仍然可用时,修复即完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 288
- 派生
- 52
- 平均合并
- 8 小时 10 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-python-core 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
status:waiting-for-triage type:bug
难度 2/5 1-3 小时 新手友好度 75/100
-
status:waiting-for-triage type:bug
难度 2/5 1-3 小时 新手友好度 68/100
microsoftgraph/msgraph-sdk-python-core#1030 · 2 条评论 · 4 个 reaction ·
-
status:waiting-for-triage type:feature
难度 3/5 1-2 天 新手友好度 52/100
-
status:waiting-for-triage type:bug
难度 3/5 1-2 天 新手友好度 48/100
查看 microsoftgraph/msgraph-sdk-python-core 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#117848 ·