NationalClouds are wrongly prefixed

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

Dieses Issue hat noch niemand übernommen.

Bewertung

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

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.

Beschreibung

type:bug
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

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoftgraph/msgraph-sdk-python-core

Alle Issues in microsoftgraph/msgraph-sdk-python-core

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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