microsoftgraph / microsoftgraph/msgraph-sdk-python-core

NationalClouds are wrongly prefixed

オープン
#917 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

type:bug
主要言語
Python
スター
288
フォーク
52
平均マージ
8時間 10分
マージ済み PR(30日)
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。