microsoftgraph / microsoftgraph/msgraph-sdk-python-core

NationalClouds are wrongly prefixed

Offen
#917 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

type:bug
Vorherrschende Sprache
Python
Sterne
288
Forks
52
Ø Merge
8 Std. 10 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit src/msgraph_core/_enums.py und src/msgraph_core/authentication/azure_identity_authentication_provider.py und sieh dir anschließend Kiotas allowed_hosts_validator.py an. Reproduziere das Problem, indem du AzureIdentityAuthenticationProvider mit den standardmäßigen zulässigen Hosts instanziierst. Die Fehlerbehebung ist abgeschlossen, wenn die standardmäßigen NationalClouds-Werte ohne die Validator-Ausnahme akzeptiert werden, während die manuelle Konfiguration zulässiger Hosts weiterhin verwendbar bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, python
Bereich
authentication
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.