microsoftgraph / microsoftgraph/msgraph-sdk-python-core
NationalClouds are wrongly prefixed
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 288
- Forks
- 52
- Merge moyen
- 8 h 10 min
- PR mergées (30 j)
- 1
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par src/msgraph_core/_enums.py et src/msgraph_core/authentication/azure_identity_authentication_provider.py, puis examinez le allowed_hosts_validator.py de Kiota. Reproduisez le problème en instanciant AzureIdentityAuthenticationProvider avec les hôtes autorisés par défaut. La correction est terminée lorsque les valeurs NationalClouds par défaut sont acceptées sans l'exception du validateur, tandis que la configuration manuelle des hôtes autorisés reste utilisable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, python
- Domaine
- authentication
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100