microsoftgraph / microsoftgraph/msgraph-sdk-python-core

NationalClouds are wrongly prefixed

Aperta
#917 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

type:bug
Lingua principale
Python
Stelle
288
Fork
52
Merge medio
8h 10m
PR unite (30g)
1

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da src/msgraph_core/_enums.py e src/msgraph_core/authentication/azure_identity_authentication_provider.py, quindi esamina il file allowed_hosts_validator.py di Kiota. Riproduci il problema istanziando AzureIdentityAuthenticationProvider con gli host consentiti predefiniti. La correzione è completa quando i valori NationalClouds predefiniti vengono accettati senza l'eccezione del validatore, mentre la configurazione manuale degli host consentiti rimane utilizzabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, python
Ambito
authentication
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.